Results 1 to 11 of 11

Thread: Cross-compiling Linux software

  1. #1
    Join Date
    Jan 2004

    Question 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?

  2. #2
    Join Date
    Dec 2003
    Russian Federation
    Have you installed the toolchain itself?

  3. #3
    Join Date
    Jan 2004
    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

  4. #4
    Join Date
    Dec 2003
    Russian Federation
    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.

  5. #5
    Join Date
    Aug 2004
    @ Oleg
    Have you got a special tip to solve?

    I want to compile "p3scan"
    but there is no change to get it done,
    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

    /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

  6. #6
    Join Date
    Dec 2003
    Russian Federation
    wl500g has 16mb of ram only, so don't even try these things...

  7. #7

    Cross-Compiling apps for the WL500

    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 ?

  8. #8
    Join Date
    Dec 2003
    Russian Federation
    CC=mipsel-uclibc-gcc ./configure --host=mipsel-linux

  9. #9
    hi, im using debian unstable, and wondering where ti find this mipsel-uclibc-gcc binary. can somebody help me out please ?
    Last edited by Dazgard; 28-01-2005 at 15:53.

  10. #10
    Join Date
    Dec 2003
    Russian Federation
    Download ASUS GPL sources.

  11. #11

    cross-compiling problems


    i've settet up the crosscompiler as discribed on

    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 ?

Similar Threads

  1. Forum software on the WL500Gx
    By Jethro in forum WL-500g Q&A
    Replies: 2
    Last Post: 14-08-2005, 14:52
  2. Related software into WL 500, USB (ext3)
    By magla in forum WL-500g Q&A
    Replies: 2
    Last Post: 07-08-2005, 16:48
  3. Logitech sphere - Webcam control software
    By soepkip in forum Dutch Discussion - Nederlands
    Replies: 19
    Last Post: 22-06-2005, 11:45
  4. WLAN Software
    By mr.destroyer in forum WL-500g Q&A
    Replies: 1
    Last Post: 14-07-2004, 17:32

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts