Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 254655 - sys-devel/gcc: libstdc++.so.6: version `GLIBCXX_3.4.9' not found error after downgrading 4.2.2->4.1.2
Summary: sys-devel/gcc: libstdc++.so.6: version `GLIBCXX_3.4.9' not found error after ...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-12 17:49 UTC by Nao Nakashima
Modified: 2009-01-13 22:27 UTC (History)
0 users

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


Attachments
This script should help to find such packages (fix_glibcxx_3.4.9.sh,5.95 KB, text/plain)
2009-01-13 22:27 UTC, Nao Nakashima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nao Nakashima 2009-01-12 17:49:40 UTC
I`m just downgraded from gcc-4.2.2 to gcc-4.1.2, selected it as a default compiler and when I try to start some programs like nmap, amarok, avidemux, blender and others I get error:
_binaryname_: /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by _binaryname_)

I tried to use fix_libtool_files.sh and revdep-rebuild
$ sudo fix_libtool_files.sh 4.2.2
$ sudo revdep-rebuild
but none of them fixes error.

Then I remerged all non-working packages and now they works!
But I spent a lot of time to figure out what I need to remerge and why I need to done this.

Below are some commands that I execute to find error:
--------------------------------
nao@nao ~  $ ldd `which nmap`
/usr/bin/nmap: /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /usr/bin/nmap)
	linux-gate.so.1 =>  (0xffffe000)
	libpcre.so.0 => /usr/X11R6/lib/libpcre.so.0 (0xb7f7a000)
	libpcap.so.1 => /usr/X11R6/lib/libpcap.so.1 (0xb7f4b000)
	libssl.so.0.9.8 => /usr/X11R6/lib/libssl.so.0.9.8 (0xb7f08000)
	libcrypto.so.0.9.8 => /usr/X11R6/lib/libcrypto.so.0.9.8 (0xb7de4000)
	libdl.so.2 => /lib/libdl.so.2 (0xb7daf000)
	libstdc++.so.6 => /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libstdc++.so.6 (0xb7cc7000)
	libm.so.6 => /lib/libm.so.6 (0xb7ca3000)
	libgcc_s.so.1 => /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libgcc_s.so.1 (0xb7c97000)
	libc.so.6 => /lib/libc.so.6 (0xb7b60000)
	libz.so.1 => /lib/libz.so.1 (0xb7b4d000)
	libbz2.so.1 => /lib/libbz2.so.1 (0xb7b3c000)
	/lib/ld-linux.so.2 (0xb7fab000)
nao@nao ~  $ objdump -p `which nmap` | grep GLIBCXX
    0x02297f89 0x00 14 GLIBCXX_3.4.9
    0x08922974 0x00 04 GLIBCXX_3.4
nao@nao ~  $ nm -D /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libstdc++.so.6 | grep GLIBCXX
00000000 A GLIBCXX_3.4
00000000 A GLIBCXX_3.4.1
00000000 A GLIBCXX_3.4.2
00000000 A GLIBCXX_3.4.3
00000000 A GLIBCXX_3.4.4
00000000 A GLIBCXX_3.4.5
00000000 A GLIBCXX_3.4.6
00000000 A GLIBCXX_3.4.7
00000000 A GLIBCXX_3.4.8
nao@nao ~  $ nm -D /usr/lib/gcc/i686-pc-linux-gnu/4.2.2/libstdc++.so.6 | grep GLIBCXX
00000000 A GLIBCXX_3.4
00000000 A GLIBCXX_3.4.1
00000000 A GLIBCXX_3.4.2
00000000 A GLIBCXX_3.4.3
00000000 A GLIBCXX_3.4.4
00000000 A GLIBCXX_3.4.5
00000000 A GLIBCXX_3.4.6
00000000 A GLIBCXX_3.4.7
00000000 A GLIBCXX_3.4.8
00000000 A GLIBCXX_3.4.9
--------------------------------

GLIBCXX_3.4.9 is only in 4.2.2, but not in 4.1.2 version of libstdc++.so
Thats a problem. (I`m not a programmer and I`m only know that it named "symbols")

Sorry for my bad english:(

Reproducible: Always

Steps to Reproduce:
1. emerge sys-devel/gcc-4.2.2 and compile all packages with it
2. emerge sys-devel/gcc-4.1.2 and select it as default compiler with gcc-config
3. try running some applications like nmap, amarok, cmake and many others

Actual Results:  
binaryname: /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by binaryname)

Expected Results:  
Maybe there must be some kind of script that fixes this bug (like fix_libtool_files.sh) or this must be integrated in revdep-rebuild

command for finding and remerging broken packages

$ find /bin /sbin /usr/bin /usr/sbin  | while read FILE; do readelf -V $FILE 2>/dev/null | grep -q GLIBCXX_3.4.9 && echo $FILE ;done | qfile -Cqef- | uniq | awk '{print "="$1}' | xargs sudo emerge -1v

emerge --info
Portage 2.1.6.4 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.26-gentoo-r4 i686)
=================================================================
System uname: Linux-2.6.26-gentoo-r4-i686-AMD_Athlon-tm-_XP_2500+-with-glibc2.0
Timestamp of tree: Sat, 10 Jan 2009 17:30:01 +0000
distcc 3.0 i686-pc-linux-gnu [disabled]
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r1, 2.1.6-r1
dev-lang/python:     2.4.4-r15, 2.5.2-r8
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.1-r1
sys-apps/sandbox:    1.3.2
sys-devel/autoconf:  2.13, 2.63
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.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.28-r1
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.0/env /usr/kde/4.0/share/config /usr/kde/4.0/shutdown /usr/share/config /var/bind /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/init.d/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/rmt /etc/sandbox.d /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="digest distlocks fixpackages 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="en_US.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1"
LINGUAS="en ru"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="-v --progress --delete --delete-after --recursive  --links --safe-links --perms --times --compress --force --stats --timeout=900 --exclude='/distfiles' --exclude='/local' --exclude='/packages' --filter=H_**/files/digest-* --whole-file"
PORTAGE_TMPDIR="/mnt/hd_80/tmp/portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/portage /usr/portage/local/layman/sunrise /usr/portage/local/layman/latest-released /usr/portage/local/layman/roslin /usr/portage/local/layman/initng /usr/portage/local/layman/ion /usr/portage/local/layman/zugaina /usr/portage/local/layman/akoya /usr/portage/local/layman/mozilla /usr/portage/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X aac aalib acl alsa apache2 bash-completion bindist bzip2 cdr cli cracklib crypt dbus dga dio directfb dri dvd dvdr dvdread enca encode expat fbcon ffmpeg flac ftp gdbm gif gpm gtk gtk2 hal iconv icq isdnlog jabber jpeg maildir matroska memlimit midi mime mmx mmxext mozilla mp3 mpeg mplayer mudflap ncurses nls nptl nptlonly ogg oggvorbis opengl openmp pam pcre perl png pppd profile python qt readline reflection session sharedmem sockets sox spell spl srt sse ssl subtitles svga sysfs tcpd theora tiff truetype unicode usb userlocales vorbis win32codecs x264 x86 xattr xine xml xorg xv xvid zlib" ALSA_CARDS="intel8x0" 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="access auth auth_dbm auth_anon auth_digest alias file-cache echo filter unique_id authz_host charset-lite cache disk-cache mem-cache ext-filter case_filter case-filter-in deflate mime-magic cern-meta expires headers usertrack unique-id proxy proxy-connect proxy-ftp proxy-http info include cgi cgid dav dav-fs vhost-alias speling rewrite log_config logio env setenvif mime status autoindex asis negotiation dir imap actions userdir so auth_basic authn_dbm authz_groupfile authz_owner authz_user authn_alias authn_anon authn_dbd authn_default authn_file authz_dbm authz_default cern_meta charset_lite dav_fs dav_lock dbd disk_cache dumpio ext_filter file_cache ident imagemap log_forensic mem_cache mime_magic proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http substitute version vhost_alias apache2_mpms_event apache2_mpms_itk apache2_mpms_peruser apache2_mpms_prefork apache2_mpms_worker" ELIBC="glibc" INITNG_PLUGINS="also bash_launcher chdir chroot conflict cpout critical ctrlaltdel daemon_clean debug_commands envparser find fmon fstat history idleprobe initctl interactive iparser last limit lockfile logfile netdev netprobe ngc4 ngcs nge pause provide reload renice rlparser simple_launcher stcmd stdout suid syncron syslog sysreq unneeded usplash" INPUT_DEVICES="keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ru" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 SpanKY gentoo-dev 2009-01-13 21:16:17 UTC
guess you shouldnt have done that
Comment 2 Nao Nakashima 2009-01-13 22:27:30 UTC
Created attachment 178424 [details]
This script should help to find such packages

I wrote this script to help find such broken packages.
Steal some code from revdep-rebuild;)