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?