[Xquartz-dev] libpng headers work again in XQuartz 2.6.1_rc1

Dave Ray apple at jonive.com
Mon Mar 7 12:28:04 PST 2011


On Mar 7, 2011, Jeremy wrote:

> No.  2.6.1_rc1 and 2.6.1_beta1 have the exact same libpng setup.


> 2.6.0 had 1.4.x ... please answer my earlier questions, and I will help you get to the bottom of it.


Okay, thanks, that's all I was trying to check on. 

As I mentioned the problem is gone in the latest XQuartz. I no longer need to pursue this, unless you want me to look into it further. I would have to revert to an older version XQuartz and try to reproduce the problem.

Just for the record here is a summary of what i observed:

One app I have been trying to compile (e17 svn on a non-Fink/Macports environment) has source code that will fail if more than one version of libpng exists in either the .pc, file or headers, regardless of PATH. It aggressively looks for version-specific libpng .pc files, starting with 1.4, then 1.2, then 1.0, then "libpng". This caused it to ignore libpng1.5 if 1.4 was installed, regardless of sym links, PATH, CFLAGS etc. So I have been pruning everything libpng-related in bin, include, lib and lib/pkgconfig for the different base configs, leaving only one to be used. For XQuartz 2.6.0 and earlier, I pruned out libpng in /usr/X11, leaving only those from XQuartz in /opt/X11. This worked and no further tuning was needed.

On XQuartz versions after 2.6.0 and before 2.6.1_rc1, the app that previously compiled was failing with png errors, although I thought nothing else had changed on my system. That's when I originally posted my question about what had changed. I never fully understood the reason for the errors and never resolved them. The easiest and fastest solution was to prune libpng out of /opt/X11 and install my own into /usr/local/. The errors went away for reasons I'm still not clear about. For each installation of XQuartz, I would temporarily move out all my libpng files out of /usr/local to see if the problem still existed. If so, I would move back my /usr/local files, and re-prune /opt/X11, in order to compile this app.

In the 2.6.1_rc1 release, the app compiled fine against the libpng in /opt/X11 and I can permanently get rid of the libpng files in /usr/local. The problem went away for reasons I'm not clear about and I no longer need to pursue the issue.

My intention was to understand the cause of the make errors so that I could feed that back to the app developers. I'm usually pretty good at identifying config issues and had checked out my system several times over without anything conclusive.

Does the XQuartz installer delete libs/includes/pc files from older XQuartz distros? If not, there may have been stray or old .pc files in /opt/X11 left over from the old XQuartz distros that I failed to prune.

-Dave





More information about the Xquartz-dev mailing list