View Full Version : Cross-compiling Linux software
Has anyone successfully cross-compiled Linux software using the configure-make-make install process?
I have been trying to compile gnugk (GNU Gatekeeper) in order to allow H323 applications (Netmeeting, Gnomemeeting, etc.) to communicate through WL500g (doing NAT).
Configuring with
./configure --host=mipsel-linux --build=i686-pc-linux-gnu
returns no errors. But I haven't been able to tell 'make' to use the mipsel toochain.
Any hints?
Have you installed the toolchain itself?
Yes, I have installed the cross-compiler that comes with Linksys sources. Using it, I successfully cross-compiled Busybox, the kernel and uClibc.
My problem so far is to tell 'make' to use mipsel-linux-cpp and the other toolchain executables when compiling "regular" Linux software. I still haven't figured out my throught the "Makefile hell" :(
Here goes the first lines of the 'configure' output (on the pwlib sources):
checking build system type... i686-pc-linux-gnu
checking host system type... mipsel-unknown-linux-gnu
checking target system type... mipsel-unknown-linux-gnu
CPU mipsel not recognized - proceed with caution!
OSTYPE set to linux
OSRELEASE set to 2.4.21-166-default
MACHTYPE set to mipsel
checking for mipsel-linux-gcc... mipsel-linux-gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether mipsel-linux-gcc accepts -g... yes
checking for mipsel-linux-gcc option to accept ANSI C... none needed
checking whether byte ordering is bigendian... no
checking if linker accepts --gc-sections... yes
checking if compiler accepts -ffunction-sections... yes
checking if compiler accepts -fdata-sections... yes
checking if compiler accepts -fvtable-gc... no
checking for pthread_create in -lpthread... yes
checking how to run the C preprocessor... mipsel-linux-gcc -E
Not all packages (especially, which is using configure scripts) can be build in such way... The possible solutions are: 1) changing the PATH to point to cross tools (i.e. gcc should invoke mipsel-linux tools); 2) passing the environment variables to the configure, i.e. ΡΡ=mipsel-linux-gcc LD=mipsel-linux-ld ... ./configure; 3) hackish way, which may or may not work, but requires at least the same endianess and kernel version: configuring not for crosscompiling, and when invoking make with environment variables set to proper tools.
Hope this helps. Regards, Oleg.
@ Oleg
Have you got a special tip to solve?
I want to compile "p3scan" http://p3scan.sourceforge.net/
but there is no change to get it done,
because
at the point compilation where the make script want to link files, the mipsel-linux-ld returns
mipsel-linux/bin/ld: ole.o: Relocations in generic ELF (EM: 3)
ole.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
or
/opt/brcm/hndtools-mipsel-linux/bin/../lib/gcc-lib/mipsel-linux/3.0/../../../../mipsel-linux/bin/ld: cannot find -lce
collect2: ld returned 1 exit status
-->Thats why i tested, the mipsel-linux-ld does not support all the functions the i386 does?
Is this right?
BTW, does someone translate perl for the asus wl-500g ?
does an other proxy/virus scanner exist precompiled for the asus ?
does anyone try to compile the "prce" for asus?
Yes, i 've tried to compile the debian-version of p3scan for the asus, because there are precompiled packages available.
But if you start the precompiled on the asus, the router returns:
./p3scan: error while loading shared libraries: cannot open shared object file:
cannot load shared object file: No such file or directory
/mnt/ramfs/tmp #
thx in advice
wl500g has 16mb of ram only, so don't even try these things...