[C++] Relocation error on i686 when using lists on g++ 3.4.0
llewelly@xmission.com
llewelly@xmission.com
Mon Jun 28 17:49:00 GMT 2004
Asfand Yar Qazi <email@asfandyar.cjb.net> writes:
> Hi,
>
> 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.
More information about the Gcc-help
mailing list