[f2py] f2py linking errors on OSX

pearu at cens.ioc.ee pearu at cens.ioc.ee
Tue Nov 15 16:06:36 EET 2005


On Mon, 14 Nov 2005, Chris Fonnesbeck wrote:

> Due to memory errors related to f2py in the current svn of scipy_core,
> I need to go back and use the standalone f2py and scipy_distutils for
> building my extensions. However, when I download, build and install
> f2py and scipy_distutils from the f2py website, I get the following
> linking errors when trying to build my extensions. I am using gcc 3.3
> and g77 3.4 on OSX.
> 
> /usr/local/bin/g77 -lcc_dynamic -bundle
> build/temp.darwin-8.3.0-Power_Macintosh-2.4/build/src/PyMC/flibmodule.o
> build/temp.darwin-8.3.0-Power_Macintosh-2.4/build/src/fortranobject.o
> build/temp.darwin-8.3.0-Power_Macintosh-2.4/PyMC/flib.o
> build/temp.darwin-8.3.0-Power_Macintosh-2.4/build/src/PyMC/flib-f2pywrappers.o
> -L/usr/local/lib/gcc/powerpc-apple-darwin7.9.0/3.4.4 -lg2c -o
> build/lib.darwin-8.3.0-Power_Macintosh-2.4/PyMC/flib.so
> /usr/bin/ld: Undefined symbols:
> _PyArg_ParseTuple
<snip>

I suggest getting old f2py from CVS and scipy_distutils from

  http://svn.scipy.org/svn/scipy_core/branches/oldcore/scipy_distutils/

See the gnufcompiler.py file and the get_flags_linker_so() method. This
would be the place to fix linker flags.

Pearu





More information about the f2py-users mailing list