1

I have my own executable that I link to a particular version of Xerces. It also uses a bunch of other libraries, some of them not my own. When I run ldd on that executable, I see that it needs the Xerces version that I expect it to need, plus another version. I assume the other version comes from one othe other libraries I link to.

Here is the question: how do I find out which third-party library requires the older Xerces?

The environment is Linux and Solaris (my executable is compiled for both).

Arkadiy
  • 208
  • 1
  • 8

3 Answers3

1

ldd /path/to/file

works for both executables and shared libraries.

janneb
  • 3,841
  • 19
  • 22
  • Are you saying I need to apply ldd to each shared library that my executable needs? Hmm, it's a possibility... – Arkadiy Nov 08 '10 at 21:55
1
ldd <executable> | sed 's/^.*=> //' | sed 's/ (0x.*)$//' | grep mnh_tst1_main | grep -v xerces | xargs ldd 2>/dev/null | egrep "^/|xerces" | grep -B 1 xerces | less

This is what worked for me in the end. Thanks for kicking me off - I was "stuck on stupid".

Arkadiy
  • 208
  • 1
  • 8
0

Without more information on how you are linking this executable (do you have the source code or not?) it's not very easy to understand the question. I would suggest running ldd on each of the libraries your executable links to.

steabert
  • 101
  • 1