building from SVN on Mac OS X 10.5

Eric Bruning <eric.bruning@...149...> writes:

ld warning: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s.10.4.dylib,
missing required architecture ppc in file
ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s.1.dylib,
missing required architecture ppc in file for architecture ppc

Somehow your gcc is picking up libraries from /usr/local/lib, where you
have presumably installed an x86-only version of gcc (could be a side
effect of installing GNU Fortran). I don't know how to prevent that,
except perhaps by moving /usr/local away for the duration of the
compilation command, e.g.

sudo mv /usr/local /usr/local.renamed
make installers
sudo mv /usr/local.renamed /usr/local

···

--
Jouni K. Sepp�nen

I think you should edit setupext.py and edit basedir directory, and
remove all the /sw, /usr/local, etc from basedir in the 'darwin'
entry, which reads:

darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local',
                '/usr', '/sw'],

Then do a clean rebuild and see if that helps.

JDH

···

On Fri, Aug 21, 2009 at 10:41 AM, Jouni K. Seppänen<jks@...278...> wrote:

Eric Bruning <eric.bruning@...149...> writes:

ld warning: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s.10.4.dylib,
missing required architecture ppc in file
ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s.1.dylib,
missing required architecture ppc in file for architecture ppc

Somehow your gcc is picking up libraries from /usr/local/lib, where you
have presumably installed an x86-only version of gcc (could be a side
effect of installing GNU Fortran). I don't know how to prevent that,
except perhaps by moving /usr/local away for the duration of the
compilation command, e.g.

Hi folks -

just to add to the noise. Here is what eventually worked for me (with
OS 10.5.8 and EPD 4.3), with help from Mike McKerns:

0. I removed the ~/.matplotlib folder ("rm -rf ~/.matplotlib").

1. I edited /Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/config/Makefile,
removing all occurrences of "-arch ppc" (3 occurrences), changing the
line "MACOSX_DEPLOYMENT_TARGET=10.3" to
"MACOSX_DEPLOYMENT_TARGET=10.5" and changing the occurrences of
"MacOSX10.54u.sdk" into "MacOSX10.5.sdk" (3 occurrences). Here is the
full diff:

60c60
< BASECFLAGS= -arch i386 -isysroot MacOSX10.5.sdk -fno-strict-aliasing
-Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic

install-matplotlib.sh (936 Bytes)

···

---

BASECFLAGS= -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic

66c66
< LDFLAGS= -arch i386 -isysroot MacOSX10.5.sdk -g -L/usr/local/lib
-L/Library/Frameworks/Python.framework/Versions/4.3.0/lib
---

LDFLAGS= -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -L/usr/local/lib -L/Library/Frameworks/Python.framework/Versions/4.3.0/lib

115c115
< UNIVERSALSDK=MacOSX10.5.sdk
---

UNIVERSALSDK=/Developer/SDKs/MacOSX10.4u.sdk

123c123
< MACOSX_DEPLOYMENT_TARGET=10.5
---

MACOSX_DEPLOYMENT_TARGET=10.3

405c405
< \(CC\) \-o (LDLIBRARY) -arch i386 -dynamiclib \
---

    \(CC\) \-o (LDLIBRARY) -arch i386 -arch ppc -dynamiclib \

2. In /Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/site-packages/easy-install.pth,
I commented out the line containing the directory in which the
previous version of MPL was installed
("./matplotlib-0.98.5.2n2-py2.5-macosx-10.3-fat.egg", in my case). If
I don't do this, when I import matplotlib, it imports the previous
version I had of MPL and just ignores the new installation. This is a
setuptools problem, so if you didn't have setuptools, good for you and
ignore this.

3. I ran the attached shell-script ("sh ./install-matplotlib.sh"),
based on a script by Mike McKerns, in the directory in which I wanted
my source to be. This script sets some local variable (CFLAGS,
LDFLAGS, PKG_CONFIG_PATH, ARCHFLAGS), removes previous installations,
downloads the source, builds and installs it. The backend seems to be
set to MacOSX.

I would be happy if someone who's had similar problems to the ones I
have had could test this procedure and see if it works for them as
well.

Cheers,

Ariel

On Fri, Aug 21, 2009 at 9:15 AM, John Hunter<jdh2358@...149...> wrote:

On Fri, Aug 21, 2009 at 10:41 AM, Jouni K. Seppänen<jks@...278...> wrote:

Eric Bruning <eric.bruning@...149...> writes:

ld warning: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s.10.4.dylib,
missing required architecture ppc in file
ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s.1.dylib,
missing required architecture ppc in file for architecture ppc

Somehow your gcc is picking up libraries from /usr/local/lib, where you
have presumably installed an x86-only version of gcc (could be a side
effect of installing GNU Fortran). I don't know how to prevent that,
except perhaps by moving /usr/local away for the duration of the
compilation command, e.g.

I think you should edit setupext.py and edit basedir directory, and
remove all the /sw, /usr/local, etc from basedir in the 'darwin'
entry, which reads:

darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local',
'/usr', '/sw'],

Then do a clean rebuild and see if that helps.

JDH

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options

--
Ariel Rokem
Helen Wills Neuroscience Institute
University of California, Berkeley
http://argentum.ucbso.berkeley.edu/ariel

Hey guys, this is great. Any chance I could twist your arm into
writing this up as a ReST FAQ and updating your script to do an svn
checkout instead of installing the last release. I would like to post
this on the FAQ on the website.

JDH

···

On Sat, Aug 22, 2009 at 2:48 PM, Ariel Rokem<arokem@...453...> wrote:

Hi folks -

just to add to the noise. Here is what eventually worked for me (with
OS 10.5.8 and EPD 4.3), with help from Mike McKerns:

Resending with CC to list:

Hi - here is the diff with the suggested addition to the documentation.

Cheers,

Ariel

mpl99doc_install_epd.diff (4.6 KB)

···

On Sat, Aug 22, 2009 at 1:34 PM, John Hunter<jdh2358@...149...> wrote:

On Sat, Aug 22, 2009 at 2:48 PM, Ariel Rokem<arokem@...453...> wrote:

Hi folks -

just to add to the noise. Here is what eventually worked for me (with
OS 10.5.8 and EPD 4.3), with help from Mike McKerns:

Hey guys, this is great. Any chance I could twist your arm into
writing this up as a ReST FAQ and updating your script to do an svn
checkout instead of installing the last release. I would like to post
this on the FAQ on the website.

JDH

--
Ariel Rokem
Helen Wills Neuroscience Institute
University of California, Berkeley
http://argentum.ucbso.berkeley.edu/ariel

Thanks! Just pushed this out to the website:

http://matplotlib.sourceforge.net/faq/installing_faq.html#building-and-installing-from-source-on-osx-with-epd

···

On Sat, Aug 22, 2009 at 5:47 PM, Ariel Rokem<arokem@...453...> wrote:

Resending with CC to list:

Hi - here is the diff with the suggested addition to the documentation.