[Xquartz-dev] Compatibility error problem in libpng15.15 when compiling on 10.8 and deploying on 10.9
Jeremy Huddleston Sequoia
jeremyhu at apple.com
Wed Jan 15 00:47:38 PST 2014
On Jan 14, 2014, at 12:01, Stefano Borini <stefano.borini at ferrara.linux.it> wrote:
> Good morning/afternoon,
> 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,
No, it doesn't. 10.8 doesn't come with X11 at all.
> 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.
What exactly did you do with install_name_tool? You shouldn't need to change anything. It is correctly /opt/X11/lib/libpng15.15.dylib
> 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
There are no such libs.
> - use XQuartz to compile and link, then ship XQuartz .dylibs as private libraries in my .app, or
> - other options ?
Tell the customer to install a version of XQuartz greater than or equal to what you build with.
Either that, or you'll need to build the dylibs yourself, package them in your app bundle and change all the dylib ids to be relative to the executable path.
> 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.
Then you should not be linking against the libraries in /opt/X11/lib? Customers will only have those if they've installed XQuartz
> The app is in Qt, running native, but some libraries I am using do need X libraries, in addition to libpng, freetype etc...
Why would you need X11 libraries if you're not communicating with an X11 server?
If all you need are things like pixman, cairo, libpng, and libfreetype, then you really should just package up your own copies. Installing XQuartz is overkill for your customers.
Furthermore, there are native OS X APIs available for your use as well which may be better suited.
> Thank you for your attention and help,
> Stefano Borini
> Xquartz-dev mailing list
> Xquartz-dev at lists.macosforge.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4136 bytes
Desc: not available
More information about the Xquartz-dev