LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   how to cross compile those ordinary ./configure programs? (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/how-to-cross-compile-those-ordinary-configure-programs-190527/)

karfei00 06-06-2004 11:00 PM

how to cross compile those ordinary ./configure programs?
 
i have read a lot of articles regarding to cross compiling, but most of them only touches on cross compile some simple .cpp programs.....using tmake , gcc -o and etc.....

i wonder how to cross compile some softwares that we normally compile using ./configure->make install under linux ....zany ideas? thanks a lot

p/s: IM USING REDHAT LINUX 9 KERNEL 2.4.26 , target platform->zaurus 5500

thanks in advance

spuzzzzzzz 06-07-2004 10:29 PM

use the --host option to ./configure. eg:
Code:

./configure --host i686-pc-linux-gnu

karfei00 06-08-2004 03:09 AM

Quote:

Originally posted by spuzzzzzzz
use the --host option to ./configure. eg:
Code:

./configure --host i686-pc-linux-gnu


host is redhat 9 , target system is zaurus 5500.....can you give me the complete command for this ? thanks

is this correct?

./configure --target=arm-linux --prefix=dir=/usr/local/arm-linux/
make install

if the avoce steps are correct, where should i install those files? target is zaurus5500, thanks


spuzzzzzzz 06-08-2004 06:53 AM

Code:

./configure --host=arm-linux --prefix=/usr/local/arm-linux
This is to compile the program for *running* on an arm processor with linux. Some versions of configure use --target instead of --host. Check by doing "./configure --help". Now do
Code:

make && make install
Then tar the installed program up with
Code:

tar cf program.tar /usr/local/arm-linux/*
Then install it on your Zaurus with
Code:

tar xvf program.tar -C /usr/local
(after copying the archive over, of course.)

karfei00 06-08-2004 07:02 AM

i have tried this :

./configure --host=arm-linux --prefix=/usr/local/arm-linux

after that i type "file program_name"
it showed the platform the program runs...for my case --> 32 bit, i386 ....which is PC instead of ARM ....

any comments on this? thx

spuzzzzzzz 06-08-2004 06:19 PM

Have you actually set up your cross-compiler? It should be called something like arm-linux-gcc. You also need a cross-linker and arm versions of all the compile-time library dependencies. A google search for "cross compile gcc" turns up lots of how-to's (by your first post, I assume you have read many such articles).

OK, suppose you have your cross-compiler working and ./configure is still acting funny. Just edit the top-level makefile and change the value of CC to "arm-linux-gcc". You may also want to add "-mcpu=whatever_arm_version_you_have" to CFLAGS.

karfei00 06-08-2004 09:09 PM

i have everything required installed........i did try other alternative way.....

this is what i did:

source dev-arm-xx.sh
./configure

this works ok until the configuring reached "checking fot QT libraries..Not Found, Giving UP"

but i have installed the Qtopia ...and the lib files are located under sharp/lib.....

so any ideas on this?

spuzzzzzzz 06-09-2004 04:33 PM

try --with-libs=/sharp/lib or --with-qt-libs=/sharp/lib (or something like that, do ./configure --help to see what the option should be)


All times are GMT -5. The time now is 11:07 AM.