Re: libstdc++-libc6.2-2.so.3
On Thu, Oct 24, 2002 at 04:48:25PM -0400, Gregory Seidman wrote:
> Daniel Jacobowitz sez:
> } On Thu, Oct 24, 2002 at 04:34:07PM -0400, Gregory Seidman wrote:
> } > I am developing a program using g++ 3.2. When I added a dynamic_cast, it
> } > started segfaulting on it. In searching the web I came up with the
> } > following:
> } >
> } > http://lists.debian.org/debian-gcc/2002/debian-gcc-200205/msg00240.html
> } >
> } > It suggests that I mght be linking against two different versions of
> } > libstdc++ and, indeed, it seems I am (according to ldd). I proceeded to
> } > apt-get source --compile libglut3 and install it. That fixed the problem,
> } > but ldd gives the same output as before.
> } >
> } > I don't understand why my program seems to be linked to two versions of
> } > libstdc++. It looks like libstdc++.so.5 is the g++ 3.2 library, but there
> } > is also that libstdc++-libc6.2-2.so.3 which nothing seems to use. Can
> } > anyone explain this extraneous dependency?
> } >
> } > The output from ldd -v is below.
> }
> } Presumably something is not linking using GCC 3.2. Are you linking
> } using g++ instead of g++-3.2?
>
> Nope:
>
> % which g++
> /usr/bin/g++
> % ls -l /usr/bin/g++
> lrwxrwxrwx 1 root root 7 Sep 16 18:04 /usr/bin/g++ -> g++-3.2*
> % g++ --version
> g++ (GCC) 3.2.1 20021020 (Debian prerelease)
> Copyright (C) 2002 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> Note in the ldd -v output that *nothing*, including the executable
> itself, depends on that weird libstdc++; it's just there.
Two things to check:
- Is it really happening? Run the application and check in
/proc/<pid>/maps for the two copies of libstdc++.
- Is ldd lying? Check the libraries and app with objdump -p.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
Reply to: