Hi,

[ I'm resending this e-mail that I already sent to the list on
  September, 5th, but that never made it to the list for some reason. ]

I tried to integrate an ARM and MIPS toolchain, generated by Buildroot,
into Scratchbox using sb-toolchain-extras. These toolchains have been
successfully integrated, and they are able to generate binaries that
can be transparently executed by Scratchbox.

However, at the link step, they don't look in /usr/lib
or /usr/local/lib for libraries:

=======================================================================
[sbox-mipsdemo: ~/mips] > cat hello.c 
#include <stdio.h>

int main(void)
{
        printf("Hello World\n");
        return 0;
}
[sbox-mipsdemo: ~/mips] > gcc -o hello hello.c 
[sbox-mipsdemo: ~/mips] > ./hello 
Hello World
[sbox-mipsdemo: ~/mips] > ls -l /usr/lib/libz.a 
-rwxr-xr-x  1 thomas thomas 106316 Sep  4 16:55 /usr/lib/libz.a
[sbox-mipsdemo: ~/mips] > gcc -o hello hello.c -lz
/scratchbox/compilers/mips-linux-gcc-4.2.4-uclibc-0.9.29/usr/bin/../lib/gcc/mips-linux-uclibc/4.2.4/../../../../mips-linux-uclibc/bin/ld:
 cannot find -lz
collect2: ld returned 1 exit status
[sbox-mipsdemo: ~/mips] > gcc -o hello hello.c -lz -L/usr/lib
[sbox-mipsdemo: ~/mips] > 
=======================================================================

The same test case works with the ARM toolchain officially provided by
Scratchbox.

My toolchain has been directly generated
in /scratchbox/compilers/<foo>, as recommended by the documentation.
I've been told on IRC that it could be a problem in the gcc spec file,
but it correctly sets cross_compile to 0, which should tell the
compiler to act as a native compiler and look in /usr/lib
and /usr/local/lib.

I have both a MIPS toolchain and an ARM toolchain generated by
Buildroot. The MIPS toolchain has been generated recently, while the
ARM toolchain has been generated months ago (I just reinstalled
the .deb I had). And I *think* the ARM toolchain was working properly
at that time. So, I have the feeling that the problem might not be in
the toolchain, but rather in the environment.

Do you have any idea of what could be the source of this problem ?

If anyone wants to test the toolchain, it is available for download at
http://toulibre.org/~thomas/scratchbox/scratchbox-mips-linux-gcc-4.2.4-uclibc-0.9.29_1.0.10_i386.deb

Thanks,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com
_______________________________________________
Scratchbox-users mailing list
Scratchbox-users@lists.scratchbox.org
http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users

Reply via email to