Matplotlib-devel Digest, Vol 39, Issue 22

Thanks for the suggestion Jeff. I have been dealing with the same problem. I found the makefile in
/Library/Frameworks/Python.framework/Versions/Current/lib/PythonX.Y/config/Makefile
from an EPD install. Is this makefile the template used whenever I build a package against python using distutils? Or do I need to rebuild python somehow for i386 only?

Uri

···

---------- Forwarded message ----------

From: Jeff Whitaker <jswhit@…752…>

To: Michael Hearne <mhearne@…753…1…>
Date: Wed, 12 Aug 2009 13:42:07 -0600
Subject: Re: [matplotlib-devel] Building matplotlib on os x
Michael Hearne wrote:

I apologize for cross-posting - I realized I probably shouldn’t have posted this on the user’s list first…

Hello - I am attempting to build matplotlib from source on os X, and getting an error about a shared library being the wrong architecture. The confusing thing is that the call to g++ has two settings for arch:

“g++ -arch i386 -arch ppc…”

The error I get is:

“ld: in /Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/ Python.framework/Versions/4.3.0/lib/libz.1.dylib, file is not of required architecture for architecture ppc”

Is there some way to turn off the “-arch ppc” option to g++ in setup.py? Or do I have some other problem?

Build output is included below.

Thanks,

Mike

Mike: You need to edit

/Library/Frameworks/Python.framework/Versions/Current/lib/PythonX.Y/Makefile

(or whatever the corresponding path is for your python installation)

and remove all references to “-arch ppc” if you don’t want to build universal binaries (which you can’t if the libs you’re linking are not universal).

-Jeff

Jeffrey S. Whitaker Phone : (303)497-6313

Meteorologist FAX : (303)497-6449

NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@…236…

325 Broadway Office : Skaggs Research Cntr 1D-113

Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg