[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] ld.real: cannot open crt0.o: No such file or directory while building agetty



Hi,

Quoting Olof Backing <olof.backing@xxxxxxxxxxxx>:


> > As a test, can you create simple hello.c file (just hello world).  then do
> >
> > $ source settings.sh (in petalinux toplevel dir)
> >
> > $ microblaze-uclinux-gcc -o hello hello.c
> >
> > and tell me the result.  It should work cleanly.
>
> Which it doesn't do. Work cleanly:
>
> olof@ehc-labdator03:petalinux-v0.30-rc1> microblaze-uclinux-gcc -o hello
> hello.c
>
/home/olof/svn/petalinux-v0.30-rc1/tools/linux-i386/microblaze-uclinux-tools/bin/../lib/gcc/microblaze-uclinux/3.4.1/../../../../microblaze-uclinux/bin/ld.real:
> cannot open crt0.o: No such file or directory
> collect2: ld returned 1 exit status
>
> And this bothers me. I did a find(1) on crt0.o in petalinux-v0.30-rc1 and
> came up with:
>
> olof@ehc-labdator03:petalinux-v0.30-rc1> find . -name crt0.o -print
> ./software/petalinux-dist/uClibc/lib/crt0.o
> ./software/petalinux-dist/uClibc/libc/sysdeps/linux/microblaze/crt0.o
>
> But they might have been built from the build process with uClibc chosen in
> the
> Kernel/Library menu.
>

Recently I run into the same problem of this but on another CPU. My case is the
source control program secretly refused any *.o files come with gcc toolchain.
Can you run gcc with a '-v' flags just to see which library directory it is
searching? It might not use the crt0.o from your own uClibc build.

Hope this helps.

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/