Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 259215 - sys-libs/libstdc++-v3-3.3.6 fails to build (ld segfault)
Summary: sys-libs/libstdc++-v3-3.3.6 fails to build (ld segfault)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 258001 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-02-16 12:10 UTC by Dennis Schridde
Modified: 2009-08-18 01:01 UTC (History)
4 users (show)

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


Attachments
build.log (build.log,322.15 KB, text/plain)
2009-02-16 12:11 UTC, Dennis Schridde
Details
emerge --info (emerge-info.log,7.62 KB, text/plain)
2009-02-16 12:11 UTC, Dennis Schridde
Details
libstdc++v3-multilib-hack.patch (libstdc++v3-multilib-hack.patch,795 bytes, patch)
2009-02-16 23:41 UTC, SpanKY
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2009-02-16 12:10:19 UTC
sys-libs/libstdc++-v3-3.3.6 fails to build with this error message:

/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/xgcc -B/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc/32/libgcc.map -o 32/libgcc_s.so.1.tmp  -m32  libgcc/32/_muldi3.o libgcc/32/_negdi2.o libgcc/32/_lshrdi3.o libgcc/32/_ashldi3.o libgcc/32/_ashrdi3.o libgcc/32/_ffsdi2.o libgcc/32/_clz.o libgcc/32/_cmpdi2.o libgcc/32/_ucmpdi2.o libgcc/32/_floatdidf.o libgcc/32/_floatdisf.o libgcc/32/_fixunsdfsi.o libgcc/32/_fixunssfsi.o libgcc/32/_fixunsdfdi.o libgcc/32/_fixdfdi.o libgcc/32/_fixunssfdi.o libgcc/32/_fixsfdi.o libgcc/32/_fixxfdi.o libgcc/32/_fixunsxfdi.o libgcc/32/_floatdixf.o libgcc/32/_fixunsxfsi.o libgcc/32/_fixtfdi.o libgcc/32/_fixunstfdi.o libgcc/32/_floatditf.o libgcc/32/_clear_cache.o libgcc/32/_trampoline.o libgcc/32/__main.o libgcc/32/_exit.o libgcc/32/_absvsi2.o libgcc/32/_absvdi2.o libgcc/32/_addvsi3.o libgcc/32/_addvdi3.o libgcc/32/_subvsi3.o libgcc/32/_subvdi3.o libgcc/32/_mulvsi3.o libgcc/32/_mulvdi3.o libgcc/32/_negvsi2.o libgcc/32/_negvdi2.o libgcc/32/_ctors.o libgcc/32/_divdi3.o libgcc/32/_moddi3.o libgcc/32/_udivdi3.o libgcc/32/_umoddi3.o libgcc/32/_udiv_w_sdiv.o libgcc/32/_udivmoddi4.o  libgcc/32/unwind-dw2.o libgcc/32/unwind-dw2-fde-glibc.o libgcc/32/unwind-sjlj.o libgcc/32/unwind-c.o -lc && rm -f libgcc_s_32.so && if [ -f 32/libgcc_s.so.1 ]; then mv -f 32/libgcc_s.so.1 32/libgcc_s.so.1.backup; else true; fi && mv 32/libgcc_s.so.1.tmp 32/libgcc_s.so.1 && ln -s 32/libgcc_s.so.1 libgcc_s_32.so                                                                             
collect2: ld terminated with signal 11 [Segmentation fault]                                                                                                   
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/../lib/libc.so when searching for -lc                                                       
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/../lib/libc.a when searching for -lc                                                        
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libc.so when searching for -lc                                                              
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libc.a when searching for -lc                                                               
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/../lib/libc.so when searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/../lib/libc.a when searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/usr/lib64/../lib/crti.o' is incompatible with i386 output
/usr/x86_64-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/usr/lib64/../lib/crtn.o' is incompatible with i386 output
make[2]: *** [32/libgcc_s_32.so] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-libs/libstdc++-v3-3.3.6/work/gcc-3.3.6/gcc'

I am not sure what exactly is the underlying cause. The ld segfault, or the incompatible architecture.

(log,info attached)

Reproducible: Always
Comment 1 Dennis Schridde 2009-02-16 12:11:14 UTC
Created attachment 182225 [details]
build.log
Comment 2 Dennis Schridde 2009-02-16 12:11:27 UTC
Created attachment 182227 [details]
emerge --info
Comment 3 Adam Bowers 2009-02-16 12:54:34 UTC
Same issue for me.

Portage 2.1.6.4 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.28-gentoo-r1 x86_64)
=================================================================
System uname: Linux-2.6.28-gentoo-r1-x86_64-Intel-R-_Xeon-R-_CPU_X5460_@_3.16GHz-with-glibc2.2.5
Timestamp of tree: Mon, 16 Feb 2009 01:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.6-r1
dev-lang/python:     2.5.2-r7
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.4.8
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://open-systems.ufl.edu/mirrors/gentoo http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://gentoo.osuosl.org/ http://www.gtlib.gatech.edu/pub/gentoo "
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j8"
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi adns alsa amd64 ao apm avahi bash-completion berkdb branding bzip2 cairo caps cddb cdr cli cracklib crypt cups curl dbus dga dri dvd dvdr eds encode enscript esd exif fam ffmpeg flac gdbm gif gnome gnome-keyring gnutls gpm gstreamer gtk hal hddtemp iconv isdnlog java java5 java6 jpeg lcms libedit libnotify lm_sensors lzo mad midi mmap mmx mng mono mp3 mpeg mudflap multilib nautilus ncurses networkmanager nls nptl nptlonly nsplugin ogg openal opengl openmp pam pcre pdf perl png ppds pppd python readline reflection samba sdl session slang spell spl sse sse2 ssl startup-notification svg symlink sysfs syslog tcpd theora threads tiff truetype unicode usb vorbis wmf x264 xattr xml xorg xpm xulrunner xv zeroconf zlib" ALSA_CARDS="hda-intel" 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nv vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 4 Dennis Schridde 2009-02-16 13:05:06 UTC
I guess that means that the segfault is not related to the specific version of binutils,gcc,glibc. Maybe there is a yet undetected bug in ld which was only exposed by the libstdc++ bump.
Comment 5 Chris Ribble 2009-02-16 18:47:56 UTC
I can confirm this bug on both my amd64 and x86 systems (both running stable profile).
Comment 6 Nicola 2009-02-16 19:33:28 UTC
same here:

------------------------------------ emerge --info
Portage 2.1.6.4 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.8_p20080602-r1, 2.6.28-tuxonice-r1-gec906d4-dirty x86_64)
=================================================================
System uname: Linux-2.6.28-tuxonice-r1-gec906d4-dirty-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T7500_@_2.20GHz-with-glibc2.2.5
Timestamp of tree: Mon, 16 Feb 2009 11:10:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r1, 2.1.6-r1
dev-lang/python:     2.5.2-r7
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.3.0-r1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -fomit-frame-pointer -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/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=core2 -fomit-frame-pointer -pipe"
DISTDIR="/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo ftp://ftp.unina.it/pub/linux/distributions/gentoo"
LANG="it_IT.UTF-8"
LC_ALL="it_IT.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="it en_GB"
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="/usr/portage/local/layman/enlightenment /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 amrnb amrwb ao bash-completion berkdb bzip2 cairo cdparanoia cli cracklib crypt css cups dbus dri drm dv dvd dvdr dvdread encode exif ffmpeg flac fortran gdbm gif gpm gtk hal iconv imagemagick imlib ipv6 jack java jpeg kdehiddenvisibility laptop latex lcms lm_sensors log4j mad midi mikmod mmx mmxext mozsvg mp3 mpeg mudflap multilib musepack ncurses nls nptl nptlonly nsplugin offensive ogg opengl openmp oss pam pcre pdf perl png python rdesktop readline reflection rtc samba sdl session smp spell spl sse sse2 sse3 sse4 ssl ssse3 subversion svg sysfs tcpd tetex theora threads truetype unicode v4l v4l2 vim vim-syntax vorbis wxwindows x264 xcb xcomposite xine xml xorg xosd xpm xscreensaver xulrunner xv xvid xvmc 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" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it en_GB" USERLAND="GNU" VIDEO_CARDS="fglrx v4l radeonhd"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 7 Peter Alfredsen (RETIRED) gentoo-dev 2009-02-16 22:48:33 UTC

*** This bug has been marked as a duplicate of bug 259192 ***
Comment 8 Peter Alfredsen (RETIRED) gentoo-dev 2009-02-16 22:52:48 UTC
Premature duplicate
Comment 9 SpanKY gentoo-dev 2009-02-16 23:41:10 UTC
Created attachment 182290 [details, diff]
libstdc++v3-multilib-hack.patch

try this
Comment 10 Kenton Groombridge 2009-02-17 01:55:02 UTC
multilib hack patch worked for me.  Thanks.
Comment 11 Dennis Schridde 2009-02-17 02:18:51 UTC
That patch seems to work (though I get a ton of QA-Notices).
Interesting question to me is still: Why does ld segfault? I would assume that should never happen, just as an ICE should never happen...
Comment 12 SpanKY gentoo-dev 2009-02-17 03:27:55 UTC
binutils ld has a long standing bug where it segfaults in wrong situations.  in this case, trying to combine objects of incompatible types (32 and 64 bits).
Comment 13 Bob Shaffer 2009-02-17 15:48:30 UTC
worked for me, thanks.
Comment 14 SpanKY gentoo-dev 2009-02-17 19:25:32 UTC
*** Bug 258001 has been marked as a duplicate of this bug. ***