OS X: upgrade to X11 1.1.3 breaks mpl FIX

If you saw my previous post about upgrading to XDarwin 1.1.3, and breaking matplotlib, the following seems to work:

Soft-linking to libfreetype.6.3.8.dylib rather than libfreetype.6.3.dylib (see below, copied from previous email).

Thanks for that Apple!

-Tony

>>> import numpy as N

N.__version__

'0.9.6'

import matplotlib
matplotlib.__version__

'0.87.2'

import pylab as PLT

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/pylab.py", line 1, in ?
    from matplotlib.pylab import *
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/pylab.py", line 200, in ?
    from axes import Axes, PolarAxes
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axes.py", line 15, in ?
    from axis import XAxis, YAxis
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axis.py", line 25, in ?
    from font_manager import FontProperties
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/font_manager.py", line 39, in ?
    from matplotlib import ft2font
ImportError: Failure linking new module: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/ft2font.so: Library not loaded: /usr/X11R6/lib/libfreetype.6.dylib
  Referenced from: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/ft2font.so
  Reason: Incompatible library version: ft2font.so requires version 10.0.0 or later, but libfreetype.6.dylib provides version 6.3.0

I note that in /usr/X11R6/lib that softlinks to the libraries mentioned above were recently changed:

···

/usr/X11R6/lib
jplajm:8:lib $ ll libfree*
-rwxr-xr-x 1 root wheel 1786588 Apr 28 2006 libfreetype.6.3.8.dylib
-rw-r--r-- 1 root wheel 683560 Nov 6 17:31 libfreetype.6.3.dylib
lrwxr-xr-x 1 root wheel 21 Nov 21 09:07 libfreetype.6.dylib -> libfreetype.6.3.dylib
-rw-r--r-- 1 root wheel 1907688 Apr 28 2006 libfreetype.a
lrwxr-xr-x 1 root wheel 21 Nov 21 09:07 libfreetype.dylib -> libfreetype.6.3.dylib
-rwxr-xr-x 1 root wheel 836 Apr 28 2006 libfreetype.la

--
Tony Mannucci
Supervisor, Ionospheric and Atmospheric Remote Sensing Group
  Mail-Stop 138-308, Tel > (818) 354-1699
  Jet Propulsion Laboratory, Fax > (818) 393-5115
  California Institute of Technology, Email > Tony.Mannucci@...369...
  4800 Oak Grove Drive, http://genesis.jpl.nasa.gov
  Pasadena, CA 91109

Tony Mannucci wrote:

If you saw my previous post about upgrading to XDarwin 1.1.3, and breaking matplotlib, the following seems to work:

Soft-linking to libfreetype.6.3.8.dylib rather than libfreetype.6.3.dylib (see below, copied from previous email).

That's interesting. I don't have a 6.3.8, only 6.3 (and 6, linked to 6.3). I did just install the latest Apple X11 update.

Also, in the past, MPL has been know not to work with Apple's X11 libfreetype. I wonder if you had installed 6.3.8 yourself. That would have explained it, in that usually if you install, for instance, 6.3.8, there would be a link from 6.3 to 6.3.8, which may have been what you linked to originally. Then, if Apple provided a new 6.3 with their X11, it overwrote yours.

I do note that your 6.3.8 is MUCH larger than 6.3, which is a bit curious.

Anyway, most of us end up linking MPL statically against a self-installed libfreetype, just for these reasons.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

Christopher Barker wrote:

Tony Mannucci wrote:
  

If you saw my previous post about upgrading to XDarwin 1.1.3, and breaking matplotlib, the following seems to work:

Soft-linking to libfreetype.6.3.8.dylib rather than libfreetype.6.3.dylib (see below, copied from previous email).
    
That's interesting. I don't have a 6.3.8, only 6.3 (and 6, linked to 6.3). I did just install the latest Apple X11 update.
  
Same here (intel mac with X11 1.1.3).

-Jeff

···

--
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328

One more note:

Christopher Barker wrote:

I wonder if you had installed 6.3.8 yourself.

If you did, it really should have been put in /usr/local/ somewhere --
then you wouldn't risk conflicts with Apple's version.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

Chris,

Yes, well I probably installed libfreetype myself, as part of the source installs. I know very little about these internals, so I did nothing "on purpose." It's disconcerting that the X11 update overwrote things in this way. Luckily, it appears there are no other side effects. The fix was possible because of good error reporting from mpl.

Thanks for your comments.

-Tony

···

At 7:53 AM -0800 11/22/06, Christopher Barker wrote:

Tony Mannucci wrote:

If you saw my previous post about upgrading to XDarwin 1.1.3, and breaking matplotlib, the following seems to work:

Soft-linking to libfreetype.6.3.8.dylib rather than libfreetype.6.3.dylib (see below, copied from previous email).

That's interesting. I don't have a 6.3.8, only 6.3 (and 6, linked to 6.3). I did just install the latest Apple X11 update.

Also, in the past, MPL has been know not to work with Apple's X11 libfreetype. I wonder if you had installed 6.3.8 yourself. That would have explained it, in that usually if you install, for instance, 6.3.8, there would be a link from 6.3 to 6.3.8, which may have been what you linked to originally. Then, if Apple provided a new 6.3 with their X11, it overwrote yours.

I do note that your 6.3.8 is MUCH larger than 6.3, which is a bit curious.

Anyway, most of us end up linking MPL statically against a self-installed libfreetype, just for these reasons.

-Chris

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

--
Tony Mannucci
Supervisor, Ionospheric and Atmospheric Remote Sensing Group
  Mail-Stop 138-308, Tel > (818) 354-1699
  Jet Propulsion Laboratory, Fax > (818) 393-5115
  California Institute of Technology, Email > Tony.Mannucci@...369...
  4800 Oak Grove Drive, http://genesis.jpl.nasa.gov
  Pasadena, CA 91109