2

After upgrading to Lion, X11 doesn't start. I downloaded XQuartz 2.7.0, it doesn't start either.

The crash dialog mentions the following problem:

X11:
Dyld Error Message:
Library not loaded: /usr/X11/lib/libpixman-1.0.dylib
Referenced from: /Applications/Utilities/X11.app/Contents/MacOS/X11.bin
Reason: Incompatible library version: X11.bin requires version 21.0.0 or later, but libpixman-1.0.dylib provides version 17.0.0

XQuartz:
Dyld Error Message:
Library not loaded: /opt/X11/*/libfreetype.6.dylib
Referenced from: /Applications/Utilities/XQuartz.app/Contents/MacOS/X11.bin
Reason: Incompatible library version: X11.bin requires version 14.0.0 or later, but libfreetype.6.dylib provides version 10.0.0

Unsetting DYLD_LIBRARY_PATH doesn't help either.

EDIT: I also reinstalled X11 from the Lion installer package as described here, but the problem is the same.

Can anyone help?

2
  • Did the result of the otool command suggested by @esarjeant change? Feb 7, 2012 at 19:13
  • Strangely, the problem fixed itself (10.7.3). I don't know which update caused it, but it works now...
    – thSoft
    May 13, 2012 at 23:00

4 Answers 4

2

It appears that the GnuPlot package delivers an older version of libfreetype.6.dylib than is installed on Lion (or SnowLeopard, in my case).

otool -L /Applications/Gnuplot.app/Contents/Resources/lib/libfreetype.6.dylib 
/Applications/Gnuplot.app/Contents/Resources/lib/libfreetype.6.dylib:
    /tmp/gnuplot-i386/lib/libfreetype.6.dylib (compatibility version 13.0.0, current version 13.2.0)

Yet my error is that GnuPlot is trying to load "/usr/X11/lib/libfreetype.6.dylib" and not the library contained in the GnuPlot package. That library is the right version:

otool -L /usr/X11/lib/libfreetype.6.dylib 
/usr/X11/lib/libfreetype.6.dylib:
    /usr/X11/lib/libfreetype.6.dylib (compatibility version 14.0.0, current version 14.2.0)

This is as far as I have gotten. I did note that the library aliases in the GnuPlot package all point to the libraries delivered with GnuPlot (4/15/2011 in my case), so my next trick will be to create a new alias for libfreetype.6.dylib pointing to the one in /usr/X11/lib and see if I get a new error.

Maybe the answer is to build GnuPlot on our Macs?

2
  1. Open /Applications/Utilities/X11, which opens a web page that tells you to install Xquartz).
  2. Install XQuartz. This will change X11 to /Applications/Utilities/XQuartz.
  3. Launch Gimp and a picker dialog, titled Where is X11? opens listing the apps from /Applications.
  4. From the picker dialog, click Browse button, and choose /Applications/Utilities/XQuartz.
  5. XQuartz will show in the dock.
  6. Quit Gimp and XQuartz.
  7. At this point, the link to X11 should be setup properly so that launching Gimp automatically launches XQuartz .
0

A quick check of OS X Lion shows:

$ otool -L /usr/X11/lib/libpixman-1.0.dylib /usr/X11/lib/libpixman-1.0.dylib: /usr/X11/lib/libpixman-1.0.dylib (compatibility version 21.0.0, current version 21.2.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)

If your libpixman-1.0 library has something different (i.e.: not version 21.x.x), you may want to re-install X11 from the Lion CD.

1
  • My output: /usr/X11/lib/libpixman-1.0.dylib: /usr/X11/lib/libpixman-1.0.dylib (compatibility version 21.0.0, current version 21.2.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0) Lion doesn't ship with a CD, but is installable from the App Store...
    – thSoft
    Jan 4, 2012 at 13:38
0

You can workaround this by changing the GnuPlot libfreetype library to point at the system one:

# Change to your GnuPlot install directory...
$ cd /Applications/Gnuplot.app/Contents/Resources/lib
# Backup the provided libfreetype...
$ mv libfreetype.6.dylib libfreetype.6.dylib.bak
# Link to the X11 provided one...
$ ln -s /usr/X11/lib/libfreetype.6.dylib .

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .