Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 359191 - creating a crosscompiler-environment (crossdev) from x86_64 to armv7a-hardfloat-linux-gnueabi on x86_64 fails
Summary: creating a crosscompiler-environment (crossdev) from x86_64 to armv7a-hardflo...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-16 17:46 UTC by David Piegdon
Modified: 2012-03-30 19:29 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
requested logfile from crossdev: /var/log/portage/cross-armv7a-hardfloat-linux-gnueabi-info.log (cross-armv7a-hardfloat-linux-gnueabi-info.log,12.60 KB, text/plain)
2011-03-17 10:23 UTC, David Piegdon
Details
requested logfile from crossdev: /var/log/portage/cross-armv7a-hardfloat-linux-gnueabi-glibc.log (cross-armv7a-hardfloat-linux-gnueabi-glibc.log,9.01 KB, text/plain)
2011-03-17 10:24 UTC, David Piegdon
Details
config.log from glibc: /var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/glibc-2.13-r2/work/build-x86-armv7a-hardfloat-linux-gnueabi-nptl/config.log (config.log,11.99 KB, text/plain)
2011-03-17 10:25 UTC, David Piegdon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Piegdon 2011-03-16 17:46:54 UTC
inside a clean stage3-root on an x86_64, creating a crosscompiler-environment via crossdev for armv7a-hardfloat-linux-gnueabi fails. note that gcc 4.5.2 and binutils 2.21 are required because gcc pre-4.5 does not support hardfloat and older binutils create incompatible objects to a currently running system of ours. it seems like the ebuild sets the wrong CHOST (should be armv7a-hardfloat-linux-gnueabi for glibc, but is x86_64). this results in -m32 being used in configure-script, which is not defined in the arm-compiler from gcc-stage-1

Reproducible: Always

Steps to Reproduce:
1.untar stage3, install portage
2.echo -e "sys-apps/diffutils \nsys-devel/gcc \nsys-devel/binutils" > /etc/portage/package.keywords
3.emerge sync && emerge -vD system
4.crossdev --g 4.5.2 --b 2.21 armv7a-hardfloat-linux-gnueabi
Actual Results:  
binutils, kernel-headers, gcc-stage-1 are installed successfully. then glibc fails during configure. -m32 is used with the gcc-stage-1

Expected Results:  
glibc should compile, then gcc stage 2.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2011-03-16 18:13:41 UTC
1) Please paste your `emerge --info' into a comment.
2) Paste the output of `emerge -vpq sys-devel/crossdev' into a (the same) comment.
Comment 2 David Piegdon 2011-03-16 19:07:17 UTC
sorry, here are the missing things:

emerge --info ::

Portage 2.1.9.42 (default/linux/amd64/10.0, gcc-4.4.4, glibc-2.11.3-r0, 2.6.34.1 x86_64)
=================================================================
System uname: Linux-2.6.34.1-x86_64-Intel-R-_Core-TM-2_Duo_CPU_L7500_@_1.60GHz-with-gentoo-1.12.14
Timestamp of tree: Wed, 16 Mar 2011 18:30:01 +0000
app-shells/bash:     4.1_p9
dev-lang/python:     2.6.6-r2, 3.1.3-r1
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.65-r1
sys-devel/automake:  1.11.1
sys-devel/binutils:  2.21
sys-devel/gcc:       4.4.4-r2, 4.5.2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
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 --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl amd64 berkdb bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv ipv6 mmx modules mudflap multilib ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline session sse sse2 ssl sysfs tcpd unicode xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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="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" 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" 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, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

emerge -vpq sys-devel/crossdev ::

[ebuild   R   ] sys-devel/crossdev-20101011 

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


from /etc/make.conf ::


CFLAGS="-O2 -pipe"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j3"
CHOST="x86_64-pc-linux-gnu"
USE="mmx sse sse2 -X -gtk -qt -qt3 -qt4 -kde -zeroconf"
Comment 3 David Piegdon 2011-03-16 19:12:39 UTC
and of course

PORTDIR_OVERLAY="/usr/local/portage"

... i checked an earlier version that i had not yet used for staging, as i left the used version at work...
Comment 4 SpanKY gentoo-dev 2011-03-17 09:53:18 UTC
please follow the directions crossdev already gave you.  it specifically tells you what log files you must attach to your bug reports.
Comment 5 David Piegdon 2011-03-17 10:23:49 UTC
Created attachment 266239 [details]
requested logfile from crossdev: /var/log/portage/cross-armv7a-hardfloat-linux-gnueabi-info.log
Comment 6 David Piegdon 2011-03-17 10:24:58 UTC
Created attachment 266245 [details]
requested logfile from crossdev: /var/log/portage/cross-armv7a-hardfloat-linux-gnueabi-glibc.log
Comment 7 David Piegdon 2011-03-17 10:25:41 UTC
Created attachment 266247 [details]
config.log from glibc: /var/tmp/portage/cross-armv7a-hardfloat-linux-gnueabi/glibc-2.13-r2/work/build-x86-armv7a-hardfloat-linux-gnueabi-nptl/config.log
Comment 8 David Piegdon 2011-03-17 10:30:06 UTC
as you can see in th glibc.log, it is configured for
 CBUILD:  x86_64-pc-linux-gnu
 CHOST:   x86_64-pc-linux-gnu
 CTARGET: armv7a-hardfloat-linux-gnueabi
however, as far as i understand, it should be configured for CHOST=armv7a-hardfloat-linux-gnueabi as well. maybe i'm wrong there, but still, it doesn't compile because the configure tries to use -m32 (see attached config.log) with the arm-compiler. by patching the ebuild, in an experiment i forced CHOST to be armv7a... , but it still doesn't work then.
Comment 9 SpanKY gentoo-dev 2011-03-17 10:35:57 UTC
should be fixed already in crossdev-20110310
Comment 10 David Piegdon 2011-03-17 14:50:19 UTC
verified. it works with the new crossdev. sorry for the inconvenience and thanks!
Comment 11 Sheem-On Shapiro 2012-03-30 19:29:23 UTC
This is perhaps a new failure mode...  Note today's date :-)

# emerge --info
Portage 2.2.0_alpha79 (default/linux/amd64/10.0/desktop/gnome, gcc-4.6.2, glibc-2.12.2-r0, 3.2.12-gentoo_nomis-20120323.0-c329 x86_64)
=================================================================
System uname: Linux-3.2.12-gentoo_nomis-20120323.0-c329-x86_64-AMD_Phenom-tm-_II_X4_940_Processor-with-gentoo-2.0.2
Timestamp of tree: Fri, 30 Mar 2012 06:00:01 +0000
app-shells/bash:          4.1_p7
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.4.6, 2.5.4-r3, 2.6.7-r2, 2.7.2-r3, 3.1.3-r1, 3.2-r2
dev-util/cmake:           2.8.5-r2
dev-util/pkgconfig:       0.23
sys-apps/baselayout:      2.0.2
sys-apps/openrc:          0.8.2-r1
sys-apps/sandbox:         2.2
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.3, 1.11.1
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.2.4-r1, 4.3.5, 4.4.2, 4.4.3-r2, 4.4.4-r2, 4.4.5, 4.5.0, 4.5.1-r1, 4.5.2, 4.5.3-r2, 4.6.1-r1, 4.6.2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo local
Installed sets: @system
ACCEPT_KEYWORDS="amd64 x86 ~amd64 ~x86"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS=""
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/entropy /usr/lib64/fax /usr/lib64/tomoyo/conf /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /var/lib/hsqldb /var/qmail/alias /var/qmail/control /var/spool/fax/etc /var/vpopmail/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS=""
DISTDIR="/ebuild/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles metadata-transfer news noclean parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://ftp.gtlib.gatech.edu/pub/gentoo rsync://rsync.us.gentoo.org rsync://rsync3.us.gentoo.org ftp://lug.mtu.edu/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en he"
PKGDIR="/ebuild/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/ebuild/working"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/ebuild/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli colord consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam firefox flac fortran gdbm gdu gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv introspection ipv6 jpeg kde lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg mudflap multilib nautilus ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf pic png policykit ppds pppd pulseaudio qt3support qt4 readline sdl semantic-desktop session socialweb spell sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype udev unicode usb vorbis x264 xcb xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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="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 synaptics mouse kbd keyboard penmount virtualbox vmmouse void wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en he" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia virtualbox dummy fbdev fglrx nouveau nv v4l vesa" XTABLES_ADDONS="account chaos condition delude dhcpmac fuzzy geoip iface ipmark ipp2p ipv4options length2 logmark lscan pknock psd quota2 rawnat steal sysrq tarpit tee checksum dnetmap echo gradm"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Output from emerge (partial)
# crossdev -S armv7a-unknown-linux-gnueabi
--------------------------------------------------------------------------------
 * crossdev version:      20120305
 * Host Portage ARCH:     amd64
 * Target Portage ARCH:   arm
 * Target System:         armv7a-unknown-linux-gnueabi
 * Stage:                 4 (C/C++ compiler)
 * ABIs:                  default

 * binutils:              binutils-[stable]
 * gcc:                   gcc-[stable]
 * headers:               linux-headers-[stable]
 * libc:                  glibc-[stable]

 * CROSSDEV_OVERLAY:      /ebuild/overlay
 * PORT_LOGDIR:           /var/log/portage
 * PORTAGE_CONFIGROOT:    
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  
 * leaving sys-devel/binutils in /ebuild/overlay
 * leaving sys-devel/gcc in /ebuild/overlay
 * leaving sys-kernel/linux-headers in /ebuild/overlay
 * leaving sys-libs/glibc in /ebuild/overlay
 * leaving sys-devel/gdb in /ebuild/overlay
 * leaving dev-util/insight in /ebuild/overlay
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  
 * Log: /var/log/portage/cross-armv7a-unknown-linux-gnueabi-binutils.log
 * Emerging cross-binutils ...                                            [ ok ]
 * Log: /var/log/portage/cross-armv7a-unknown-linux-gnueabi-linux-headers-quick.log
 * Emerging cross-linux-headers-quick ...

 * linux-headers failed :(
 * If you file a bug, please attach the following logfiles:
 * /var/log/portage/cross-armv7a-unknown-linux-gnueabi-info.log
 * /var/log/portage/cross-armv7a-unknown-linux-gnueabi-linux-headers-quick.log.xz
 * /ebuild/working/portage/cross-armv7a-unknown-linux-gnueabi/linux-headers*/temp/linux-headers-config.logs.tar.xz



I cannot see any error message in the logs referenced above.  But here they are:
# cat /var/log/portage/cross-armv7a-unknown-linux-gnueabi-binutils.log
Calculating dependencies  ...... .... done!
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.


The next one (partial):

 UPD     include/linux/version.h
  WRAP    arch/arm/include/generated/asm/auxvec.h
  WRAP    arch/arm/include/generated/asm/bitsperlong.h
  WRAP    arch/arm/include/generated/asm/cputime.h
  WRAP    arch/arm/include/generated/asm/emergency-restart.h
  WRAP    arch/arm/include/generated/asm/errno.h
  WRAP    arch/arm/include/generated/asm/ioctl.h
  WRAP    arch/arm/include/generated/asm/irq_regs.h
  WRAP    arch/arm/include/generated/asm/kdebug.h
  WRAP    arch/arm/include/generated/asm/local.h
  WRAP    arch/arm/include/generated/asm/local64.h
  WRAP    arch/arm/include/generated/asm/percpu.h
  WRAP    arch/arm/include/generated/asm/poll.h
  WRAP    arch/arm/include/generated/asm/resource.h
  WRAP    arch/arm/include/generated/asm/sections.h
  WRAP    arch/arm/include/generated/asm/siginfo.h
  WRAP    arch/arm/include/generated/asm/sizes.h
  HOSTCC  scripts/unifdef
scripts/unifdef.c:46:23: fatal error: sys/types.h: No such file or directory
compilation terminated.
make[1]: *** [scripts/unifdef] Error 1
make: *** [__headers] Error 2
emake failed
 * ERROR: cross-armv7a-unknown-linux-gnueabi/linux-headers-3.3 failed (install phase):
 *   (no error message)

NOTICE:

# ll /usr/include/sys/types.h
-rw-r--r-- 1 root root 6.7K Feb  1  2011 /usr/include/sys/types.h

# find /usr/src/linux/include -name types.h
/usr/src/linux/include/asm-generic/types.h
/usr/src/linux/include/linux/ceph/types.h
/usr/src/linux/include/linux/sunrpc/types.h
/usr/src/linux/include/linux/types.h
/usr/src/linux/include/rxrpc/types.h

# find /usr/src/linux/include -name sys
/usr/src/linux/include/config/fb/sys
/usr/src/linux/include/config/xen/sys
/usr/src/linux/include/config/sys

# ln -s /usr/include/sys/types.h /usr/src/linux/include/config/sys

Repeated crossdev with the same error at the same place :-(