I've found that building crosstool compilers under the HOST sandbox
leads to a compiler where the ld does not make user of /usr/lib to find
libraries. I haven't root caused the problem. I definetly found that
my cross compiler did work properly when I built it in a sandbox using
the toolchain from:
http://scratchbox.org/download/files/sbox-releases/branches/apophis/r3/deb/scratchbox-toolchain-i686-gcc3.3-glibc2.3_1.0.3_i386.deb
Note I used the toolchain package from I couldn't find or successfully
build the i686 compiler in apophis/r4.
This turned up when I was trying to compile crocodile packages using the
compiler built inside the HOST sandbox. The following is an example of
how the ld was misbehaving.
----------------------------------
[sbox-ppc860-croc: ~] > cat > /tmp/hello.c
#include <stdio.h>
int main()
{
printf("Hello cross-compiling world!\n");
return 0;
}
[sbox-ppc860-croc: ~] > gcc /tmp/hello.c -o /tmp/hello -ltermcap
/scratchbox/compilers/powerpc-860-linux-gnu/bin/../lib/gcc/powerpc-860-linux-gnu/3.4.5/../../../../powerpc-860-linux-gnu/bin/ld:
cannot find -ltermcap
collect2: ld returned 1 exit status
[sbox-ppc860-croc: ~] > gcc /tmp/hello.c -o /tmp/hello -L /usr/lib -ltermcap
[sbox-ppc860-croc: ~] >
----------------------------------
Note that when the library path is provided with -L, ld works, but it
doesn't without it.
I just figured I'd note this to save other people the debug headaches,
or in case anybody had any ideas why gcc build under the host sandbox is
missing the /usr/lib default paths?
-Jim Heck
_______________________________________________
Scratchbox-users mailing list
Scratchbox-users@lists.scratchbox.org
http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users