From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Tue Jun 05 2007 - 10:00:17 CDT

On Sun, 27 May 2007, Francesco Pietra wrote:

hi francesco,

sorry for the delay. work is currently piling up
and the reply to your mail buried deep in my
drafts folder.

FP> Axel, thanks. Here what you asked:
FP> francesco_at_deb32:~$ ldd /usr/local/lib/vmd/vmd_LINUX
FP> linux-gate.so.1 => (0xffffe000)
FP> libGL.so.1 => /usr/lib/libGL.so.1 (0xb7efb000)
FP> libGLU.so.1 => /usr/lib/libGLU.so.1
FP> (0xb7e7c000)
FP> libpthread.so.0 =>
FP> /lib/tls/i686/cmov/libpthread.so.0 (0xb7e6a000)
FP> libX11.so.6 => /usr/lib/libX11.so.6
FP> (0xb7d7e000)
FP> libXft.so.2 => /usr/lib/libXft.so.2
FP> (0xb7d6b000)
FP> libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2
FP> (0xb7d66000)
FP> libutil.so.1 =>
FP> /lib/tls/i686/cmov/libutil.so.1 (0xb7d62000)
FP> libstdc++.so.5 => not found

now this is strange.

FP> libm.so.6 => /lib/tls/i686/cmov/libm.so.6
FP> (0xb7d3d000)
FP> libgcc_s.so.1 => /lib/libgcc_s.so.1
FP> (0xb7d32000)
FP> libc.so.6 => /lib/tls/i686/cmov/libc.so.6
FP> (0xb7c01000)
FP> libXext.so.6 => /usr/lib/libXext.so.6
FP> (0xb7bf2000)
FP> libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1
FP> (0xb7bed000)
FP> libdrm.so.2 => /usr/lib/libdrm.so.2
FP> (0xb7be6000)
FP> libstdc++.so.6 => /usr/lib/libstdc++.so.6
FP> (0xb7b01000)
FP> /lib/ld-linux.so.2 (0xb7f74000)
FP> libXau.so.6 => /usr/lib/libXau.so.6
FP> (0xb7afe000)
FP> libXdmcp.so.6 => /usr/lib/libXdmcp.so.6
FP> (0xb7af8000)
FP> libfontconfig.so.1 =>
FP> /usr/lib/libfontconfig.so.1 (0xb7acd000)
FP> libfreetype.so.6 => /usr/lib/libfreetype.so.6
FP> (0xb7a63000)
FP> libz.so.1 => /usr/lib/libz.so.1 (0xb7a4f000)
FP> libXrender.so.1 => /usr/lib/libXrender.so.1
FP> (0xb7a47000)
FP> libexpat.so.1 => /usr/lib/libexpat.so.1
FP> (0xb7a27000)
FP> francesco_at_deb32:~$
FP>
FP> yah, listdc++.so.6

having both libstdc++.so.6 and libstdc++.so.5 does not mean
there is a problem. i have that on fedora core 6 as well.

F
FP> Therefore, please see also:
FP>
FP> francesco_at_deb32:~$ apt-file search libstdc++.so.6
FP> lib64stdc++6: usr/lib64/libstdc++.so.6
FP> lib64stdc++6: usr/lib64/libstdc++.so.6.0.8
FP> lib64stdc++6-4.1-dbg:

wait. why do you list x86_64 libraries here. is
your machine 32-bit or 64-bit? what does 'uname -a' say?
i suggest you check where your libstdc++.so.5
really points to, and why your dynamic linker
(not VMD!) decided to drop it.

FP> usr/lib/debug/usr/lib64/libstdc++.so.6.0.8
FP> libstdc++6: usr/lib/libstdc++.so.6
FP> libstdc++6: usr/lib/libstdc++.so.6.0.8
FP> libstdc++6-4.1-dbg: usr/lib/debug/libstdc++.so.6
FP> libstdc++6-4.1-dbg: usr/lib/debug/libstdc++.so.6.0.8
FP> libstdc++6-4.1-dbg:
FP> usr/lib/debug/usr/lib/libstdc++.so.6.0.8
FP> libstdc++6-dbg: usr/lib/debug/libstdc++.so.6
FP> libstdc++6-dbg: usr/lib/debug/libstdc++.so.6.0.3
FP> libstdc++6-dbg: usr/lib64/debug/libstdc++.so.6
FP> libstdc++6-dbg: usr/lib64/debug/libstdc++.so.6.0.3
FP> francesco_at_deb32:~$
FP>
FP> and
FP>
FP> francesco_at_deb32:~$ apt-file search libstdc++.so.5

where does this 'apt-file' tool search?
local or the repository?

if you look closely, you'll see that your machine has
multiple versions of some compiler/libc related
libraries installed. this is due to some incompatible
changes in the linux dynamical linker (you cannot
blame VMD for it. john already links all libraries
statically, that do not break from doing so). mainly
because the initial design for the dynamical linker
was incomplete when glibc2 aka libc6 was released
and the changes in the c++ runtime made it even worse.
when using distributions with locally compiled binaries
that is usually not a problem, since everything is
consistent. but when you using binaries compiled on
other platforms and _also_ dynamic linking of plugins
at runtime, all hell can break lose. not to mention
that the NSS subsystem is always dynamically loaded
and that with a static binary, you don't even have
the compatibility layer that dynamical linking gives
you.

there are a number of webpages commenting on this problem, e.g.:
http://www.cs.wisc.edu/~psilord/blog/3.html

john has probably a few more references at hand
commenting on this madness. if he would build on
a newer machine. the resulting binary would be
even less compatible.

cheers,
   axel.

FP> libstdc++5: usr/lib/libstdc++.so.5
FP> libstdc++5: usr/lib/libstdc++.so.5.0.7
FP> libstdc++5-3.3-dbg: usr/lib/debug/libstdc++.so.5
FP> libstdc++5-3.3-dbg: usr/lib/debug/libstdc++.so.5.0.7
FP> francesco_at_deb32:~$

FP> (I had run 'apt-file update' before; linux debian i386
FP> etch)
FP>
FP> --- Axel Kohlmeyer <akohlmey_at_cmm.chem.upenn.edu>
FP> wrote:
FP>
FP> > On Sat, 26 May 2007, Francesco Pietra wrote:
FP> >
FP> > FP> Not solved entirely:
FP> > FP> francesco_at_deb32:~$ /usr/local/bin/vmd
FP> > FP> [1] 5960
FP> > FP> francesco_at_deb32:~$ /usr/local/bin/vmd -dispdev
FP> > text
FP> > FP> /usr/local/lib/vmd/vmd_LINUX: error while
FP> > loading
FP> > FP> shared libraries: libstdc++.so.5: cannot open
FP> > shared
FP> > FP> object file: No such file or directory
FP> >
FP> > now this is looking serious. however, it does not
FP> > directly
FP> > mean, that libstdc++.so.5 is the offender, but a
FP> > library
FP> > that it depends on.
FP> >
FP> > please try:
FP> > ldd /usr/local/lib/vmd/vmd_LINUX
FP> >
FP> > and report the output. it should be something
FP> > similar to:
FP> > [akohlmey_at_zero akohlmey]$ ldd
FP> > /home/akohlmey/lib/vmd-185/vmd_LINUX
FP> > libGL.so.1 => /usr/X11R6/lib/libGL.so.1
FP> > (0x40026000)
FP> > libGLU.so.1 => /usr/X11R6/lib/libGLU.so.1
FP> > (0x40091000)
FP> > libpthread.so.0 => /lib/i686/libpthread.so.0
FP> > (0x4010e000)
FP> > libX11.so.6 => /usr/X11R6/lib/libX11.so.6
FP> > (0x4015e000)
FP> > libXft.so.2 => /usr/X11R6/lib/libXft.so.2
FP> > (0x4023d000)
FP> > libdl.so.2 => /lib/libdl.so.2 (0x4024f000)
FP> > libutil.so.1 => /lib/libutil.so.1
FP> > (0x40253000)
FP> > libstdc++.so.5 => /usr/lib/libstdc++.so.5
FP> > (0x40257000)
FP> > libm.so.6 => /lib/i686/libm.so.6
FP> > (0x4030a000)
FP> > libgcc_s.so.1 => /lib/libgcc_s.so.1
FP> > (0x4032c000)
FP> > libc.so.6 => /lib/i686/libc.so.6
FP> > (0x40334000)
FP> > libXext.so.6 => /usr/X11R6/lib/libXext.so.6
FP> > (0x4046d000)
FP> > /lib/ld-linux.so.2 => /lib/ld-linux.so.2
FP> > (0x40000000)
FP> > libXrender.so.1 =>
FP> > /usr/X11R6/lib/libXrender.so.1 (0x4047b000)
FP> > libfontconfig.so.1 =>
FP> > /usr/lib/libfontconfig.so.1 (0x40484000)
FP> > libexpat.so.0 => /usr/lib/libexpat.so.0
FP> > (0x404a9000)
FP> > libfreetype.so.6 =>
FP> > /usr/lib/libfreetype.so.6 (0x404c9000)
FP> >
FP> >
FP> > ciao,
FP> > axel.
FP> >
FP> > FP> francesco_at_deb32:~$
FP> > FP>
FP> > FP> It does not find libstdc++.so.5, which actually
FP> > is at
FP> >
FP> > please don't get confused, the shared linker on
FP> > linux is not
FP> > always very obvious in its error message.
FP> >
FP> > ciao,
FP> > axel.
FP> >
FP> > FP>
FP> > FP> /usr/lib/libstdc++.so.5
FP> > FP> /usr/lib/libstdc++.so.5.0.7
FP> > FP> /usr/lib/debug/libstdc++.so.5
FP> > FP> /usr/lib/debug/libstdc++.so.5.0.7
FP> > FP>
FP> > FP> Where to make a link to /usr/lib/libstdc++.so.5?
FP> > FP>
FP> > FP>
FP> >
FP> > --
FP> >
FP> =======================================================================
FP> > Axel Kohlmeyer akohlmey_at_cmm.chem.upenn.edu
FP> > http://www.cmm.upenn.edu
FP> > Center for Molecular Modeling -- University
FP> > of Pennsylvania
FP> > Department of Chemistry, 231 S.34th Street,
FP> > Philadelphia, PA 19104-6323
FP> > tel: 1-215-898-1582, fax: 1-215-573-6233,
FP> > office-tel: 1-215-898-5425
FP> >
FP> =======================================================================
FP> > If you make something idiot-proof, the universe
FP> > creates a better idiot.
FP> >
FP> >
FP>
FP>
FP>
FP>
FP> ____________________________________________________________________________________Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out.
FP> http://answers.yahoo.com/dir/?link=list&sid=396545433
FP>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.