OS X binary installer broken on 10.4? (was: O pylab why do you refuse to import?)

John Seales <praxbaffle@...32...> writes:

> I'm using python 2.5.2 on a macbook, intel microprocessor, mac os 10.4.11

I installed matplotlib from the dmg file. I clicked on the icon to install it.

I assume you mean the mpkg file - I don't see any dmg file on the
download page. It seems to me that something is wrong with that file,
since release/osx/Makefile compiles its own Freetype and attempts to
link to it statically, but the file ft2font.so distributed within the
mpkg installer links dynamically to /usr/X11R6/lib/libfreetype.6.dylib.

AFAIK, the static linking is done precisely to avoid version mismatches
between different versions of freetype, zlib, and png on various
versions of OS X. Several *.so files within the mpkg link to
/usr/X11R6/lib/libfreetype.6.dylib and /usr/lib/libz.1.dylib (though,
curiously, none link to the system libpng).

I suppose this is exactly the kind of problem that results from dynamic
linking to a wrong version of freetype:

···

> ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/ft2font.so, 2): Library not loaded: /usr/X11R6/lib/libfreetype.6.dylib
> Referenced from: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/ft2font.so
> Reason: image not found

--
Jouni K. Sepp�nen
http://www.iki.fi/jks

Jouni K. Seppänen wrote:

AFAIK, the static linking is done precisely to avoid version mismatches
between different versions of freetype, zlib, and png on various
versions of OS X.

Well, it was done originally because all those libs weren't there at all originally. Apple has slowly been adding more (and the first freetype they included was not compatible with MPL in some way)

But yes, if there are different versions floating around static linking is a good idea.

  Several *.so files within the mpkg link to

/usr/X11R6/lib/libfreetype.6.dylib and /usr/lib/libz.1.dylib (though,
curiously, none link to the system libpng).

I think zlib as been pretty reliable, freetype not so much, and I don't think Apple provides libpng at all (I've got a whole bunch of copies on my system that came with various packages -- but none in system locations)

I suppose this is exactly the kind of problem that results from dynamic
linking to a wrong version of freetype:

In this case, I think a symlink was missing -- which looks like an Apple bug, but I can't tell you why it didn't bite me -- I suppose it depends on what order you installed/upgraded things.

-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...