Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cross compile: emerge: Configure fails (armeb) [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
stone[no]
n00b
n00b


Joined: 23 Sep 2004
Posts: 28
Location: Norway

PostPosted: Thu Jan 12, 2006 9:31 pm    Post subject: Cross compile: emerge: Configure fails (armeb) [SOLVED] Reply with quote

I've got a NSLU2 with openslug and I'm trying to cross build.
The compiler works great (testet with "hello world" program...)

I've used emerge with success:
Code:

ROOT=/root/crossdev CHOST=armeb-unknown-linux-gnu CFLAGS="-Os -march=armv5te -mtune=xscale" emerge zip


But when I try emerge a program that requires ./configure, it fails...
Code:

carpetshark crossdev # ROOT=/root/crossdev CHOST=armeb-unknown-linux-gnu CFLAGS="-Os -march=armv5te -mtune=xscale" emerge cpio
Calculating dependencies ...done!
>>> emerge (1 of 2) sys-devel/patch-2.5.9 to /root/crossdev/
>>> md5 files   ;-) patch-2.5.9.ebuild
>>> md5 files   ;-) patch-2.5.9-r1.ebuild
>>> md5 files   ;-) files/digest-patch-2.5.9
>>> md5 files   ;-) files/patch-2.5.9-cr-stripping.patch
>>> md5 files   ;-) files/digest-patch-2.5.9-r1
>>> md5 src_uri ;-) patch-2.5.9.tar.gz
>>> Unpacking source...
>>> Unpacking patch-2.5.9.tar.gz to /var/tmp/portage/patch-2.5.9/work
>>> Source unpacked.
./configure --prefix=/usr --host=armeb-unknown-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --build=armeb-unknown-linux-gnu
checking for armeb-unknown-linux-gnu-gcc... armeb-unknown-linux-gnu-gcc
checking for C compiler default output... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.


When I do it manually it works. Configure is missing "--host=armeb" (as shown in the error message above)
Code:

./configure --prefix=/usr --host=armeb-unknown-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --build=armeb-unknown-linux-gnu --host=armeb


A solution would be to do everything portage does by hand... but it would be nice if portage could manage it!

Any thoughts???
_________________
Linux rules!


Last edited by stone[no] on Fri Jan 13, 2006 2:23 pm; edited 1 time in total
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Thu Jan 12, 2006 11:04 pm    Post subject: Reply with quote

Try setting CBUILD.
Back to top
View user's profile Send private message
stone[no]
n00b
n00b


Joined: 23 Sep 2004
Posts: 28
Location: Norway

PostPosted: Thu Jan 12, 2006 11:25 pm    Post subject: Reply with quote

limn wrote:
Try setting CBUILD.

I've tried setting CBUILD, but I've used "armeb-unknown-linux-gnu"
When I saw your post I thought I'd give "CBUILD=armeb" a try and it worked!

Thanx for your input!


__
Ch1: CBUILD=armed -> CBUILD=armeb
_________________
Linux rules!


Last edited by stone[no] on Fri Jan 13, 2006 7:28 am; edited 1 time in total
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Thu Jan 12, 2006 11:45 pm    Post subject: Reply with quote

If CBUILD==CHOST then configure tries to run a test executable on the building box.
CBUILD should be what
Code:
emerge --info

shows for CBUILD.
Practically speaking, at least as far as emerge cpio for you was concerned, you could have had CBUILD=mips.
This may not work for all packages.

HTH
Back to top
View user's profile Send private message
stone[no]
n00b
n00b


Joined: 23 Sep 2004
Posts: 28
Location: Norway

PostPosted: Fri Jan 13, 2006 2:19 pm    Post subject: Thanks you for the input! Reply with quote

limn wrote:
If CBUILD==CHOST then configure tries to run a test executable on the building box.
CBUILD should be what
Code:
emerge --info

shows for CBUILD.
Practically speaking, at least as far as emerge cpio for you was concerned, you could have had CBUILD=mips.
This may not work for all packages.

HTH


You are correct! I didn't read the guide on http://dev.gentoo.org/~vapier/CROSS-COMPILE-HOWTO well enough :oops:

This is how you should cross compile from i686 to a NSLU2 (armeb):
Code:

ROOT=/your/path/ CHOST=armeb-unknown-linux-gnu CBUILD=i686-pc-linux-gnu CFLAGS="-Os -march=armv5te -mtune=xscale" emerge packagename


You mention
limn wrote:
CBUILD=mips
is this synonymous to armeb?
_________________
Linux rules!
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Fri Jan 13, 2006 4:22 pm    Post subject: Reply with quote

mips is different architecture.
For configuring the build of cpio, CBUILD can be any architecture or platform configure recognizes.
As long as the string assigned to CBUILD is not identical to the string assigned to CHOST, it doesn't try to run the test cross-compiled program.
This is why
Code:
CBUILD=armeb

worked for you. It could also have something like
Code:
CBUILD=armeb-unknown-bsd

However, the correct CBUILD string should be used.
Back to top
View user's profile Send private message
stone[no]
n00b
n00b


Joined: 23 Sep 2004
Posts: 28
Location: Norway

PostPosted: Tue Jan 17, 2006 9:05 pm    Post subject: Thanx again for your input Reply with quote

Thanx again for your input, I now have a greater understanding of the whole cross building process :-)

__
-Stein
_________________
Linux rules!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum