[Xquartz-dev] Compatibility error problem in libpng15.15 when compiling on 10.8 and deploying on 10.9

Ken Thomases ken at codeweavers.com
Wed Jan 15 05:58:20 PST 2014


On Jan 15, 2014, at 5:52 AM, Stefano Borini wrote:

> On Wed, Jan 15, 2014 at 12:47:38AM -0800, Jeremy Huddleston Sequoia wrote:
>>> 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.
> 
> A freshly installed copy of 10.8 has /usr/X11/lib, which contains .dylibs for X, in addition to libpng and so on. It does not come with a X11 server.

Those libraries are bogus.  If a process loads one of those: a) that process is terminated, and b) the system puts up a dialog telling the user that they need to install XQuartz to get X functionality.

(For what it's worth, (a) is nasty.  Our product had code which tried to dynamically load various FreeType libraries to find a "best" one, relying on dlopen() to report failure if it couldn't load one.  Touching the FreeType library in /usr/X11/lib was like stepping on a land mine.)

I'm not at all sure that those libraries are even usable as stub libraries for linking.

Only after installing XQuartz are those libraries replaced by (links to?) the real libraries.  That allows binaries that were linked to libraries in /usr/X11/lib to load, because such binaries might have been created in the days before XQuartz installed to /opt/X11.


> I am still investigating exactly the details and see what is needed and what is
> not (the porting is in progress). I am sure about png/freetype, not 100% sure
> about the rest of the X11 libs.

The important thing to understand is that libpng and libfreetype and the like are not "X11 libs".  They happen to have been installed with X11 because they were needed by X11.  If they are needed by your program, then they should be installed by/with your program in an analogous manner.

>> 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.
> 
> I agree, although I would have preferred not to. Nothing personal, it's just additional work, and I want to do it
> only if there's a valid reason for it.

There's a valid reason for it.

Regards,
Ken



More information about the Xquartz-dev mailing list