[MacPorts] #47432: libpng version error

MacPorts noreply at macports.org
Tue Apr 14 02:44:27 PDT 2015

#47432: libpng version error
  Reporter:  murat@…  |      Owner:  ryandesign@…
      Type:  defect   |     Status:  new
  Priority:  Normal   |  Milestone:
 Component:  ports    |    Version:  2.3.3
Resolution:           |   Keywords:
      Port:  libpng   |

Comment (by ryandesign@…):

 Replying to [comment:5 murat@…]:
 > Forgive me if I'm committing a newbie error.
 > The output of libpng-config is indeed 1.6.17.
 > However, a directory listing of /opt/local/lib gives me this:
 > {{{
 > lrwxr-xr-x    1 root      admin         10 Apr  7 20:53 libpng.a ->
 > lrwxr-xr-x    1 root      admin         14 Apr  7 20:53 libpng.dylib ->
 > lrwxr-xr-x    1 root      admin         11 Apr  7 20:53 libpng.la ->
 > -rwxr-xr-x    1 root      admin     176924 Apr  7 20:53
 > -rw-r--r--    1 root      admin     278128 Apr  7 20:53 libpng16.a
 > lrwxr-xr-x    1 root      admin         17 Apr  7 20:53 libpng16.dylib
 -> libpng16.16.dylib
 > }}}
 > Which looks to me like 1.6.16, but I'm now doubting my interpretation of
 how libraries encode their version numbers.

 Library version numbers rarely coincide with project version numbers. I
 also have those files installed on my system with libpng 1.6.17. The real
 library version information is stored in the library. libpng 1.6.17
 provides libpng16 compatibility version 34. The same files are also
 installed with libpng 1.6.16, except they are compatibility version 33.
 The same files are installed with libpng 1.6.15, except compatibility
 version 32.

 > However (and this is what started all this), trying to run tcpflow
 results in the following error:
 > {{{
 > dyld: Library not loaded: /opt/local/lib/libpng16.16.dylib
 >   Referenced from: /opt/local/lib/libfreetype.6.dylib
 >   Reason: Incompatible library version: libfreetype.6.dylib requires
 version 34.0.0 or later, but libpng16.16.dylib provides version 32.0.0
 > Trace/BPT trap: 5
 > }}}

 Compatibility version 32 was from libpng 1.6.15, so somewhere on your
 system you have installed a copy of libpng 1.6.15, either in addition to
 or on top of the 1.6.17 installed by MacPorts.


 otool -L /opt/local/lib/libpng16.dylib

 If this shows compatibility version 32 (or any number other than 34), then
 your MacPorts libpng library was overwritten somehow (did you run some
 other installer?) and you should deactivate and reactivate the libpng port
 to put it right:

 sudo port -f deactivate libpng
 sudo port activate libpng

 If, however, `otool` shows compatibility version 34, then your MacPorts
 libpng is probably undamaged. In that case, I would suspect that you have
 set the `DYLD_LIBRARY_PATH` environment variable to a location where
 libpng 1.6.15 is installed. Have you done that? To find out, you can run:


 If this produces no output, you don't have `DYLD_LIBRARY_PATH` set, but if
 you do, it will show you what value it's set to.

 You might also check whether you have libpng16.16.dylib in /usr/local/lib
 (or anything in /usr/local, really).

Ticket URL: <https://trac.macports.org/ticket/47432#comment:6>
MacPorts <https://www.macports.org/>
Ports system for OS X

More information about the macports-tickets mailing list