collect2: cannot find ld

Pablo León pablo.leon at horus.es
Wed Mar 29 02:09:31 PST 2006


After some days of tweaking, finally I have got my uClib development 
system (almost) working. I have build it using buildroot with 
busybox-1.1.1, gcc-3.4.6, make-3.80, and all of the compiling stuff 
needed. I can even compile and run a simple "Hello World" c program 
without any problem.

But when I try to compile any standard "configure/make/make install" 
linux package, I always get the following error message at configure stage:

configure: error: installation or configuration problem: C compiler 
cannot create executables.

And config.log states:

configure:722: gcc -o conftest conftest.c 1>&5
collect2: cannot find 'ld'
configure: failed program was:
#line 768 "configure"
#include "confdefs.h"
main(){return(0);}

I have double-checked that ld is in the PATH. The only thing suspicious 
to me is that ash export feature seems broken:

root at uc:/usr/local# export PATH
root at uc:/usr/local# cat testpath
#! /bin/sh
echo $PATH
root at uc:/usr/local# echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin
root at uc:/usr/local# ./testpath
/usr/local/bin:/usr/bin:/sbin:/bin

Any way, ld is located at /usr/bin, so it should be located by collect2.

Any hint would be very appreciated. Thank you very much.


More information about the busybox mailing list