This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
crt1.o not found
- To: gcc-help at gcc dot gnu dot org
- Subject: crt1.o not found
- From: bkohlen at intrinsyc dot com
- Date: Thu, 22 Mar 2001 12:15:42 -0800
I am using a gcc, glibc, and ld which were compiled on i686, for an arm
host, with an arm target. I packaged them by using
$ ./configure --prefix=$install_prefix (and a whole bunch of cross
compile flags)
$ make install prefix=/some/isolated/location"$install_prefix"
I noticed that libc.so still included the "/some/isolated/location" part
of the path, so I manually fixed that, because I intended to install
everything at it's respective "$install_prefix".
gcc works to compile a simple program, as long as I use the -c flag. If
it tries to link, it gives the error:
$ gcc test.c
/usr/arm-linux/bin/ld: cannot open crt1.o: No such file or directory
collect2: ld returned 1 exit status
if I manually try to link with crt1.o I get some undefined references
$ ld -o test /lib/crt1.o test.o -lc
/lib/crt1.o: In function `_start':
/lib/crt1.o(.text+0x28): undefined reference to `_fini'
/lib/crt1.o(.text+0x30): undefined reference to `_init'
I grepped the entire binutils package, looking for some reference to
"/some/isolated/location", thinking that maybe ld was playing the same
trick on me that libc.so had, but there were no hits.
ld --verbose revealed SEARCH_DIR's of (/lib) (/usr/lib) (/usr/local/lib)
and (/usr/arm-linux/lib). crt1.o is found in /lib on my system. out of
desperation i copied it to /usr/lib, but it didn't improve things.
I would appreciate any help, and I realize this is a FAQ, but I can't
resolve the problem with any of the archive searching I have done.
Thanks,
Ben