This is the mail archive of the
mailing list for the GCC project.
Re: [C++] Relocation error on i686 when using lists on g++ 3.4.0
- From: llewelly at xmission dot com
- To: Asfand Yar Qazi <email at asfandyar dot cjb dot net>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 28 Jun 2004 11:49:24 -0600
- Subject: Re: [C++] Relocation error on i686 when using lists on g++ 3.4.0
- References: <40D9A9A3.firstname.lastname@example.org>
Asfand Yar Qazi <email@example.com> writes:
> When running a g++ program on i686 that uses lists, I get the
> following error:
> relocation error: ./test/test_game: symbol
> _ZNSt15_List_node_base4hookEPS_, version GLIBCXX_3.4 not defined in
> file libstdc++.so.6 with link time reference
My first guess is that your runtime linker (see 'man ld.so') is
finding the wrong libstdc++.so.6 .
The gcc 3.4 pre-releases, gcc 3.4.0, and mainline snapshots of gcc 3.5
all build a shared library called 'libstdc++.so.6'. They are
intended to be compatible, but bugs do creep in.
$ ldd ./test/test_game
should tell you which libstdc++.so.6 is being found at runtime. If it
doesn't match the version of gcc you compiled with, you need to
muck with your LD_LIBRARY_PATH, or with ldconfig until it does.
You'll need to read the man pages for ld.so, and for ldconfig.
> GCC 3.4.0 was configured with:
> ../gcc-3.4.0/configure --prefix=/opt/gcc
> --enable-version-specific-runtime-libs --enable-__cxa_atexit
> and compiled with:
> make profiledbootstrap
> glibc version 2.2.5
> binutils version 2.14
> Its funny, because a pre-release CVS version of G++ 3.4.0 works fine.
Probably you have your ldconfig or LD_LIBRARY_PATH configured to find
the libstdc++.so.6 that came with the pre-release CVS version.