The emerge failed to build glibc-2.8_p20080602 when are configuring GLIBC for nptl, giving the following error: checking for -z relro option... no configure: error: linker with -z relro support required * * ERROR: sys-libs/glibc-2.8_p20080602 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 3463: Called eblit-run 'src_compile' * environment, line 1128: Called eblit-glibc-src_compile * src_compile.eblit, line 173: Called src_compile * environment, line 3463: Called eblit-run 'src_compile' * environment, line 1128: Called eblit-glibc-src_compile * src_compile.eblit, line 181: Called toolchain-glibc_src_compile * src_compile.eblit, line 120: Called glibc_do_configure 'nptl' * src_compile.eblit, line 97: Called die Reproducible: Always Steps to Reproduce: 1.emerge -v glibc Actual Results: checking for -z relro option... no configure: error: linker with -z relro support required * * ERROR: sys-libs/glibc-2.8_p20080602 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 3463: Called eblit-run 'src_compile' * environment, line 1128: Called eblit-glibc-src_compile * src_compile.eblit, line 173: Called src_compile * environment, line 3463: Called eblit-run 'src_compile' * environment, line 1128: Called eblit-glibc-src_compile * src_compile.eblit, line 181: Called toolchain-glibc_src_compile * src_compile.eblit, line 120: Called glibc_do_configure 'nptl' * src_compile.eblit, line 97: Called die Expected Results: Linker with -z relro should be supported. An topic open on forum with fully details: http://forums.gentoo.org/viewtopic-t-700008.html
Created attachment 160258 [details] log of emerge cat /var/tmp/portage/sys-libs/glibc-2.8_p20080602/work/build-*-*-nptl/config.log
Portage 2.2_rc1 (default/linux/amd64/2008.0, gcc-4.2.3, glibc-2.7-r2, 2.6.25-gentoo-r4 x86_64) ================================================================= System uname: Linux-2.6.25-gentoo-r4-x86_64-AMD_Opteron-tm-_Processor_842-with-glibc2.2.5 Timestamp of tree: Thu, 10 Jul 2008 21:36:02 +0000 app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7, 2.1.6-r1 dev-lang/python: 2.4.4-r7, 2.5.2-r5 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.2.5 sys-apps/sandbox: 1.2.18.1-r3 sys-devel/autoconf: 2.13, 2.62-r1 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.1-r1 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 2.2.4 virtual/os-headers: 2.6.25-r4 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="pt_PT@euro" LC_ALL="pt_PT@euro" LDFLAGS="-Wl,-O1" LINGUAS="pt" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" 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" PORTDIR_OVERLAY=" " SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowext a52 aac aalib accessibility acl alsa amd64 apache2 arts berkdb browserplugin bzip2 cli cracklib crypt cups dbus dri dvd dvdr dvdread ffmpeg flac footmaticdb fortran gdbm gimp gimpprint glitz gnutella gphoto2 gpm gtk hal iconv isdnlog java kqemu ldap lm_sensors logitech-mouse mad midi mmx mmxext mozilla mp3 mpeg mudflap multilib mysql ncurses nls nptl nptlonly nsplugin nvidia ogg opengl openmp pam parport pcre pda pdf perl png ppds pppd pt python qt3support readline reflection samba scanner session spl sqlite sse sse2 ssl svg symlink tcpd theora tk unicode usb utempter vorbis xml xorg 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 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 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" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pt" USERLAND="GNU" VIDEO_CARDS="apm ark dummy fbdev glint nv nvidia vga" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
post the output of `x86_64-pc-linux-gnu-gcc -v --help` as an attachment
Created attachment 163572 [details] x86_64-pc-linux-gnu-gcc -v --help
that looks like it should have worked ... i'd suggest you try upgrading to gcc-4.3.2 and see if that helps
(In reply to comment #5) > that looks like it should have worked ... i'd suggest you try upgrading to > gcc-4.3.2 and see if that helps > Happens the same thing! Here is the my new emerge --info. Portage 2.1.6_rc2 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.7-r2, 2.6.27-gentoo-r4 x86_64) ================================================================= System uname: Linux-2.6.27-gentoo-r4-x86_64-Dual-Core_AMD_Opteron-tm-_Processor_2210-with-glibc2.2.5 Timestamp of tree: Fri, 28 Nov 2008 01:31:01 +0000 ccache version 2.4 [disabled] app-shells/bash: 3.2_p48 dev-java/java-config: 1.3.7-r1, 2.1.6-r1 dev-lang/python: 2.5.2-r8 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 dev-util/cmake: 2.4.8 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.3.0-r1 sys-apps/sandbox: 1.2.18.1-r3 sys-devel/autoconf: 2.13, 2.63 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.19 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="pt_PT@euro" LC_ALL="pt_PT@euro" LDFLAGS="-Wl,-O1" LINGUAS="pt" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" 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" PORTDIR_OVERLAY=" " SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowext X a52 aac aalib accessibility acl alsa amd64 apache2 arts berkdb browserplugin bzip2 cli cracklib crypt cups dbus dri dvd dvdr dvdread ffmpeg flac footmaticdb fortran gdbm gimp gimpprint glitz gnutella gphoto2 gpm gtk hal iconv isdnlog java kqemu ldap lm_sensors logitech-mouse mad midi mmx mmxext mozilla mp3 mpeg mudflap multilib mysql ncurses nls nptl nptlonly nsplugin nvidia ogg opengl openmp pam parport pcre pda pdf perl png ppds pppd pt python qt3support qt4 readline reflection samba scanner session snmp spl sqlite sse sse2 ssl svg symlink sysfs tcpd theora tk unicode usb utempter vorbis xcb xml xorg 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 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" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pt" USERLAND="GNU" VIDEO_CARDS="apm ark dummy fbdev glint vga radeon fglrx radeonhd" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Info added, still not resolver!
I've started seeing this in my catalyst stage builds. It's weird because if I try to run the command that failed, it succeeds: gcc -v --help 2>&1|grep "z relro" For some reason it fails when the configure script is running, but there's no clue what went wrong in config.log (the return value is 1 and that's all that can be seen). Anyway, as a workaround, you can add this setting to make.conf: libc_cv_z_relro=yes
presumably this stage building is on a common gentoo machine ? if so, i could take a look at it ...
It was on my desktop system at home. I'll see if I can find a stage tarball that allows me to reproduce the problem reliably (I'm not sure if I can anymore since I've been building them with libc_cv_z_relro=yes).
some problem on ia64 arch when i do: crossdev -t i686-pc-linux-gnu checking for libunwind-support in compiler... yes checking for -z nodelete option... yes checking for -z nodlopen option... yes checking for -z initfirst option... yes checking for -z relro option... no configure: error: linker with -z relro support required * * ERROR: cross-i686-pc-linux-gnu/glibc-2.9_p20081201-r2 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 3525: Called eblit-run 'src_compile' * environment, line 1196: Called eblit-glibc-src_compile * src_compile.eblit, line 161: Called toolchain-glibc_headers_compile * src_compile.eblit, line 156: Called die * The specific snippet of code: * "${S}"/configure ${myconf} || die "failed to configure glibc" * The die message: * failed to configure glibc * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/cross/i686-pc-linux-gnu/portage/cross-i686-pc-linux-gnu/glibc-2.9_p20081201-r2/temp/build.log'. * The ebuild environment file is located at '/var/tmp/cross/i686-pc-linux-gnu/portage/cross-i686-pc-linux-gnu/glibc-2.9_p20081201-r2/temp/environment'. * This ebuild is from an overlay: '/usr/local/portage/' * >>> Failed to emerge cross-i686-pc-linux-gnu/glibc-2.9_p20081201-r2, Log file: >>> '/var/tmp/cross/i686-pc-linux-gnu/portage/cross-i686-pc-linux-gnu/glibc-2.9_p20081201-r2/temp/build.log'
The problem has disappeared in my stage builds and I don't have the stages that were doing it anymore. If it happens again I'll save the stages.
After I removed libc_cv_z_relro=yes from my stage building environment, the problem came back. However, it wasn't reproducible. When I'd chroot into the that stage build just after the failure and try to rebuild glibc several times, I couldn't reproduce it. This leads me to suspect that it's triggering some kind of race condition in bash that causes it to fail sometimes and not others, depending on the timing. Now I've keyworded bash-4.0_p10-r1 and I'm using that instead of bash-3.2_p39. I've done a few cycles of stage builds and I haven't seen the relro problem since upgrading to bash-4.0_p10-r1. I'll let you know if I see it again with bash-4.x.
(In reply to comment #13) > After I removed libc_cv_z_relro=yes from my stage building environment, the > problem came back. However, it wasn't reproducible. When I'd chroot into the > that stage build just after the failure and try to rebuild glibc several times, > I couldn't reproduce it. This leads me to suspect that it's triggering some > kind of race condition in bash that causes it to fail sometimes and not others, > depending on the timing. Now I've keyworded bash-4.0_p10-r1 and I'm using that > instead of bash-3.2_p39. I've done a few cycles of stage builds and I haven't > seen the relro problem since upgrading to bash-4.0_p10-r1. I'll let you know if > I see it again with bash-4.x. > I have now bash-4.0_p10-r1 installed, and happen the same thing! All my ebuils is build for 64bits, could be that?
(In reply to comment #14) > (In reply to comment #13) > > After I removed libc_cv_z_relro=yes from my stage building environment, the > > problem came back. However, it wasn't reproducible. When I'd chroot into the > > that stage build just after the failure and try to rebuild glibc several times, > > I couldn't reproduce it. This leads me to suspect that it's triggering some > > kind of race condition in bash that causes it to fail sometimes and not others, > > depending on the timing. Now I've keyworded bash-4.0_p10-r1 and I'm using that > > instead of bash-3.2_p39. I've done a few cycles of stage builds and I haven't > > seen the relro problem since upgrading to bash-4.0_p10-r1. I'll let you know if > > I see it again with bash-4.x. > > > > I have now bash-4.0_p10-r1 installed, and happen the same thing! > All my ebuils is build for 64bits, could be that? > Sorry about the bad information. After I rebuild with bash-4.0_p10-r1, error is another: make[1]: *** [sunrpc/others] Error 2 make[1]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/glibc-2.9-20081201' make: *** [all] Error 2 * * ERROR: sys-libs/glibc-2.9_p20081201-r2 failed. * Call stack: * ebuild.sh, line 48: Called src_compile * environment, line 3619: Called eblit-run 'src_compile' * environment, line 1244: Called eblit-glibc-src_compile * src_compile.eblit, line 179: Called src_compile * environment, line 3619: Called eblit-run 'src_compile' * environment, line 1244: Called eblit-glibc-src_compile * src_compile.eblit, line 187: Called toolchain-glibc_src_compile * src_compile.eblit, line 122: Called die * The specific snippet of code: * make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed" * The die message: * make for x86 failed * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/temp/environment'. *
that has nothing to do with this bug. please search bugzilla.
I got the relro error with bash-4.0_p10-r1. I'm not sure if bash is really the problem but it seems like the most likely culprit, considering the symptoms.
this bug predates bash-4 inclusion in the tree
I just spent two days discovering that neither glibc or gcc will configure correctly if the kernel lacks a.out support. There are just a few tests in the configure scripts that compile and then attempt to execute a.out binaries. I consider this a bug from upstream, but I'd like your more educated opinions.
umm, are you sure about that ? just because the output of the file is named "a.out" does not mean it is using the a.out file format.
Well, I remember being sure at the time because adding a.out support to my kernel fixed it -- but now I can't reproduce the problem, so I'm not sure about anything.