MacOS X install and ppc flag

Hi,

Is there a way to prevent the matplotlib install from trying to compile for ppc for the c++ compiler? I usually set

export MACOSX_DEPLOYMENT_TARGET=10.6
export CFLAGS="-arch i386 -arch x86_64"
export CPPFLAGS="-arch i386 -arch x86_64"
export FFLAGS="-arch i386 -arch x86_64"
export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch x86_64"

before installing packages, and make.osx has:

MACOSX_DEPLOYMENT_TARGET=10.6
OSX_SDK_VER=10.6
ARCH_FLAGS="-arch i386-arch x86_64"

All the gcc commands look like

gcc-4.0 -DNDEBUG -g -O3 -arch i386 -arch x86_64 [...] -isysroot /Developer/SDKs/MacOSX10.6.sdk [...]

but the c++ commands look like

c++ -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk [...] -arch i386 -arch x86_64 -L/Users/tom/install/tmp/lib -syslibroot,/Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 [...]

which leads to an error when compiling _tkagg.so:

ld: in /Users/tom/install/tmp/lib/libz.1.dylib, missing required architecture ppc in file for architecture ppc
collect2: ld returned 1 exit status

If I try removing "-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" from the compile command, _tkagg.so compiles fine.

Any ideas?

Thanks!

Tom

2010/9/4 Thomas Robitaille <thomas.robitaille@...287...>:

export MACOSX_DEPLOYMENT_TARGET=10.6
export CFLAGS="-arch i386 -arch x86_64"
export CPPFLAGS="-arch i386 -arch x86_64"
export FFLAGS="-arch i386 -arch x86_64"
export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch x86_64"

So you're on 10.6? (Because of the DEPLOYMENT_TARGET.)

In general, distutils chooses the flags and tweaks them to match the
options used when compiling Python. Did you install Python from
source, and if yes, maybe with ppc?

ARCH_FLAGS="-arch i386-arch x86_64"

I don't know how the ARCH_FLAGS are interpreted.

gcc-4.0 -DNDEBUG -g -O3 -arch i386 -arch x86_64 [...] -isysroot /Developer/SDKs/MacOSX10.6.sdk [...]

gcc-4.0? Thought you are on 10.6, there gcc-4.2 is the default.
Further, this looks to me like you're using python.org Python, which
is indeed gcc-4.0 compiled afaik. Maybe you're even using Apple
Python?? (Don't know which compiler this is using.)

So far, it's a bit incomplete, and sorry for the huge delay,
Friedrich