Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Upgrading your system to gcc 3.4(.4)
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 12, 13, 14, 15  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Akaihiryuu
l33t
l33t


Joined: 08 May 2003
Posts: 794
Location: Columbus, OH

PostPosted: Sat Jan 14, 2006 11:23 pm    Post subject: Reply with quote

That's really odd...emerge -e world for me definitely recompiled everything. Maybe your world file got messed somehow? Try running emaint --check world. On a side note, I followed the "slower" upgrade path...the one that involved emerge -e system ; emerge -e world, did it on 3 systems with no problems. However, it turns out that with gcc-3.4.4 and a c3-2 architecture, alsa-driver won't compile (not even the latest ~x86 version). It only happens when the toolchain has been compiled with -march=c3-2...at least k6-3 and athlon-xp work. This does not indicate a problem with the gcc upgrade, it apparently happens on all c3-2 machines using gcc-3.4.4. A bug report has been filed: https://bugs.gentoo.org/show_bug.cgi?id=117801
Back to top
View user's profile Send private message
Buddha001
Tux's lil' helper
Tux's lil' helper


Joined: 24 Nov 2005
Posts: 76

PostPosted: Sat Jan 14, 2006 11:33 pm    Post subject: Reply with quote

Well, I went in and manually added some packages to my world file that I know I have installed, but even then it only gets to about 569 packages out of some 700 I believe I have installed (as per Kuroo). Also, does one need to recompile the kernel after doing this whole thing? Beginning to wonder if it was really worth it or not...
Back to top
View user's profile Send private message
Akaihiryuu
l33t
l33t


Joined: 08 May 2003
Posts: 794
Location: Columbus, OH

PostPosted: Sun Jan 15, 2006 12:33 am    Post subject: Reply with quote

I recompiled my kernel...I'm not 100% sure if it's necessary or not, but I do know that gcc 3.4 is not binary compatible with gcc 3.3, so if everything isn't recompiled some things are going to break.
Back to top
View user's profile Send private message
acfreeman
n00b
n00b


Joined: 27 Feb 2005
Posts: 41
Location: UK

PostPosted: Sun Jan 15, 2006 5:31 am    Post subject: Reply with quote

Hi all,

I'm having some problems with emerge -e system on gcc-3.4
I tried to upgrade my system from 3.3 by the following method:
Code:

emerge gcc binutils coreutils libstdc++-v3
gcc-config i686-pc-linux-gnu-3.4.4
source /etc/profile
emerge -e system


Then I got some "undefined reference"-like problems at the compilation of libraries. (Unfortunatelly, I can't reproduce it with 3.4.4 and paste the details here at the moment for saving my resume info of the present broken emerge -e system, but I can post the current output of emerge -e system by gcc-3.4.5 which also gives similar linking problems)

I tried to run fix_libtool_files.sh, revdep-rebuild and later on I upgraded to gcc-3.4.5, then emerge -e system again, but I'm still getting problems like "undefined reference", presently for arts.

The output is too long so I just hosted here:
http://pastebin.com/506346

Code:
laptop tony # emerge info
Portage 2.0.53 (default-linux/x86/2005.1, gcc-3.4.5, glibc-2.3.5-r2, 2.6.14-gentoo-r2 i686)
=================================================================
System uname: 2.6.14-gentoo-r2 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz
Gentoo Base System version 1.6.13
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
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
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -Os -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -Os -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distcc distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://mir.zyrianes.net/gentoo/ http://194.117.143.70 http://194.117.143.71 ftp://194.117.143.70/mirrors/gentoo"
LINGUAS="gb hu"
MAKEOPTS="-j5 -s"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://portage/gentoo-portage"
USE="X a52 accessibility alsa apm arts artswrappersuid asterisk audiofile avi bash-completion berkdb bitmap-fonts bluetooth bzip2 cdr chroot crypt cups curl custom-cflags directfb divx4linux dlloader doc dri dts dvd dvdread eds emboss encode exif expat fam fbcon ffmpeg flac flash fluidsynth font-server foomaticdb fortran freetype gd gdbm gif glut gpm gtk gtk2 hal idn ieee1394 imagemagick imlib irda java javascript jpeg jpeg2k kde kqemu lcms ldap libg++ libwww mad mhash mikmod mjpeg mmx mng motif mp3 mpeg mplayer ncurses network nfs nls nojoystick nptl odbc ogg oggvorbis openal openexr opengl pam pascal pcmcia pcre pdflib perl png python qt quicktime rdesktop readline real rtc scanner sdk sdl sms softmmu spell sql sqlite sse sse2 ssl subversion svg symlink tcpd tetex tga theora threads tidy tiff truetype truetype-fonts type1-fonts udev unicode usb vcd video_cards_radeon vorbis win32codecs wmf x86 xanim xml xml2 xmms xprint xv xvid yv12 zlib linguas_gb linguas_hu userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY


I'm hasitating to switch gcc profile back to 3.4.4, but I'd like to ask other people, before I risk a bad decision. :oops:

Thanks for any suggestion :)

PS: oh yes, I also tried to compile 'em without distcc and ccache


Last edited by acfreeman on Mon Jan 16, 2006 8:20 pm; edited 2 times in total
Back to top
View user's profile Send private message
rickj
Guru
Guru


Joined: 06 Feb 2003
Posts: 427
Location: Calgary, Alberta, Canada

PostPosted: Sun Jan 15, 2006 6:49 pm    Post subject: missing library Reply with quote

I just started an upgrade on a system which was installed with 2005.1. Apparently it installed a 386 version of the compiler, because after emerging the compiler and running gcc-config I see:

Code:

fawkes zoe # gcc-config -l
 [1] i386-pc-linux-gnu-3.3.6
 [2] i386-pc-linux-gnu-3.3.6-hardened
 [3] i386-pc-linux-gnu-3.3.6-hardenednopie
 [4] i386-pc-linux-gnu-3.3.6-hardenednopiessp
 [5] i386-pc-linux-gnu-3.3.6-hardenednossp
 [6] i686-pc-linux-gnu-3.4.4 *
 [7] i686-pc-linux-gnu-3.4.4-hardened
 [8] i686-pc-linux-gnu-3.4.4-hardenednopie
 [9] i686-pc-linux-gnu-3.4.4-hardenednopiessp
 [10] i686-pc-linux-gnu-3.4.4-hardenednossp


Bu now I can't proceed, because emerge can't start python:

Code:

fawkes zoe # emerge --oneshot -av libtool
/usr/bin/python: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory


Anyone know where I should go from here?
Back to top
View user's profile Send private message
yaneurabeya
Veteran
Veteran


Joined: 13 May 2004
Posts: 1754
Location: Seattle

PostPosted: Sun Jan 15, 2006 10:22 pm    Post subject: Reply with quote

rickj:
The CHOST variable attached to the compiler does not matter. Just make sure to select the full string for your new compiler with gcc-config, and you *should* be fine, ie

Code:
gcc-config i686-pc-linux-gnu-3.4.4


Don't forget to run source /etc/profile afterwords.

If you need to, switch back to 3.3.6 and recompile gcc and libstdc++-3 using i386 as a host string. There really isn't any performance benefit to have i386 over i686 in your CHOST string.

acfreeman:
Those are a lot of undefined references to your C++ compiler...
Back to top
View user's profile Send private message
yaneurabeya
Veteran
Veteran


Joined: 13 May 2004
Posts: 1754
Location: Seattle

PostPosted: Sun Jan 15, 2006 10:23 pm    Post subject: Reply with quote

Buddha001 wrote:
Well, I went in and manually added some packages to my world file that I know I have installed, but even then it only gets to about 569 packages out of some 700 I believe I have installed (as per Kuroo). Also, does one need to recompile the kernel after doing this whole thing? Beginning to wonder if it was really worth it or not...


It's a good idea since there were a number of performance enhancements moving from gcc 3.3.x to 3.4.x in terms of speed and optimization. I sure noticed the benefits back when I used gcc 3.4.x after moving to 3.3.x. Now I run 4.0.2, but I think that's a bit too recent for most to consider switching to ;).

Akaihiryuu wrote:
I recompiled my kernel...I'm not 100% sure if it's necessary or not, but I do know that gcc 3.4 is not binary compatible with gcc 3.3, so if everything isn't recompiled some things are going to break.


You only need to recompile things with your kernel that link against your kernel, ie nvidia-kernel, alsa-driver, etc.
Back to top
View user's profile Send private message
rickj
Guru
Guru


Joined: 06 Feb 2003
Posts: 427
Location: Calgary, Alberta, Canada

PostPosted: Sun Jan 15, 2006 10:54 pm    Post subject: Reply with quote

Thanks yaneurabeya, what I actually did after the emerge was:
Code:

fawkes zoe # gcc-config i686-pc-linux-gnu-3.4.4
 * Switching native-compiler to i686-pc-linux-gnu-3.4.4 ...              [ ok ]

 * If you intend to use the gcc from the new profile in an already
 * running shell, please remember to do:

 *   # source /etc/profile
fawkes zoe # source /etc/profile
fawkes zoe # gcc -v
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/specs
Configured with: /var/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.4.4 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.4 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.4/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.4/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libmudflap --disable-libgcj --enable-languages=c,c++,f77 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)
fawkes zoe # gcc-config -l
 [1] i386-pc-linux-gnu-3.3.6
 [2] i386-pc-linux-gnu-3.3.6-hardened
 [3] i386-pc-linux-gnu-3.3.6-hardenednopie
 [4] i386-pc-linux-gnu-3.3.6-hardenednopiessp
 [5] i386-pc-linux-gnu-3.3.6-hardenednossp
 [6] i686-pc-linux-gnu-3.4.4 *
 [7] i686-pc-linux-gnu-3.4.4-hardened
 [8] i686-pc-linux-gnu-3.4.4-hardenednopie
 [9] i686-pc-linux-gnu-3.4.4-hardenednopiessp
 [10] i686-pc-linux-gnu-3.4.4-hardenednossp
fawkes zoe # emerge --oneshot -av libtool
/usr/bin/python: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

which I think is what you recommend.

I think the problem is that the gcc-config has prematurely removed the linkages for packages compiled with the older gcc.
Code:

fawkes zoe # ls -l /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.6/libstdc++*
-rw-r--r--  1 root root 1540798 Sep 20 11:04 /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.6/libstdc++.a
-rwxr-xr-x  1 root root     969 Sep 20 11:04 /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.6/libstdc++.la
lrwxrwxrwx  1 root root      18 Sep 20 11:04 /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.6/libstdc++.so -> libstdc++.so.5.0.7
lrwxrwxrwx  1 root root      18 Sep 20 11:04 /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.6/libstdc++.so.5 -> libstdc++.so.5.0.7
-rwxr-xr-x  1 root root  958973 Sep 20 11:04 /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.6/libstdc++.so.5.0.7
-rw-r--r--  1 root root 1625362 Sep 20 11:04 /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.6/libstdc++_pic.a
fawkes zoe # ls -l /usr/lib/gcc-lib/i686-pc-linux-gnu/3.4.4/libstdc++*
ls: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.4.4/libstdc++*: No such file or directory
fawkes zoe # ls -l /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++*
-rw-r--r--  1 root root 1702092 Jan 15 00:48 /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.a
-rwxr-xr-x  1 root root     881 Jan 15 00:48 /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.la
lrwxrwxrwx  1 root root      18 Jan 15 00:49 /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so -> libstdc++.so.6.0.3
lrwxrwxrwx  1 root root      18 Jan 15 00:49 /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6 -> libstdc++.so.6.0.3
-rwxr-xr-x  1 root root  830684 Jan 15 00:48 /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6.0.3
-rw-r--r--  1 root root 1798526 Jan 15 00:48 /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++_pic.a
fawkes zoe #   

shows that no libstdc++.so.5 exists in the new compiler. Presumably anything compiled under gcc-3.3.6 (everything, at present) should still link to its own libraries.

This problem has not occured during previous updates. Has something changed in gcc-config?
Back to top
View user's profile Send private message
eyeL
Tux's lil' helper
Tux's lil' helper


Joined: 13 Nov 2005
Posts: 82
Location: Missouri

PostPosted: Mon Jan 16, 2006 7:54 pm    Post subject: Reply with quote

after you set your gcc to use that one, why don't you just

emerge -P gcc, to get rid of the stuff you aren't using?
_________________
[theNPA - down for updates] | [Adopt an unanswered post]
gentoo 2005.1 [lazy] - gcc 4.1.1
Back to top
View user's profile Send private message
rickj
Guru
Guru


Joined: 06 Feb 2003
Posts: 427
Location: Calgary, Alberta, Canada

PostPosted: Mon Jan 16, 2006 8:26 pm    Post subject: Reply with quote

Well, at the moment I can't emerge at all, so the question hardly arises....

At present all my stuff is compiled with the previous compiler, so I would suspect it should link to its own libraries. I would not expect to be able to remove the old compiler until everything has been recompiled, and indeed that's the order the upgrade guide suggests.

I suspect the answer may lie in

https://forums.gentoo.org/viewtopic.php?t=145439

so I'll try it this evening, when I'm back at the system in question.
Back to top
View user's profile Send private message
rickj
Guru
Guru


Joined: 06 Feb 2003
Posts: 427
Location: Calgary, Alberta, Canada

PostPosted: Tue Jan 17, 2006 1:13 am    Post subject: Reply with quote

The above post does not seem to help. The famous one-liner does not work in this case, because the libraries have moved from:

Code:

/usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.6/libstdc++.so.5

to
Code:

/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6

I wonder if the change from gcc-lib to gcc in this string is not upsetting other scripts too.

My /etc/ld.so.conf contains the line:
Code:

/usr/lib/gcc/i686-pc-linux-gnu/3.4.4

so anything which depends on this should be ok, but apparently python is hard-coded to libstdc++.so.5 instead of libstdc++.so, and this is doing me in.

Is there any way I can wriggle out of this corner, short of re-installing the whole system?
Back to top
View user's profile Send private message
jvprat
n00b
n00b


Joined: 19 Jun 2004
Posts: 10

PostPosted: Tue Jan 17, 2006 1:29 am    Post subject: Reply with quote

Hello,

I've got a problem since I updated to gcc-3.4. At first I didn't follow the migration guide strictly. After solving some other issues, I'm now trying to follow the migration guide, but I can't even do "emerge -e system", since some packages like aspell, ffmpeg and xorg-x11 fail to build. I hope I can still fix it ;)

For example, this is what I get when I try to emerge aspell:

Code:
Making all in examples
make[1]: Entering directory `/var/tmp/portage/aspell-0.50.5-r4/work/aspell-0.50.5/examples'
if i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../common -I../interfaces/cc/    -march=athlon-xp -O2 -pipe -MT example-c.o -MD -MP -MF ".deps/example-c.Tpo" -c -o example-c.o example-c.c; \
then mv -f ".deps/example-c.Tpo" ".deps/example-c.Po"; else rm -f ".deps/example-c.Tpo"; exit 1; fi
/bin/sh ../libtool --mode=link i686-pc-linux-gnu-gcc  -march=athlon-xp -O2 -pipe  -lgpm -o example-c  example-c.o ../lib/libaspell.la
mkdir .libs
i686-pc-linux-gnu-gcc -march=athlon-xp -O2 -pipe -o .libs/example-c example-c.o  -lgpm ../lib/.libs/libaspell.so
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `std::_List_node_base::swap(std::_List_node_base&, std::_List_node_base&)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `__cxa_bad_typeid@CXXABI_1.3'
../lib/.libs/libaspell.so: undefined reference to `std::_List_node_base::transfer(std::_List_node_base*, std::_List_node_base*)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `std::istrstream::istrstream(char const*)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `operator delete(void*)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::rfind(char, unsigned int) const@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned int)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_mutate(unsigned int, unsigned int, unsigned int)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `__cxa_begin_catch@CXXABI_1.3'
../lib/.libs/libaspell.so: undefined reference to `std::__throw_length_error(char const*)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `std::istrstream::~istrstream()@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `__dynamic_cast@CXXABI_1.3'
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `vtable for __cxxabiv1::__vmi_class_type_info@CXXABI_1.3'
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, unsigned int, std::allocator<char> const&)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `operator delete[](void*)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `__cxa_rethrow@CXXABI_1.3'
../lib/.libs/libaspell.so: undefined reference to `__gnu_cxx::__exchange_and_add(int volatile*, int)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_destroy(std::allocator<char> const&)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `std::_List_node_base::hook(std::_List_node_base*)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `operator new[](unsigned int)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `operator new(unsigned int)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `__cxa_pure_virtual@CXXABI_1.3'
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char, unsigned int) const@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `vtable for __cxxabiv1::__si_class_type_info@CXXABI_1.3'
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_max_size@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `std::_List_node_base::unhook()@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_leak_hard()@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `vtable for __cxxabiv1::__class_type_info@CXXABI_1.3'
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `__gxx_personality_v0@CXXABI_1.3'
../lib/.libs/libaspell.so: undefined reference to `std::basic_istream<char, std::char_traits<char> >& std::operator>><char, std::char_traits<char>, std::allocator<char> >(std::basic_istream<char, std::char_traits<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::replace(unsigned int, unsigned int, char const*, unsigned int)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `__cxa_end_catch@CXXABI_1.3'
../lib/.libs/libaspell.so: undefined reference to `std::__throw_out_of_range(char const*)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@GLIBCXX_3.4'
../lib/.libs/libaspell.so: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::resize(unsigned int, char)@GLIBCXX_3.4'
collect2: ld returned 1 exit status
make[1]: *** [example-c] Error 1
make[1]: Leaving directory `/var/tmp/portage/aspell-0.50.5-r4/work/aspell-0.50.5/examples'
make: *** [all-recursive] Error 1

!!! ERROR: app-text/aspell-0.50.5-r4 failed.
!!! Function src_compile, Line 39, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.


This is the output of my emerge info:

Code:
Portage 2.0.53 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r2, 2.6.15 i686)
=================================================================
System uname: 2.6.15 i686 AMD Turion(tm) 64 Mobile Technology ML-28
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
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
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="ca_ES@euro"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow X Xaw3d a52 aac aalib accessibility acl acpi alsa apm artworkextra audiofile avi bash-completion bitmap-fonts bluetooth bmp bonobo bzip2 calendar canvas cdparanoia cdr chm cpdflib cpudetection crypt cscope ctype cups curl curlwrappers dbus dbx dga dio divx4linux doc dv dvd dvdr dvdread eds effects emboss encode ethereal examples exif expat fam fbcon ffmpeg firefox flac flash foomaticdb fortran freetype ftp gcj gd gdbm geoip gif glitz glut gmp gnome gnutls gphoto2 gpm graphviz gstreamer gtk gtk2 gtkhtml guile hal iconv idn ieee1394 imagemagick imap imlib ipv6 jabber jack java javascript jikes jpeg junit lcms ldap libcaca libg++ libwww lirc lm_sensors m17n-lib mad matroska mbox mcal mikmod mime ming mmap mmx mng mono motif mozilla mozsvg mp3 mpeg msn nas ncurses netboot nfs nls nsplugin offensive ogg oggvorbis openal opengl osc oss pam pcmcia pcntl pcre pda pdf pdflib perl plugin png portaudio posix ppds profile python quicktime radius readline real recode samba sasl sdl sharedmem shorten simplexml slang smartcard sndfile snmp soap sockets socks5 sox speex spell spreadsheet sqlite sse sse2 ssl svg sysvipc szip tcltk tcpd tetex tga theora threads tidy tiff truetype truetype-fonts type1-fonts udev usb v4l v4l2 vcd videos vorbis webservices wifi win32codecs wmf wxwindows xface xine xinerama xml2 xmlrpc xmms xosd xpm xprint xsl xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTDIR_OVERLAY


I've tracked down the issue to the fix-relink patch applied when elibtoolizing. Disabling it, aspell compiles well. From my limited knowledge, I think xorg-x11 may fail because of the same patch (I haven't tried to recompile xorg without it).

Do you have some idea on how to fix it or why does it happen?

Nerdanel's fix about copying libstdc++.la to /usr/lib didn't solve it (I had no libstdc++.la in /usr/lib before).

Thanks in advance! :)
Back to top
View user's profile Send private message
yaneurabeya
Veteran
Veteran


Joined: 13 May 2004
Posts: 1754
Location: Seattle

PostPosted: Tue Jan 17, 2006 6:25 am    Post subject: Reply with quote

rickj wrote:
The above post does not seem to help. The famous one-liner does not work in this case, because the libraries have moved from:

Code:

/usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.6/libstdc++.so.5

to
Code:

/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6

I wonder if the change from gcc-lib to gcc in this string is not upsetting other scripts too.

My /etc/ld.so.conf contains the line:
Code:

/usr/lib/gcc/i686-pc-linux-gnu/3.4.4

so anything which depends on this should be ok, but apparently python is hard-coded to libstdc++.so.5 instead of libstdc++.so, and this is doing me in.

Is there any way I can wriggle out of this corner, short of re-installing the whole system?


You didn't do the multislot gcc setup, did you >_<. I always keep multislot going, just because I have to switch back and forth from 4.0.2 to 3.4.3 sometimes, but in this case it really may have helped to have multislot...

Then again I also mask my packages (gcc in particular), so I won't have stability issues with later releases. I once had emerge stop short of running ldconfig and that totally fubared my system.

Best thing to do? Grab a packages CD, reboot into the packages CD, install the old version of gcc and libstdc++, and do it that way. Pondering about how to fix it may serve to cost you more time than it's worth.

jwprat:
Looks like your system doesn't know that basic C libs exist, or your a *PATH is fubared or something, or maybe you didn't run /etc/profile, I have no idea. Weird error, not recognizing standard C files that are a part of glibc as existent.
Back to top
View user's profile Send private message
jvprat
n00b
n00b


Joined: 19 Jun 2004
Posts: 10

PostPosted: Tue Jan 17, 2006 1:44 pm    Post subject: Reply with quote

Hi again,

I just had to ask it on the forums to find the answer myself :oops:

I found this:

Code:
# locate libstdc++.so.6
/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6
/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6.0.3
/usr/lib/libstdc++.so.6


A duplicate lib?
/usr/lib/libstdc++.so.6 is a link to libstdc++-libc6.2-2.so.3, which is a link to libstdc++-3-libc6.2-2-2.10.0.so. I just removed /usr/lib/libstdc++.so.6 and now everything is working fine :D (I've just emerged arts and aspell, I still have to try xorg, but I hope it won't fail).

I wanted to know how did that link get there, but it seems it appeared from nothing:

Code:
# equery b /usr/lib/libstdc\\+\\+.*
[ Searching for file(s) /usr/lib/libstdc\+\+.* in *... ]
sys-libs/libstdc++-v3-3.3.4 (/usr/lib/libstdc++-v3/libstdc++.so.5.0.6)
sys-libs/libstdc++-v3-3.3.4 (/usr/lib/libstdc++-v3)
sys-libs/libstdc++-v3-3.3.4 (/usr/lib/libstdc++-v3/libstdc++.so.5 -> libstdc++.so.5.0.6)
sys-libs/lib-compat-1.4 (/usr/lib/libstdc++.so.2.8 -> libstdc++.so.2.8.0)
sys-libs/lib-compat-1.4 (/usr/lib/libstdc++.so.2.7.2.8)
sys-libs/lib-compat-1.4 (/usr/lib/libstdc++.so.2.8.0)
sys-libs/lib-compat-1.4 (/usr/lib/libstdc++-3-libc6.2-2-2.10.0.so)
sys-libs/lib-compat-1.4 (/usr/lib/libstdc++-libc6.2-2.so.3 -> libstdc++-3-libc6.2-2-2.10.0.so)
sys-libs/lib-compat-1.4 (/usr/lib/libstdc++-2-libc6.1-1-2.9.0.so)
sys-libs/lib-compat-1.4 (/usr/lib/libstdc++-libc6.1-1.so.2 -> libstdc++-2-libc6.1-1-2.9.0.so)
sys-libs/lib-compat-1.4 (/usr/lib/libstdc++.so.2.9 -> libstdc++.so.2.9.0)
sys-libs/lib-compat-1.4 (/usr/lib/libstdc++.so.2.9.0)
sys-libs/lib-compat-1.4 (/usr/lib/libstdc++.so.2.7.2 -> libstdc++.so.2.7.2.8)


Does someone have an idea on how could it get there? (I'm just curious, since I didn't create it manually)

I just hope it helps someone with the same issue.

Now I can follow with the standard migration guide :)

See you!
Back to top
View user's profile Send private message
rickj
Guru
Guru


Joined: 06 Feb 2003
Posts: 427
Location: Calgary, Alberta, Canada

PostPosted: Tue Jan 17, 2006 4:16 pm    Post subject: Reply with quote

Now I'm even more confused. I emerged the new gcc, but did not uninstall the old one. My impression was that both now existed on the system. In fact, the message at the end of the gcc-3.4.4 emerge specifically stated that the present gcc configuration seemed valid, and would not be changed; it advised the use of gcc-config to change to the new compiler. The upgrade guide seems to recommend that the old gcc should not be removed until everything has been recompiled using the new one. Does this constitute a slotted setup? If not, how do I build one?

I tried the fix of merely changng back to gcc-3.3.6 using gcc-config, and that appeared to succeed, at least as far as gcc-config -l was concerned, but my python was still dead, still unable to find its library.

A gentoo system without python is remarkably impaired. I suspect I could fix the linkages with python-updater, but of course it's a python script.
Back to top
View user's profile Send private message
yaneurabeya
Veteran
Veteran


Joined: 13 May 2004
Posts: 1754
Location: Seattle

PostPosted: Wed Jan 18, 2006 12:16 am    Post subject: Reply with quote

I just use slots for multiple compilers so all the libs and junk remain in tact even after I emerge a different version of gcc. But, in this case the slotting would allow you to have multiple compilers, and then would have allowed you enough time and testing to determine whether or not unmerging the old version was really a wise idea.
Back to top
View user's profile Send private message
rickj
Guru
Guru


Joined: 06 Feb 2003
Posts: 427
Location: Calgary, Alberta, Canada

PostPosted: Wed Jan 18, 2006 3:22 am    Post subject: Reply with quote

Well, I seem to have squirmed out of the trap.

env-update, a python script, was dead, but I was still able to hand-edit /etc/ld.so.conf
(which one should never normally do) and add the old libraries:
Code:

# ld.so.conf autogenerated by env-update; make all changes to
# contents of /etc/env.d directory
/usr/local/lib
/usr/lib/opengl/xorg-x11/lib
/usr/i686-pc-linux-gnu/lib
/usr/lib/gcc/i686-pc-linux-gnu/3.4.4
# Next line added by hand
/usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.6
/usr/lib/mozilla-firefox
/usr/lib/mozilla
/usr/lib

now I ran ldconfig, and behold, python was resuscitated. A quick non-destructive test of emerge using
Code:

emerge info

showed that it was up again. With this done I could do the next stage of the compiler update, namely:
Code:

emerge --oneshot -av libtool

Naturally, the ebuild finished up by doing an env-update, which re-generated the /etc/ld.so.conf without my change,
so the hand-edit and ldconfig had to be repeated. Then the next stage of the update:
Code:

emerge --oneshot sys-libs/libstdc++-v3

fixed everything permanently.

Thanks to all for the helpful suggestions which set me on the right track.
Back to top
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1816

PostPosted: Sat Jan 21, 2006 5:47 pm    Post subject: Reply with quote

Question: I was trying to remember if I had any packages other than the sun java that need to be downloaded manually. Is ther any way I can determine this ahead of time? I don't want to have things barf part way through.

Tom
Back to top
View user's profile Send private message
acfreeman
n00b
n00b


Joined: 27 Feb 2005
Posts: 41
Location: UK

PostPosted: Sun Jan 22, 2006 10:26 am    Post subject: Reply with quote

yaneurabeya wrote:
acfreeman:
Those are a lot of undefined references to your C++ compiler...

Well, I don't know what that is exactly, but I'm sure it is a pain in the .. :D

I'd just like to ask that, which package contains command "locate"? Because I tried to run that just like someone did above and It doesn't exist. Any idea?

Oh, yes this is my equery:
Code:
# equery b /usr/lib/libstdc\\+\\+.*
[ Searching for file(s) /usr/lib/libstdc\+\+.* in *... ]
sys-libs/lib-compat-1.4 (/usr/lib/libstdc++.so.2.8 -> libstdc++.so.2.8.0)
sys-libs/lib-compat-1.4 (/usr/lib/libstdc++.so.2.7.2.8)
sys-libs/lib-compat-1.4 (/usr/lib/libstdc++.so.2.9 -> libstdc++.so.2.9.0)
sys-libs/lib-compat-1.4 (/usr/lib/libstdc++-3-libc6.2-2-2.10.0.so)
sys-libs/lib-compat-1.4 (/usr/lib/libstdc++-libc6.2-2.so.3 -> libstdc++-3-libc6.2-2-2.10.0.so)
sys-libs/lib-compat-1.4 (/usr/lib/libstdc++-2-libc6.1-1-2.9.0.so)
sys-libs/lib-compat-1.4 (/usr/lib/libstdc++-libc6.1-1.so.2 -> libstdc++-2-libc6.1-1-2.9.0.so)
sys-libs/lib-compat-1.4 (/usr/lib/libstdc++.so.2.8.0)
sys-libs/lib-compat-1.4 (/usr/lib/libstdc++.so.2.9.0)
sys-libs/lib-compat-1.4 (/usr/lib/libstdc++.so.2.7.2 -> libstdc++.so.2.7.2.8)


thanks :)
Back to top
View user's profile Send private message
thomasvk
Guru
Guru


Joined: 19 Mar 2005
Posts: 597

PostPosted: Sun Jan 22, 2006 10:59 am    Post subject: Reply with quote

tld wrote:
Question: I was trying to remember if I had any packages other than the sun java that need to be downloaded manually. Is ther any way I can determine this ahead of time? I don't want to have things barf part way through.

Tom

If you do
Code:
emerge -epv world
it will display and 'F' besides the 'N' in the first column or 'f' if it's already downloaded:
Code:
[ebuild  N f  ] dev-java/sun-jdk-1.4.2.10-r2  +X +alsa +browserplugin -doc -examples -jce +mozilla +nsplugin 0 kB

I think you can then check with something like:
Code:
emerge -epv world | grep '[ebuild  N F  ]'

But perhaps someone knows a better method, because this doesn't take slotting and perhaps other flags in the [ebuild ...] in account.

@acfreeman:
'locate' is in the 'slocate' package I think.
Back to top
View user's profile Send private message
acfreeman
n00b
n00b


Joined: 27 Feb 2005
Posts: 41
Location: UK

PostPosted: Sun Jan 22, 2006 11:18 am    Post subject: Reply with quote

t0maz wrote:
@acfreeman:
'locate' is in the 'slocate' package I think.

Thanks t0maz :)

I ran "locate libstdc++.so.6" and I haven't output from. I also tried for libstdc++.so.5 but the problem is just the same.

Could anybody help me, please? :cry:
Back to top
View user's profile Send private message
thomasvk
Guru
Guru


Joined: 19 Mar 2005
Posts: 597

PostPosted: Sun Jan 22, 2006 11:26 am    Post subject: Reply with quote

locate searches in some kind of index rather than on the filesystem. Have you ran 'updatedb' to create the search index? If you want to search on the file system use 'find' ('find -iname libstdc++.so.6' for example).
Back to top
View user's profile Send private message
acfreeman
n00b
n00b


Joined: 27 Feb 2005
Posts: 41
Location: UK

PostPosted: Sun Jan 22, 2006 11:53 am    Post subject: Reply with quote

t0maz wrote:
locate searches in some kind of index rather than on the filesystem. Have you ran 'updatedb' to create the search index? If you want to search on the file system use 'find' ('find -iname libstdc++.so.6' for example).


Thanks, I have run it:
Code:
# updatedb
# locate libstdc++.so.6
/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6
/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6.0.3


But, unfortunately I'm still getting this:
Code:
tabbed_values_test.o: In function `main':
tabbed_values_test.cxx:(.text+0x42): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage'
tabbed_values_test.cxx:(.text+0x53): undefined reference to `__gnu_cxx::__exchange_and_add(int volatile*, int)'
tabbed_values_test.cxx:(.text+0x78): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage'
tabbed_values_test.cxx:(.text+0x85): undefined reference to `__gnu_cxx::__exchange_and_add(int volatile*, int)'
tabbed_values_test.cxx:(.text+0xdc): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage'
tabbed_values_test.cxx:(.text+0xed): undefined reference to `__gnu_cxx::__exchange_and_add(int volatile*, int)'
tabbed_values_test.cxx:(.text+0x112): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage'
tabbed_values_test.cxx:(.text+0x11f): undefined reference to `__gnu_cxx::__exchange_and_add(int volatile*, int)'
tabbed_values_test.cxx:(.text+0x176): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage'
tabbed_values_test.cxx:(.text+0x187): undefined reference to `__gnu_cxx::__exchange_and_add(int volatile*, int)'


Any idea? :?

thanks again :)


Last edited by acfreeman on Sun Jan 22, 2006 8:47 pm; edited 1 time in total
Back to top
View user's profile Send private message
tld
Veteran
Veteran


Joined: 09 Dec 2003
Posts: 1816

PostPosted: Sun Jan 22, 2006 4:44 pm    Post subject: Reply with quote

t0maz wrote:

Code:
emerge -epv world | grep '[ebuild  N F  ]'



Thanks! I just simply grepped that emerge command for F and was able to verify that I had no packages that required manual download.

Tom
Back to top
View user's profile Send private message
acfreeman
n00b
n00b


Joined: 27 Feb 2005
Posts: 41
Location: UK

PostPosted: Mon Jan 23, 2006 8:55 am    Post subject: Reply with quote

I found out something else too. This "undefined references" problem comes for _certain_ c++ written packages. For example, there is no compiling failure for kdelibs, but giving warnings:
Code:
Making all in dcopidlng
Making all in dcopidl2cpp
Making all in client
libtool: link: warning: library `/usr/lib/libstdc++.la' was moved.
libtool: link: warning: library `/usr/lib/libstdc++.la' was moved.
libtool: link: warning: library `/usr/lib/libstdc++.la' was moved.
libtool: link: warning: library `/usr/lib/libstdc++.la' was moved.
libtool: link: warning: library `/usr/lib/libstdc++.la' was moved.
libtool: link: warning: library `/usr/lib/libstdc++.la' was moved.
libtool: link: warning: library `/usr/lib/libstdc++.la' was moved.
libtool: link: warning: library `/usr/lib/libstdc++.la' was moved.


It's strange because it is keep compiling without interuption.
Does it take us closer to the solution of the "undefined references" problem above?

Please, somebody help me. :(
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page Previous  1, 2, 3 ... 12, 13, 14, 15  Next
Page 13 of 15

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum