LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices

Reply
 
Search this Thread
Old 06-06-2004, 11:00 PM   #1
karfei00
Member
 
Registered: May 2004
Posts: 54

Rep: Reputation: 15
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
 
Old 06-07-2004, 10:29 PM   #2
spuzzzzzzz
Member
 
Registered: Sep 2003
Location: Australia
Distribution: Gentoo
Posts: 465

Rep: Reputation: 30
use the --host option to ./configure. eg:
Code:
./configure --host i686-pc-linux-gnu
 
Old 06-08-2004, 03:09 AM   #3
karfei00
Member
 
Registered: May 2004
Posts: 54

Original Poster
Rep: Reputation: 15
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


Last edited by karfei00; 06-08-2004 at 03:14 AM.
 
Old 06-08-2004, 06:53 AM   #4
spuzzzzzzz
Member
 
Registered: Sep 2003
Location: Australia
Distribution: Gentoo
Posts: 465

Rep: Reputation: 30
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.)
 
Old 06-08-2004, 07:02 AM   #5
karfei00
Member
 
Registered: May 2004
Posts: 54

Original Poster
Rep: Reputation: 15
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
 
Old 06-08-2004, 06:19 PM   #6
spuzzzzzzz
Member
 
Registered: Sep 2003
Location: Australia
Distribution: Gentoo
Posts: 465

Rep: Reputation: 30
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.
 
Old 06-08-2004, 09:09 PM   #7
karfei00
Member
 
Registered: May 2004
Posts: 54

Original Poster
Rep: Reputation: 15
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?
 
Old 06-09-2004, 04:33 PM   #8
spuzzzzzzz
Member
 
Registered: Sep 2003
Location: Australia
Distribution: Gentoo
Posts: 465

Rep: Reputation: 30
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)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to cross compile? jiyun0121 Linux - General 3 09-01-2005 06:15 PM
cross compile for i686 Law1213 Linux - Software 2 06-20-2005 08:36 PM
Qt Cross Compile werewolfolondon Linux - Software 2 02-25-2005 01:01 PM
cross compile zaicheke Linux - Software 7 01-20-2005 08:23 PM
How to cross-compile? karfei00 Linux - Laptop and Netbook 2 06-03-2004 09:56 AM


All times are GMT -5. The time now is 03:18 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration