View previous topic :: View next topic |
Author |
Message |
stone[no] n00b


Joined: 23 Sep 2004 Posts: 28 Location: Norway
|
Posted: Thu Jan 12, 2006 9:31 pm Post subject: Cross compile: emerge: Configure fails (armeb) [SOLVED] |
|
|
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 |
|
 |
limn l33t

Joined: 13 May 2005 Posts: 997
|
Posted: Thu Jan 12, 2006 11:04 pm Post subject: |
|
|
Try setting CBUILD. |
|
Back to top |
|
 |
stone[no] n00b


Joined: 23 Sep 2004 Posts: 28 Location: Norway
|
Posted: Thu Jan 12, 2006 11:25 pm Post subject: |
|
|
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 |
|
 |
limn l33t

Joined: 13 May 2005 Posts: 997
|
Posted: Thu Jan 12, 2006 11:45 pm Post subject: |
|
|
If CBUILD==CHOST then configure tries to run a test executable on the building box.
CBUILD should be what
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 |
|
 |
stone[no] n00b


Joined: 23 Sep 2004 Posts: 28 Location: Norway
|
Posted: Fri Jan 13, 2006 2:19 pm Post subject: Thanks you for the input! |
|
|
limn wrote: | If CBUILD==CHOST then configure tries to run a test executable on the building box.
CBUILD should be what
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
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 is this synonymous to armeb? _________________ Linux rules! |
|
Back to top |
|
 |
limn l33t

Joined: 13 May 2005 Posts: 997
|
Posted: Fri Jan 13, 2006 4:22 pm Post subject: |
|
|
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
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 |
|
 |
stone[no] n00b


Joined: 23 Sep 2004 Posts: 28 Location: Norway
|
Posted: Tue Jan 17, 2006 9:05 pm Post subject: Thanx again for your input |
|
|
Thanx again for your input, I now have a greater understanding of the whole cross building process
__
-Stein _________________ Linux rules! |
|
Back to top |
|
 |
|