Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Crossdev toolchain installation is failing [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
njcwotx
Guru
Guru


Joined: 25 Feb 2005
Posts: 514
Location: Texas

PostPosted: Tue Oct 23, 2012 7:28 pm    Post subject: Crossdev toolchain installation is failing [Solved] Reply with quote

I am working on figuring out how to cross compile my Raspberry Pi. I am a noob when crosscompiling so this is a first attempt for me. I have read through the embedded guide and several other documents and posts, much of which is still slightly hazy to me.

However, I ran the following command and it ran for quite some time before failing with the error below. I had come to an error that had me move my package.keywords to a folder and setup a PORTAGE_OVERLAY value in make.conf and the command began working. I can provide more information if you need it, I just didnt want to spam too much info until I knew what would be useful.

Code:
crossdev -S -P -v -t armv6j-hardfloat-linux-gnueabi

Quote:

make[1]: Leaving directory `/var/tmp/portage/cross-armv6j-hardfloat-linux-gnueabi/gcc-4.5.4/work/build'
make: *** [all] Error 2
emake failed
* ERROR: cross-armv6j-hardfloat-linux-gnueabi/gcc-4.5.4 failed (compile phase):
* emake failed with all
*
* Call stack:
* ebuild.sh, line 85: Called src_compile
* environment, line 4021: Called toolchain_src_compile
* environment, line 4672: Called gcc_do_make
* environment, line 2339: Called die
* The specific snippet of code:
* emake LDFLAGS="${LDFLAGS}" STAGE1_CFLAGS="${STAGE1_CFLAGS}" LIBPATH="${LIBPATH}" BOOT_CFLAGS="${BOOT_CFLAGS}" ${GCC_MAKE_TARGET} || die "emake failed with ${GCC_MAKE_TARGET}";
*
* If you need support, post the output of `emerge --info '=cross-armv6j-hardfloat-linux-gnueabi/gcc-4.5.4'`,
* the complete build log and the output of `emerge -pqv '=cross-armv6j-hardfloat-linux-gnueabi/gcc-4.5.4'`.
* This ebuild is from an overlay named 'x-portage': '/usr/local/portage/'
*
* Please include /var/tmp/portage/cross-armv6j-hardfloat-linux-gnueabi/gcc-4.5.4/work/build/gcc-build-logs.tar.bz2 in your bug report
*
* The complete build log is located at '/var/tmp/portage/cross-armv6j-hardfloat-linux-gnueabi/gcc-4.5.4/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/cross-armv6j-hardfloat-linux-gnueabi/gcc-4.5.4/temp/environment'.
* Working directory: '/var/tmp/portage/cross-armv6j-hardfloat-linux-gnueabi/gcc-4.5.4/work/build'
* S: '/var/tmp/portage/cross-armv6j-hardfloat-linux-gnueabi/gcc-4.5.4/work/build

_________________
Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting.


Last edited by njcwotx on Wed Oct 24, 2012 5:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
njcwotx
Guru
Guru


Joined: 25 Feb 2005
Posts: 514
Location: Texas

PostPosted: Tue Oct 23, 2012 7:43 pm    Post subject: Reply with quote

here is the /usr/armv6j-hardfloat-linux-gnueabi/etc/portage/make.conf file its the one that showed up after the partial build.

Code:
CHOST=armv6j-hardfloat-linux-gnueabi
CBUILD=i686-pc-linux-gnu
ARCH=arm

HOSTCC=i686-pc-linux-gnu-gcc
E_MACHINE=EM_ARM

ROOT=/usr/${CHOST}/

ACCEPT_KEYWORDS="arm ~arm"

USE="${ARCH} zlib bindist make-symlinks minimal"

#MARCH_TUNE="-march=armv4t -mtune=arm9tdmi"   #arm-softfloat-linux-uclibc
#MARCH_TUNE="-march=armv5t -mtune=xscale"   #armv5teb-softfloat-linux-gnueabi

CFLAGS="-Os -pipe ${MARCH_TUNE} -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

FEATURES="-collision-protect sandbox buildpkg noman noinfo nodoc"
# Be sure we dont overwrite pkgs from another repo..
PKGDIR=${ROOT}packages/
PORTAGE_TMPDIR=${ROOT}tmp/

ELIBC="glibc"

PKG_CONFIG_PATH="${ROOT}usr/lib/pkgconfig/"
#PORTDIR_OVERLAY="/usr/portage/local/"

LIBDIR_arm="lib"
LIBDIR_amd64=lib64
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PORTDIR_OVERLAY="/usr/local/portage"
MAKEOPTS="-j3"
GENTOO_MIRRORS="http://distfiles.gentoo.org"

_________________
Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32320
Location: 56N 3W

PostPosted: Tue Oct 23, 2012 8:46 pm    Post subject: Reply with quote

njcwotx,

You need to pastebin the files the fail message says ...
Code:
* If you need support, post the output of `emerge --info '=cross-armv6j-hardfloat-linux-gnueabi/gcc-4.5.4'`,
* the complete build log and the output of `emerge -pqv '=cross-armv6j-hardfloat-linux-gnueabi/gcc-4.5.4'`.


wgetpaste is your friend.

You need to read wiki.gentoo.org about building the cross toolchain for the Raspberry Pi.

Your make.conf is incomplete
Code:
#MARCH_TUNE="-march=armv4t -mtune=arm9tdmi"   #arm-softfloat-linux-uclibc
#MARCH_TUNE="-march=armv5t -mtune=xscale"   #armv5teb-softfloat-linux-gnueabi

CFLAGS="-Os -pipe ${MARCH_TUNE} -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

This almost certainly won't work but I'm not sure that it matters yet as you don't have a toolchain.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 5612
Location: ~Brussels - Belgique

PostPosted: Tue Oct 23, 2012 8:48 pm    Post subject: Reply with quote

Hello,

Try to disable the fortran USE flag.
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
njcwotx
Guru
Guru


Joined: 25 Feb 2005
Posts: 514
Location: Texas

PostPosted: Wed Oct 24, 2012 4:49 pm    Post subject: Reply with quote

unfortunately pastebin is down right now.

heres the info.

Code:
[ebuild   R   ] cross-armv6j-hardfloat-linux-gnueabi/gcc-4.5.4  USE="cxx* fortran* nls nptl openmp* (-altivec) -bootstrap -build -doc (-fixed-point) -gcj -graphite -gtk -hardened -libssp -lto -mudflap -multilib -multislot -nocxx* -nopie -nossp -objc -objc++ -objc-gc -test -vanilla"

 * IMPORTANT: 6 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.


Code:
Portage 2.1.11.9 (default/linux/x86/10.0, gcc-4.5.4, glibc-2.15-r3, 3.5.7-gentoo i686)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.5.7-gentoo-i686-Intel-R-_Core-TM-_i7_CPU_860_@_2.80GHz-with-gentoo-2.1
Timestamp of tree: Tue, 23 Oct 2012 01:00:01 +0000
distcc 3.1 i686-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p37
dev-lang/python:          2.7.3-r2, 3.1.4-r3, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl alsa apng berkdb bzip2 cairo cli cracklib cron crypt cups cxx dbus dri extensions fbcon fbcondecor fontconfig fortran gdbm gif gpm gtk hal iconv ipv6 jpeg kde libkms lm_sensors mmx modules mudflap ncurses nls nptl openmp pam pcre pdf perl png pppd python qt3support qt4 readline session sse sse2 sse3 ssl ssse3 static-libs tcpd tcpdump threads tiff truetype udev unicode vim vim-syntax x86 xa zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="vmware" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

cross-armv6j-hardfloat-linux-gnueabi/gcc-4.5.4 was built with the following:
USE="nls nocxx nptl (-altivec) -bootstrap -build -cxx -doc (-fixed-point) -fortran -gcj -graphite -gtk -hardened -libssp -lto -mudflap -multilib -multislot -nopie -nossp -objc -objc++ -objc-gc -openmp -test -vanilla"
CFLAGS="-O2 -pipe"
CXXFLAGS=""


_________________
Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting.
Back to top
View user's profile Send private message
njcwotx
Guru
Guru


Joined: 25 Feb 2005
Posts: 514
Location: Texas

PostPosted: Wed Oct 24, 2012 4:59 pm    Post subject: Reply with quote

XavierMiller wrote:
Hello,

Try to disable the fortran USE flag.

at first I thought you were just trolling since I didnt have that in my usual make.conf. Must be in the profile because I saw it in my post above, so I added -fortran to my make.conf. I restarted the crossdev and now we will see how this goes!


=*UPDATE*=
Xavier wins the Cookie! Toolchain build with -fortran. Never would have guessed that one. Sounds like someone ran into that one before :D
_________________
Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting.
Back to top
View user's profile Send private message
njcwotx
Guru
Guru


Joined: 25 Feb 2005
Posts: 514
Location: Texas

PostPosted: Wed Oct 24, 2012 5:50 pm    Post subject: Reply with quote

NeddySeagoon wrote:

You need to read wiki.gentoo.org about building the cross toolchain for the Raspberry Pi.

Your make.conf is incomplete
Code:
#MARCH_TUNE="-march=armv4t -mtune=arm9tdmi"   #arm-softfloat-linux-uclibc
#MARCH_TUNE="-march=armv5t -mtune=xscale"   #armv5teb-softfloat-linux-gnueabi

CFLAGS="-Os -pipe ${MARCH_TUNE} -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

This almost certainly won't work but I'm not sure that it matters yet as you don't have a toolchain.


I have looked at the wiki and the crossdev stuff doesnt mention the make.conf configs you mention here. Do you have a link for this?
_________________
Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32320
Location: 56N 3W

PostPosted: Wed Oct 24, 2012 8:21 pm    Post subject: Reply with quote

njcwotx,


Don't put -fortarn is your main make.conf. Some packages need a fortran compiler and yours will be removed at your next gcc update.
You might not like that. I think you can set it on a per package basis in the normal way.

The make.conf for the cross environment was incident to your post.
Notice how your CFLAGS is set to
Code:
CFLAGS="-Os -pipe -fomit-frame-pointer"
which is probably a very bad thing.

The wiki page is a good read and mentions make.conf specifically.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
njcwotx
Guru
Guru


Joined: 25 Feb 2005
Posts: 514
Location: Texas

PostPosted: Wed Oct 24, 2012 9:38 pm    Post subject: Reply with quote

the make.conf in the article refers to /etc/portage/make.conf, but I am compiling on an i686 host. wouldn't that also effect compiles for that system?

since that is the make file for a virtual machine, shouldn't that make file be the one in /usr/armv6j-hardfloat-linux-gnueabi/etc/portage/make.conf ?

the make.conf on the pi is as it shows in the wiki. I had read through that before.
_________________
Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting.
Back to top
View user's profile Send private message
njcwotx
Guru
Guru


Joined: 25 Feb 2005
Posts: 514
Location: Texas

PostPosted: Wed Oct 24, 2012 10:45 pm    Post subject: Reply with quote

======== BRAIN REBOOT ===============
Ok I probably need to reclarify....

I did go through the article mentioned. the /etc/portage/make.conf in the article is the one on the SD card in the pi. I do have a booting pi, its running the downloaded kernel files from raspberry pi site. I was trying to setup the toolchain so I could emerge new packages from it using distcc.

I am able to emerge and compile on the pi itself.

however, on the running rasberry pi, I have 2 files....

/etc/make.conf
Code:
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard"
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="armv6j-hardfloat-linux-gnueabi"
FEATURES="distcc"
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard"
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="armv6j-hardfloat-linux-gnueabi"
FEATURES="distcc"
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard"
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="armv6j-hardfloat-linux-gnueabi"
FEATURES="distcc"


and from my tooling around with distcc I ended up with this...
/etc/portage/make.conf
Code:
FEATURES="distcc"


Does the /etc/portage/make.conf with the single line wipe out the effect of /etc/make.conf or just override the FEATURES line only and keep the other values.

=== ALSO ===
with all the different things going on, it gets hard to keep up with what folder and which server the make.conf file is being referenced!

The make.conf listed above showed up when I crossdev'd the armv6j toolchain and its on my 'server' I am crosscompiling on (eventually being a distcc host). its in /usr/armv6j-hardfloat-linux-gnueabi/etc/portage/make.conf. I suppose I will have to modify that one as well in one way or another....

After this. I will revisit the original article and use crossdev to rebuild the kernel on the SD card before I remove it from the host I created it on.

== PS ==
i got the -fortran out of make.conf. I had thought about that after I ran the toolchain build. next time ill preface with USE="-fortran" or something like that.
_________________
Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32320
Location: 56N 3W

PostPosted: Thu Oct 25, 2012 7:05 pm    Post subject: Reply with quote

njcwotx,

cross distcc is the way to go, using pump mode.

If you cross build packages on your i686 host for the Pi, they may produce some odd errors when you try to run them.
The problem is that thereal ARM and the cross environment call the dynamic linker bu different names, so you need a new symlink on the Pi to get cross compiled dynamicaly linked packages to work.

roy@Pi_Net ~ $ ls -l /lib/ld*
-rwxr-xr-x 1 root root 130148 Sep 6 21:05 /lib/ld-2.15.so
lrwxrwxrwx 1 root root 10 Sep 6 21:10 /lib/ld-linux-armhf.so.3 -> ld-2.15.so
lrwxrwxrwx 1 root root 10 Sep 6 22:04 /lib/ld-linux.so.3 -> ld-2.15.so

I use an ~amd64 as a helper.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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