Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 458020

Summary: [toolchain overlay] sys-libs/glibc-2.6.1 does not compile with up to date gcc and binutils (via crossdev)
Product: Gentoo Linux Reporter: Daniel Scharrer <daniel>
Component: [OLD] Core systemAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED WONTFIX    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: binutils-bad-version-checks.patch
binutils-elf-begin.patch
make-mixed-implicit-normal-rules.patch
sed-bad-version-regexp.patch
x86-fnstsw.patch

Description Daniel Scharrer 2013-02-17 18:47:01 UTC
Compilation fails mostly due to configure/makefile issues (see attached patches). For x86, there are more issues - even with the attached patches (one is x86-specific), glibc would not build with stable gcc.

Reproducible: Always

Steps to Reproduce:
1. crossdev --glibc 2.6.1 -t <whatever>
Actual Results:  
:(

Expected Results:  
:)

The attached patches fix all the issues I encountered, except for x86 where I needed <=cross-*/gcc-4.5 (4.6 and 4.7 didn't work).

It would be great if those patches could be added to the overlay.

Info for the host:
$ emerge --info
Portage 2.2.0_alpha163 (default/linux/amd64/13.0, gcc-4.6.3, glibc-2.16.0, 3.6.11-gentoo x86_64)
=================================================================
System uname: Linux-3.6.11-gentoo-x86_64-AMD_Phenom-tm-_9750_Quad-Core_Processor-with-gentoo-2.2
KiB Mem:     8181272 total,   1993496 free
KiB Swap:    8316924 total,   8316924 free
Timestamp of tree: Fri, 15 Feb 2013 06:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p42
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.10.2-r2::kde
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.13.1
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.3.6-r1, 4.4.7, 4.5.4, 4.6.3, 4.7.2, 4.8.0_pre9999::toolchain
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo local-repo kde toolchain hasufell gamerlay games arx-libertatis
Installed sets: @kdeadmin-4.10, @kdeartwork-4.10, @kdebase-4.10, @kdeedu-4.10, @kdegames-4.10, @kdegraphics-4.10, @kdenetwork-4.10, @kdeutils-4.10, @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -O2 -march=amdfam10 -ggdb -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/polkit-1/actions /usr/share/themes/oxygen-gtk/gtk-3.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -O2 -march=amdfam10 -ggdb -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS=" -j5"
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 /var/lib/layman/kde /var/lib/layman/toolchain /var/lib/layman/hasufell /var/lib/layman/gamerlay /var/lib/layman/games /home/dscharrer/pro/gentoo"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X X11 acl alsa amd64 bash-completion berkdb bzip2 cli consolekit cracklib crypt cxx dbus dri fortran gdbm gpm iconv ipv6 j2k jpeg2k kde kde4 lm_sensors mmx mmxext modules mudflap multilib ncurses nls nptl openexr opengl openmp pam pch pcre pgo png poliicykit qt qt4 readline sdl semantic-desktop session sse sse2 sse3 ssl ssse3 tcpd threads truetype udev unicode v4l v4l2 x11 xgl xv zlib" ABI_X86="64" 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="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="krita" CAMERAS="canon directory ptp2 template" 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" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby18 ruby19" SANE_BACKENDS="hp*" USERLAND="GNU" VIDEO_CARDS="fglrx" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Daniel Scharrer 2013-02-17 18:48:01 UTC
Created attachment 339170 [details, diff]
binutils-bad-version-checks.patch
Comment 2 Daniel Scharrer 2013-02-17 18:48:23 UTC
Created attachment 339172 [details, diff]
binutils-elf-begin.patch
Comment 3 Daniel Scharrer 2013-02-17 18:48:38 UTC
Created attachment 339174 [details, diff]
make-mixed-implicit-normal-rules.patch
Comment 4 Daniel Scharrer 2013-02-17 18:48:54 UTC
Created attachment 339176 [details, diff]
sed-bad-version-regexp.patch
Comment 5 Daniel Scharrer 2013-02-17 18:49:10 UTC
Created attachment 339178 [details, diff]
x86-fnstsw.patch
Comment 6 Daniel Scharrer 2013-02-17 18:51:14 UTC
Forgot to mention, the target values I tried are armv6j-hardfloat-linux-gnueabi and x86_64-bindist-linux-gnu targets (both work with the attached patches), cross-i686-bindist-linux-gnu (works only when also using an older gcc cross compiler).
Comment 7 SpanKY gentoo-dev 2013-02-18 04:43:58 UTC
yes, there are a lot of fixes that'll need backporting.  i suspect you only found the obvious ones.  i'm not sure this is something we want to maintain.