Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 135217 - gcc-config says 3.4, but programs still link against
Summary: gcc-config says 3.4, but programs still link against
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
Depends on:
Reported: 2006-06-01 17:38 UTC by mwahl
Modified: 2010-09-22 11:10 UTC (History)
1 user (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description mwahl 2006-06-01 17:38:02 UTC
Starting ghemical as a user gives following output:
Segmentation Fault

as root:
ghemical: Symbol `_ZTVSt15basic_stringbufIcSt11char_traitsIcESaIcEE' has different size in shared object, consider re-linking
Segmentation fault

The topmost packages involved in the problem:

It worked before I did some major upgrades to the latest stable gcc, glibc etc. during the last weeks, but stop working somewhere during this transition. Today I did a complete rebuild of the system with
emwrap -etsw (basically an emerge -e system && emerge -e world)
to make sure everything is ok.

emerge info has the following output:
Portage 2.0.54-r2 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r3, 2.6.16-gentoo-r7 i686)
System uname: 2.6.16-gentoo-r7 i686 Intel(R) Pentium(R) 4 CPU 2.66GHz
Gentoo Base System version 1.6.14
dev-lang/python:     2.3.5, 2.4.2
dev-python/pycrypto: [Not Present]
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
CFLAGS="-O2 -march=pentium4"
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/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4"
FEATURES="autoconfig distlocks sandbox sfperms strict"
USE="x86 X a52 alsa apache2 apm arts audiofile avi berkdb bitmap-fonts bzip2 cli crypt cups dbus dri dvd dvdread eds emboss encode esd exif expat fam foomaticdb fortran gd gdbm gif glut gmp gnome gpm gstreamer gtk gtk2 gtkhtml hal howl idn imlib isdnlog java jpeg lcms libg++ libwww mad mikmod mng motif mozilla mozsvg mp3 mpeg ncurses nls nptl ogg openbabel opengl pam pcre pdflib perl png pppd python quicktime readline reflection sdl session slang spell spl sqlite ssl symlink tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb v4l vorbis wxwindows xml xml2 xmms xorg xv zlib userland_GNU kernel_linux elibc_glibc"
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-06-02 02:29:52 UTC
Reopen w/ a backtrace.
Comment 2 mwahl 2006-06-06 15:30:47 UTC
Followed the guide. Please tell me if there is still information missing or if I have to build deeper with FEATURES="splitdebug".

Starting program: /usr/bin/ghemical
/usr/bin/ghemical: Symbol `_ZTVSt15basic_stringbufIcSt11char_traitsIcESaIcEE' has different size in shared object, consider re-linking
[Thread debugging using libthread_db enabled]
[New Thread -1228162848 (LWP 1828)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1228162848 (LWP 1828)]
0xb6d0d9a6 in std::locale::operator= () from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/
(gdb) bt
#0  0xb6d0d9a6 in std::locale::operator= () from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/
#1  0xb6d06b4f in std::ios_base::_M_init () from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/
#2  0xb6d050b1 in std::basic_ios<char, std::char_traits<char> >::init () from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/
#3  0xb7123738 in default_tables (this=0x8102428) at fstream:512
#4  0xb7124c99 in default_tables::GetInstance () at tab_mm_default.cpp:205
#5  0xb712e578 in global constructors keyed to _ZN14default_tables8instanceE () at utility.h:81
#6  0xb73e3145 in __do_global_ctors_aux () from /usr/local/lib/
#7  0xb70b9a91 in _init () from /usr/local/lib/
#8  0xb7f88a0b in call_init () from /lib/
#9  0xb7f88abd in _dl_init_internal () from /lib/
#10 0xb7f7d80f in _dl_start_user () from /lib/
Comment 3 Donnie Berkholz (RETIRED) gentoo-dev 2006-06-07 08:45:19 UTC
This looks like a problem introduced by your toolchain upgrades. See how you're still linked against rather than the .so.6?

Did you properly select the new compiler using gcc-config? I'd suggest doing that and rebuilding glibc, binutils, gcc, libghemical, ghemical again.
Comment 4 mwahl 2006-06-07 15:55:29 UTC
I checked gcc-config -l:

 [1] i686-pc-linux-gnu-3.3.6
 [2] i686-pc-linux-gnu-3.3.6-hardened
 [3] i686-pc-linux-gnu-3.3.6-hardenednopie
 [4] i686-pc-linux-gnu-3.3.6-hardenednopiessp
 [5] i686-pc-linux-gnu-3.3.6-hardenednossp
 [6] i686-pc-linux-gnu-3.4.6 *
 [7] i686-pc-linux-gnu-3.4.6-hardened
 [8] i686-pc-linux-gnu-3.4.6-hardenednopie
 [9] i686-pc-linux-gnu-3.4.6-hardenednopiessp
 [10] i686-pc-linux-gnu-3.4.6-hardenednossp

And then emerged glibc, binutils, gcc
did a "source /etc/profile" and then emerged libghemical and ghemical

Same result. Still uses, only the backtrace has some more information in the topmost layer probably due to the -ggdb rebuild of glibc. 

#8  0xb7f04a0b in call_init (l=0xb7588cd0, argc=1, argv=0xbfb0c9c4, env=0xbfb0c9cc) at dl-init.c:70
#9  0xb7f04abd in _dl_init (main_map=0xb7f0f4e8, argc=1, argv=0xbfb0c9c4, env=0xbfb0c9cc) at dl-init.c:142
#10 0xb7ef980f in _dl_start_user () at rtld.c:577
Comment 5 Donnie Berkholz (RETIRED) gentoo-dev 2006-06-07 16:25:35 UTC
This seems like it could be some sort of gcc-config problem. Programs should be linking with when you have gcc 3.4 selected, not
Comment 6 SpanKY gentoo-dev 2006-06-08 01:22:15 UTC
much more likely you have something still linked against and when you rebuilt some of the other apps, they got linked against both
Comment 7 mwahl 2006-06-08 08:38:35 UTC
(In reply to comment #6)
> much more likely you have something still linked against and
> when you rebuilt some of the other apps, they got linked against both

So what exactly is a possible solution?
emerge -e system
emerge -e system
emerge -e world
emerge -e world

Or should I use this to rebuild the toolchain and then system & world?  
When do I need to run and what does it change? I unfortuneately don't understand the whole concept with the different libstdc++ too well. Are those libstdc++ coming from glibc or from gcc? Would it help to clean/prune the old gcc 3.3.6 version still installed on my system or is this even dangerous?
thanx 10x in advance!
Comment 8 mwahl 2006-06-13 15:54:55 UTC
I did an emerge -e system && emerge -e system && emerge -e world

And I unmerged gcc-3.3.6 and reemerged libghemical. Now the backtrace changed a little, but the seg fault still persists.
  ERROR: duplicate ClassDesc detected for class DescribedClass type_info name = N2sc14DescribedClassE

Program received signal SIGABRT, Aborted.
[Switching to Thread -1305262400 (LWP 31100)]
0xffffe410 in __kernel_vsyscall ()
Current language:  auto; currently c
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb284fd3d in *__GI_raise (sig=6) at raise.c:64
#2  0xb2851353 in *__GI_abort () at abort.c:88
#3  0xb741fb65 in sc::ClassDesc::ClassDesc () from /usr/local/lib/
#4  0xb7422cf7 in __static_initialization_and_destruction_0 () from /usr/local/lib/
#5  0xb7422d52 in global constructors keyed to _ZN2sc9ClassDesc4all_E () from /usr/local/lib/
#6  0xb7446145 in __do_global_ctors_aux () from /usr/local/lib/
#7  0xb711ca91 in _init () from /usr/local/lib/
#8  0xb7fe8a0b in call_init (l=0xb766ba58, argc=1, argv=0xbf8f0ab4, env=0xbf8f0abc) at dl-init.c:70
#9  0xb7fe8abd in _dl_init (main_map=0xb7ff34e8, argc=1, argv=0xbf8f0ab4, env=0xbf8f0abc) at dl-init.c:142
#10 0xb7fdd80f in _dl_start_user () at rtld.c:577

Any other ideas?
Comment 9 Kevin F. Quinn (RETIRED) gentoo-dev 2006-06-13 22:56:19 UTC
(In reply to comment #8)
> #3  0xb741fb65 in sc::ClassDesc::ClassDesc () from
> /usr/local/lib/

/usr/local?  Surely the ebuild will be putting libghemical in /usr/lib.  /usr/local usually means you've built it manually yourself at some point.

Try removing it from /usr/local/lib
Comment 10 mwahl 2006-06-15 10:26:16 UTC
(In reply to comment #9)
> /usr/local usually means you've built it manually yourself at some point.
> Try removing it from /usr/local/lib

Shame on me!!! Yes, I built it manually before and after deleting everything libghemical* in /usr/local/lib it works fine. I even figured out I had two ghemical main programs hanging around. The first error messages with libstdc++ took me on a wrong trip. Thank you very much for your help and enlightment. Just for curiosity: Do there exist any rules or basic considerations where installed software should place its files? 
Comment 11 Donnie Berkholz (RETIRED) gentoo-dev 2006-06-15 11:26:59 UTC
Comment 12 DEMAINE Benoît-Pierre, aka DoubleHP 2010-09-22 11:10:09 UTC
The error <<has different size in shared object, consider re-linking>> can be fixed by remergint the package owning the file. See bug 338347 . The issue is not in the app, but in portage 2.2, or in revdep-rebuild.