[Xquartz-dev] Compatibility error problem in libpng15.15 when compiling on 10.8 and deploying on 10.9
stefano.borini at ferrara.linux.it
Tue Jan 14 12:01:58 PST 2014
I am having a problem with XQuartz 2.7.2 (but also latest) and a program
I am deploying, specifically due to libpng15.15. I envision a more
general issue, as my software also depends on other X libraries.
I am compiling on 10.8/XCode 5, freshly installed. 10.8 comes with X11
libs but no headers, so I installed XQuartz and compiled without a
problem. The application runs on this machine.
I then packaged my .app and tried to run it on a customer's machine
(10.9, upgraded from 10.6.8) but I get a Compatibility error in
libpng15.15 (claims 25.0.0, but wants the one of the XQuartz I had,
27.0.0). I did change the path to the proper one with install_name_tool.
I think I see where the problem is, namely, I am binding to the XQuartz
libpng (27.0.0), but this is not available on the customers' 10.9, where
the libpng is only 25.0.0. However, I fail to see what's the proper way
of dealing with it. Should I
- unpack only the .h files out of XQuartz (or get them in any other way)
and link against the .dylib provided by Apple on 10.8, or
- use XQuartz to compile and link, then ship XQuartz .dylibs as private
libraries in my .app, or
- other options ?
I am sure I am not the only one having faced this problem, so I assume a
best or common practice exists.
Note that I can't deploy XQuartz on the customer's machine, and I should
not need an X server. The app is in Qt, running native, but some
libraries I am using do need X libraries, in addition to libpng,
Thank you for your attention and help,
More information about the Xquartz-dev