Yaaa, this was some time ago, I guess you did the following: * export CC=gcc-4.2 * export MACOSX_DEPLOYMENT_TARGET=.... * maybe also modifying the setupext.py
I must say, that Python distutils (or distribute, whatever you use) overrides the CC environment variable with the gcc version Python was compiled with. If you use python.org Python, this will be gcc-4.0. Could be that this is your issue: You compiled freetype with gcc-4.2 and Python uses gcc-4.0 for compiling matplotlib. Then the matplotlib libraries cannot load the gcc-4.2 compiled ones, because they are "too new". Encountered this several times on my own computer. Notice that the setupext.py instructions are still valid. The _png.cpp instructions are obsolete for recent versions of matplotlib, you can use libpng-1.4 right away. First, I'll wait for your response if you use python.org Python, and then we see what to do next. Don't want to bombard you with non-applicable recommendations. Concerning your message: 2010/10/3 Åke Kullenberg <ake.kullenb...@gmail.com>: > I just installed matplotlib-1.0.0 on my system (Snow Leopard, python 2.7), > but somehow when I try to import pyplot i get the error below. > For reference, I installed matplotlib from source. Prior to that I installed > libpng-1.4.4 and freetype-2.4.2 the usual way (./configure, make, make > install) plus I installed pkgcong as well. After getting the error I tried > the tips Friedrich R gave in this thread > (http://old.nabble.com/Symbol-not-found-td28994434.html) too, but I still > get the error. Notice, I'm using Python 2.6, I hope this won't be an issue. Using Snow Leopard as well. > From a few google attempts it seems that it is an issue of dynamic vs static > linking. I can't say that I know what that is, but I'd be very interested in > knowing whether I can do anything from my side to sort things out. Hmm, here maybe you also ran across what I said, just to add that afaict make.osx isn't doing static linking, but rather linking against newly-installed shared libs. The libs are compiled just by the make.osx script. Got this impression when I had an own look into the script. > Here is the error: > from matplotlib import ft2font > ImportError: > dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/ft2font.so, > 2): Symbol not found: _FT_Attach_File > Referenced from: > /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/ft2font.so > Expected in: dynamic lookup Yeah, this looks pretty much like what I said. Sorry for the confusion with the old threads, I think best will be to search the matplotlib archive for recent threads, my replies got better with time, as I sorted out things myself. I really feel I should write things up for the matplotlib page as far as I came so far with my investigations ... And please reply back. If the external libraries you're using change: Do a new build in a new, freshly untared matplotlib directory or sth like that. I found that, for some reason, it is necessary to really rebuild the matplotlib libraries when a shared library they load is changed. It is not sufficient to just replace the external shared library (like freetype2) to make it work. My knowledge in linking is not as deep as that I could explain the guts why this is so, but you have to do it (I had to at least). Keep in mind that dependency checks do not include the shared libs matplotlib libraries like ft2font rely on. I can only guess that it only applies to the gcc-4.0/4.2 issue. Otherwise shared libs would be nearly useless. Friedrich ------------------------------------------------------------------------------ Virtualization is moving to the mainstream and overtaking non-virtualized environment for deploying applications. Does it make network security easier or more difficult to achieve? Read this whitepaper to separate the two and get a better understanding. http://p.sf.net/sfu/hp-phase2-d2d _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users