[SciPy-dev] Mac OS X and gcc 4.2

David M. Cooke cookedm at physics.mcmaster.ca
Thu Aug 17 18:08:00 EDT 2006


On Thu, Aug 17, 2006 at 10:58:55AM -0500, Chris Kees wrote:
> David,
> 
> Thanks. That  got me part  of  the way through along  with similar  g+ 
> + and gfortran wrappers like  what you gave me. That's  nuts that   
> those  options  are  hardwired  in. Now I'm getting more  link errors  
> because it's trying to build  shared libraries  without  any of  the  
> options  needed to  build  them from python extension modules:
> 
> gfortran-wrapper -m32 -mpowerpc -maltivec -framework Accelerate build/ 
> temp.macosx-10.4-fat-2.4/Lib/integrate/_quadpackmodule.o -L/usr/local/ 
> lib/gcc/powerpc-apple-darwin8.7.0/4.2.0 -Lbuild/temp.macosx-10.4- 
> fat-2.4 -lquadpack -llinpack_lite -lmach -lgfortran -o build/ 
> lib.macosx-10.4-fat-2.4/scipy/integrate/_quadpack.so
> /usr/bin/ld: Undefined symbols:
> _PyArg_ParseTuple
> _PyCObject_AsVoidPtr
> _PyCObject_Type

Hmm, that looks like it's trying to make a program. You shouldn't need a
gfortran wrapper, as everything for the Fortran compiler you can
override (b/c we wrote that as part of numpy.distutils; the C part comes
from Python distutils). I have this in my ~/.pydistutils.cfg so I don't
have to remember to set environmet variables or add command-line
switches:

[config_fc]
fcompiler=gnu95
f77exec=gfortran-dp-4.2
f90exec=gfortran-dp-4.2
opt = -g -Wall -O3

If you're on PPC, I'd suggest still using g77 3.4 (you can grab a copy from
http://hpc.sourceforge.net/).

> FYI, apple's latest default  compiler  (4.0.1) builds numpy without  
> any trouble  on both my intel and power pc macs and all the tests   
> pass,  contrary to  what I was  seeing using gcc 3.3.

I build scipy with Apple's gcc 4.0.1, but with gfortran 4.2. And 3.3 is
*only* for PPC, anyways.

I'm on an Intel Mac, btw. Haven't tried building scipy on my iBook for
a while. I do have an idea on how to make a Universal build of Scipy for
Tiger that wouldn't require you having any other libraries installed.
I'll try putting it together sometime soon :)

-- 
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke                      http://arbutus.physics.mcmaster.ca/dmc/
|cookedm at physics.mcmaster.ca



More information about the SciPy-Dev mailing list