PDA

Bekijk de volledige versie : Cross-compiling Linux software



joao
19-01-2004, 01:24
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?

Oleg
20-01-2004, 12:46
Have you installed the toolchain itself?

joao
20-01-2004, 13:28
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

Oleg
22-01-2004, 17:19
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.

botron
14-08-2004, 12:57
@ 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

Oleg
14-08-2004, 18:23
wl500g has 16mb of ram only, so don't even try these things...

Ifaistos
21-01-2005, 07:45
The last few days i have been working on cross-compiling varius apps in order to run on the WL500.
I have come to face a problem regarding the ./configure scripts many apps use now.
if the configure is invoked with --host=mipsel-linux as parameter for cross compiling, it results with mipsel-linux-gcc as the compiler and the binary that gets produced does not work on the WL. (i get some strange "not found" messages when trying to execute it.)
If after running config i change the compiler in the makefile, to mipsel-uclibc-gcc the binary works fine.

Is there a way to avoid this ?

Also has anyone been successful in compiling the ncusrses lib ?

Oleg
21-01-2005, 08:16
CC=mipsel-uclibc-gcc ./configure --host=mipsel-linux

Dazgard
28-01-2005, 14:49
hi, im using debian unstable, and wondering where ti find this mipsel-uclibc-gcc binary. can somebody help me out please :confused: ?

Oleg
28-01-2005, 15:16
Download ASUS GPL sources.

SkySufer
15-01-2006, 16:34
Hi

i've settet up the crosscompiler as discribed on macsat.com.

i can compile the standard packages like ncurses ocaml libgd and so on
now i've tried to compile mldonkey that needs ncurses and ocaml to compile.

i've included ocaml-stage and ncurses-stage in the makefile

but when i try to compile it i always get the message :

/opt/brcm/hndtools-mipsel-linux/bin/../lib/gcc-lib/mipsel-linux/3.2.3/../../../../mipsel-linux/bin/ld: cannot find -lcurses

where is the problem ?

what can i do ?