[csw-maintainers] Determining shared object dependencies
James Lee
james at opencsw.org
Thu Dec 24 11:23:52 CET 2009
On 23/12/09, 17:10:44, Maciej "(Matchek)" Blizinski <maciej at opencsw.org>
wrote regarding [csw-maintainers] Determining shared object dependencies:
> Let's suppose there's a shared object which depends on libstdc++.so.6.
> I'd like to determine its dependencies. Unfortunately,
> libstdc++.so.6 exists in more than one place in the filesystem:
> maciej at build8s [build8s]:~ > ls -l /opt/csw/{,gcc4/}lib/libstdc++.so.6
> lrwxrwxrwx 1 root other 19 May 11 2009
> /opt/csw/gcc4/lib/libstdc++.so.6 -> libstdc++.so.6.0.10
> lrwxrwxrwx 1 root other 20 Aug 7 11:50
> /opt/csw/lib/libstdc++.so.6 -> ./libstdc++.so.6.0.3
> How am I supposed to tell which one is the right one?
The one that was used to build it.
/opt/csw/lib/libstdc++.so.6 comes with gcc3
/opt/csw/gcc4/lib/libstdc++.so.6.0.10 come with gcc4
ldd shows which will be used and served with a side dish of -s explains
why. The one that will be used isn't always right due to changes/bugs
in gcc4. Compare this output from 2 different installations:
$ ldd /opt/csw/bin/aspell
libaspell.so.15 => /opt/csw/lib/libaspell.so.15
libcurses.so.1 => /lib/libcurses.so.1
libdl.so.1 => /lib/libdl.so.1
libstdc++.so.6 => /opt/csw/gcc4/lib/libstdc++.so.6
libintl.so.3 => /opt/csw/lib/libintl.so.3
libiconv.so.2 => /opt/csw/lib/libiconv.so.2
libm.so.1 => /lib/libm.so.1
libc.so.1 => /lib/libc.so.1
libgcc_s.so.1 => /opt/csw/lib/libgcc_s.so.1
libgcc_s.so.1 (GCC_4.3.0) => (version not found)
libm.so.2 => /lib/libm.so.2
/platform/SUNW,Sun-Blade-1000/lib/libc_psr.so.1
$ ldd /opt/csw/bin/aspell
libaspell.so.15 => /opt/csw/lib/libaspell.so.15
libcurses.so.1 => /usr/lib/libcurses.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libstdc++.so.6 => /opt/csw/lib/libstdc++.so.6
libintl.so.3 => /opt/csw/lib/libintl.so.3
libiconv.so.2 => /opt/csw/lib/libiconv.so.2
libm.so.1 => /usr/lib/libm.so.1
libc.so.1 => /usr/lib/libc.so.1
libgcc_s.so.1 => /opt/csw/lib/libgcc_s.so.1
/usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1
Ref: http://www.opencsw.org/bugtrack/view.php?id=4040
More information about the maintainers
mailing list