1

My application runs on ubuntu 18.04.03, is linked against multiple third-party libraries, including libpng16.so. According to the stack trace, my application crashes due to a version mismatch in libpng.so:

#2  0x00007ffff08492c7 in png_error (png_ptr=0x555557f47fe0, error_message=error_message@entry=0x7ffff0dd9cb8 "Incompatible libpng version in application and library") at libpng/pngerror.c:80

I assume this means that my app is indirectly linked with another version of libpng.so - is this right? 'ldd myApp' shows the dependence on libpng16.so, but no other libpng versions. When I remove one of the specific third-party libraries - libgmt.so - from the link, my application no longer crashes. So I presume that libgmt.so references another version of libpng.so. I run 'ldd /usr/local/lib/libgmt.so' which does NOT show any dependence on libpng.so, but shows dependency on 57 other libraries. I thought 'ldd' shows recursive dependencies. How can I find which library depends on that older libpng.so version?

Tomasso
  • 693
  • 2
  • 9
  • 17
  • Does this help: https://stackoverflow.com/questions/15064685/does-ldd-also-show-dependencies-of-dependencies/15064784#15064784 ? –  Apr 06 '20 at 00:26
  • Yes, but 'ldd' does not reveal any dependence on libpng.so other than one dependency on libpng16.so - but from the stack trace it seems there's a libpng version mismatch somewhere - but how to find out which library depends on that other version if not with ldd? I did try 'readelf -d' on all of the libraries indicated by 'ldd', but still see no mention of ilbpng.so as a dependency. – Tomasso Apr 06 '20 at 01:12

0 Answers0