Using X11 for an older program

Ryan Schmidt ryandesign at macports.org
Fri Dec 25 22:02:41 UTC 2020



On Dec 21, 2020, at 12:55, Michael wrote:

> This should be a simple one. I hope.
> 
> I just installed a program that was compiled against the release version of mac's X11. Crashes on startup with this:
> 
> dyld: launch, loading dependent libraries
> 
> Dyld Error Message:
> Library not loaded: /opt/X11/lib/libpng15.15.dylib
> 
> What symbolic links do I need? /opt has no X11 directory.

You can make symlinks at /opt/X11/lib/libpng15.15.dylib pointing to wherever libpng15.15.dylib is on your system, or better yet, use install_name_tool to change the library references in that program to refer to wherever libpng15.15.dylib is on your system.

Don't try to symlink libpng15.15.dylib to libpng16.16.dylib or use install_name_tool to make that change. The library name has changed because they are not interchangeable. If they had been meant to be interchangeable, the library name would not have changed.


On Dec 21, 2020, at 13:34, Michael wrote:

> Ok, another question. I found this:
> 
> /opt/local/lib/libpng16.16.dylib
> 
> I cannot find the older version. What do I need to do to install both the current and the older version of this library at the same time?

MacPorts provides only one version of libpng: the latest, currently version 1.6.x, which has a library name libpng16.16.dylib. libpng15.15.dylib was probably libpng 1.5.x. You could manually compile the last libpng 1.5.x in some other prefix and then use install_name_tool to make the program you downloaded refer to it.

Ideally, of course, you'd recompile the other program so that it links with the current libpng16.16.dylib, if you have access to its source code.



More information about the macports-users mailing list