Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem emerging for arm under crossdev
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
rmfuhrer
n00b
n00b


Joined: 18 Jun 2003
Posts: 19
Location: Hawthorne, NY

PostPosted: Wed Aug 30, 2006 12:05 am    Post subject: Problem emerging for arm under crossdev Reply with quote

I'm running on an Athlon XP under gentoo 2006.0. I've got the most recent crossdev installed:

Code:
# equery list crossdev
[I--] [  ] sys-devel/crossdev-0.9.16 (0)
#


and I built my crossdev build tools using something like:

Code:
# crossdev -s3 armeb-softfloat-linux-uclibc
#


As a trivial sanity check, I can run the arm compiler:

Code:
# cat hello.c
#include <stdio.h>

int main(char *argv[]) {
    printf("hello, world\n");
    return 0;
}
# armeb-softfloat-linux-uclibc-gcc hello.c
# ls
a.out*  hello.c
# ls -l a.out
-rwxr-xr-x 1 root root 5483 Aug 29 19:55 a.out*
# file a.out
a.out: ELF 32-bit MSB executable, ARM, version 1 (ARM), dynamically linked (uses shared libs), not stripped
#


Then, I followed the instructions in

http://www.gentoo.org/proj/en/base/embedded/cross-development.xml

to set up my portage environment for cross-compiling:

Code:
# ls -l /usr/armeb-softfloat-linux-uclibc/etc/
total 12
-rw-r--r-- 1 root root  463 Aug 29 19:37 make.conf
-rw-r--r-- 1 root root 3063 Aug 29 13:53 make.globals
lrwxrwxrwx 1 root root   32 Aug 29 14:08 make.profile -> /usr/portage/profiles/uclibc/arm/
drwxr-xr-x 3 root root 4096 Aug 29 14:08 portage/
# cat /usr/armeb-softfloat-linux-uclibc/etc/make.conf
ACCEPT_KEYWORDS="arm"
ARCH="arm"

CFLAGS="-Os -pipe"
CXXFLAGS="${CFLAGS}"

CHOST=i686-pc-linux-gnu

CTARGET=armeb-softfloat-linux-uclibc # This seems to have no effect!

MAKEOPTS="-j2"

GENTOO_MIRRORS="http://open-systems.ufl.edu/mirrors/gentoo \
    http://prometheus.cs.wmich.edu/gentoo \
    http://mirror.datapipe.net/gentoo \
    http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/"

INPUT_DEVICES="keyboard"
USE="arm readline ssl uclibc"
#


Unfortunately, when I try to emerge a package for the target environment, configure seems to ignore the target specification after a certain point:

Code:
# ./xmerge -v ncurses
Calculating dependencies... done!
>>> Emerging (1 of 1) sys-libs/ncurses-5.5-r2 to /usr/armeb-softfloat-linux-uclibc/
>>> checking ebuild checksums ;-)
>>> checking auxfile checksums ;-)
>>> checking miscfile checksums ;-)
>>> checking ncurses-5.5.tar.gz ;-)
>>> Unpacking source...
>>> Unpacking ncurses-5.5.tar.gz to /var/tmp/portage/ncurses-5.5-r2/work
 * Applying ncurses-5.5-gfbsd.patch ...                                   [ ok ]
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/ncurses-5.5-r2/work/ncurses-5.5 ...
 * econf: updating ncurses-5.5/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating ncurses-5.5/config.sub with /usr/share/gnuconfig/config.sub
/var/tmp/portage/ncurses-5.5-r2/work/ncurses-5.5/configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/lib --with-terminfo-dirs=/etc/terminfo:/usr/share/terminfo --disable-termcap --with-shared --with-rcs-ids --without-ada --enable-symlinks --enable-const --with-chtype=long --with-mmask-t=long --without-debug --without-gpm --target=armeb-softfloat-linux-uclibc --build=i686-pc-linux-gnu
Configuring NCURSES 5.5 ABI 5 (Tue Aug 29 19:47:48 EDT 2006)
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... armeb-softfloat-linux-uclibc
Configuring for linux-gnu
checking for prefix... /usr
checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
<...snip...>


and then we're off to the wrong races :-(. You can see from the last line that configure thinks that we're not cross-compiling, even though configure is passed a reasonable-looking --target option.

Any clues here?
_________________
Robert M. Fuhrer
"Smooth jazz is no jazz at all..."
Back to top
View user's profile Send private message
rmfuhrer
n00b
n00b


Joined: 18 Jun 2003
Posts: 19
Location: Hawthorne, NY

PostPosted: Wed Aug 30, 2006 8:07 pm    Post subject: Reply with quote

A little more info, in case that helps:

Code:
[root:~]# equery list | grep armeb
cross-armeb-softfloat-linux-uclibc/binutils-2.17
cross-armeb-softfloat-linux-uclibc/gcc-3.4.6-r2
cross-armeb-softfloat-linux-uclibc/linux-headers-2.6.11-r3
cross-armeb-softfloat-linux-uclibc/uclibc-0.9.28
[root:~]# gcc-config -l
 [1] armeb-softfloat-linux-uclibc-3.4.6 *
 [2] armeb-softfloat-linux-uclibc-3.4.6-hardenednopie
 [3] armeb-softfloat-linux-uclibc-3.4.6-hardenednopiessp
 [4] i686-pc-linux-gnu-3.3.6 *
 [5] i686-pc-linux-gnu-3.3.6-hardened
 [6] i686-pc-linux-gnu-3.3.6-hardenednopie
 [7] i686-pc-linux-gnu-3.3.6-hardenednopiessp
 [8] i686-pc-linux-gnu-3.3.6-hardenednossp
 [9] i686-pc-linux-gnu-3.4.6
 [10] i686-pc-linux-gnu-3.4.6-hardened
 [11] i686-pc-linux-gnu-3.4.6-hardenednopie
 [12] i686-pc-linux-gnu-3.4.6-hardenednopiessp
 [13] i686-pc-linux-gnu-3.4.6-hardenednossp
[root:~]# binutils-config -l
 [1] armeb-softfloat-linux-uclibc-2.17 *

 [2] i686-pc-linux-gnu-2.16.1 *
[root:~]#

_________________
Robert M. Fuhrer
"Smooth jazz is no jazz at all..."
Back to top
View user's profile Send private message
rmfuhrer
n00b
n00b


Joined: 18 Jun 2003
Posts: 19
Location: Hawthorne, NY

PostPosted: Thu Aug 31, 2006 12:16 am    Post subject: Solved: Problem emerging for arm under crossdev Reply with quote

So it turns out that I had botched the CHOST setting in the crossdev make.conf; it should have been armeb-softfloat-linux-uclibc and not i686-pc-linux-gnu as I had it...

Thanks to vapier, who pointed this out to me on the #gentoo-embedded channel on freenode.
_________________
Robert M. Fuhrer
"Smooth jazz is no jazz at all..."
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