[f2py] OS X 10.4.9 Mac intel and gfortran - has anyone gotten this
to work?
James Boyle
boyle5 at llnl.gov
Mon Mar 26 18:55:08 EEST 2007
I am running Python 2.5, Numeric 23.1 on an OS X 10.4.9 MacPro intel.
( the Numeric version is used for compatibility to a rather large and
vital legacy code not in my control)
I installed gfortran for the intel Mac from hpc.sourceforge.net.
I installed scipy_distutils-0.3.3_33.572 and F2PY-2.45.241_1926.
The python was built using GCC 4.0.1 (Apple Computer, Inc. build 5363).
When I try to run f2py I get the errors at the bottom of this
messge. A number of undefined references, apparently from the python
interface.
Going through the archives I have seen that this error has been
encountered before - but I could not discern any definite resolution
to the problem. I could just be dense.
One suggested solution is to use gcc 3.3 and g77 - it appears that
gcc 4 and g77 are not compatible. Although the test code is f77,
this solution does not solve my f90/f95 code problems.
So is gfortran a viable option for OS X 10.4 and f2py? Or should I
try to get my boss to spring for Intel Fortran?
--Jim
The error dump follows:
gfortran:f77: calcsound.f
/usr/local/bin/gfortran /tmp/tmpPgwPDC/tmp/tmpPgwPDC/src/
calcsoundmodule.o /tmp/tmpPgwPDC/tmp/tmpPgwPDC/src/fortranobject.o /
tmp/tmpPgwPDC/calcsound.o -L/usr/local/lib/gcc/i386-apple-
darwin8.8.1/4.3.0 -lgfortran -o ./calcsound.so
/usr/bin/ld: Undefined symbols:
_PyArg_ParseTuple
_PyArg_ParseTupleAndKeywords
_PyCObject_AsVoidPtr
_PyCObject_Type
_PyComplex_Type
_PyDict_GetItemString
_PyDict_SetItemString
_PyErr_Clear
_PyErr_NewException
_PyErr_Occurred
_PyErr_Print
_PyErr_SetString
_PyImport_ImportModule
_PyInt_Type
_PyModule_GetDict
_PyNumber_Int
_PyObject_GetAttrString
_PySequence_Check
_PySequence_GetItem
_PyString_FromString
_PyString_Type
_PyType_IsSubtype
_PyType_Type
_Py_BuildValue
_Py_FatalError
_Py_InitModule4
__Py_NoneStruct
_PyCObject_FromVoidPtr
_PyDict_DelItemString
_PyDict_New
_PyErr_Format
_PyExc_AttributeError
_PyExc_RuntimeError
_PyExc_TypeError
_PyMem_Free
_PyString_ConcatAndDel
_Py_FindMethod
__PyObject_New
_MAIN__
collect2: ld returned 1 exit status
/usr/bin/ld: Undefined symbols:
_PyArg_ParseTuple
_PyArg_ParseTupleAndKeywords
_PyCObject_AsVoidPtr
_PyCObject_Type
_PyComplex_Type
_PyDict_GetItemString
_PyDict_SetItemString
_PyErr_Clear
_PyErr_NewException
_PyErr_Occurred
_PyErr_Print
_PyErr_SetString
_PyImport_ImportModule
_PyInt_Type
_PyModule_GetDict
_PyNumber_Int
_PyObject_GetAttrString
_PySequence_Check
_PySequence_GetItem
_PyString_FromString
_PyString_Type
_PyType_IsSubtype
_PyType_Type
_Py_BuildValue
_Py_FatalError
_Py_InitModule4
__Py_NoneStruct
_PyCObject_FromVoidPtr
_PyDict_DelItemString
_PyDict_New
_PyErr_Format
_PyExc_AttributeError
_PyExc_RuntimeError
_PyExc_TypeError
_PyMem_Free
_PyString_ConcatAndDel
_Py_FindMethod
__PyObject_New
_MAIN__
collect2: ld returned 1 exit status
error: Command "/usr/local/bin/gfortran /tmp/tmpPgwPDC/tmp/tmpPgwPDC/
src/calcsoundmodule.o /tmp/tmpPgwPDC/tmp/tmpPgwPDC/src/
fortranobject.o /tmp/tmpPgwPDC/calcsound.o -L/usr/local/lib/gcc/i386-
apple-darwin8.8.1/4.3.0 -lgfortran -o ./calcsound.so" failed with
exit status 1
More information about the f2py-users
mailing list