This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: crt1.o not found in mipsel-linux


[please wrap your lines at 70 chars!!!]

pati (sent by Nabble.com) wrote:
> Thanks for all the help... I got glibc installed, but I couldnot get my problem solved completely. 

Please, stop inflicting unnecessary pain on yourself (and us :) by
hand-installing glibc and so on.  Just use crosstool or a known good,
COMPLETE mipsel-linux toolchain.  The one you have been using is very
obviously completely broken.


> mipsel-linux-gcc -c main.c -I/usr/include

This is nonsense.  You should never have to force /usr/include into
your include path.  The toolchain should find its headers
automatically.  If it does not, it's BROKEN.

Also, since you're most probably running all this on a normal PC, you
are including x86 headers into your program, which is almost certainly
not what you want.


> mipsel-linux-gcc -nostartfiles /home/Uday/GLIBC/usr/lib/crti.o /home/Uday/GLIBC/usr/lib/crt1.o -L/home/Uday/GLIBC/usr/lib -L/home/Uday/GLIBC/lib -o main.elf main.o 

Same nonsense.  Never force those libraries into your library path.
Your toolchain should find them automatically.  What does
"mipsel-linux-gcc -print-search-dirs" print?


> When I use a makefile instead of linking from the commnad line, the linker crashes with segmentation fault. This is what I get

Usually this is due to linking objects and libraries from different
CPU's together, e.g. x86 and mipsel files.  I agree that GNU ld should
print something like "Are you insane???" instead of crashing, but then
again...


Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]