Building Scipy with ifort in Mac os X 10.5.2

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Building Scipy with ifort in Mac os X 10.5.2

Andres Gonzalez-Mancera-2
Hi all,

I'm trying to build Scipy with ifort on a core 2 duo iMac running 10.5.2 and the latest version of the developer tools. I'm using python 2.5.2 from python.org. In the same system I'm able to build and run Scipy with gfortran from the att research web site without any problems. I do not have the intel C compiler so I'm using gcc for this purpose.

I'm using the 32 bit version of ifort 10.1.014 with 10.0.2.018 version of the intel MKL. I haven't been able to find concrete building instructions so I'm following the instructions in scipy.org except I'm using:

python setup.py build_src build_clib --fcompiler=intel build_ext --fcompiler=intel build

to build Scipy. The build process fails with the following message:

creating build/lib.macosx-10.3-i386-2.5/scipy/fftpack
/opt/intel/fc/10.1.014/bin/ifort -shared -shared -nofor_main build/temp.macosx-10.3-i386-2.5/build/src.macosx-10.3-i386-2.5/scipy/fftpack/_fftpackmodule.o build/temp.macosx-10.3-i386-2.5/scipy/fftpack/src/zfft.o build/temp.macosx-10.3-i386-2.5/scipy/fftpack/src/drfft.o build/temp.macosx-10.3-i386-2.5/scipy/fftpack/src/zrfft.o build/temp.macosx-10.3-i386-2.5/scipy/fftpack/src/zfftnd.o build/temp.macosx-10.3-i386-2.5/build/src.macosx-10.3-i386-2.5/fortranobject.o -L/usr/local/lib -Lbuild/temp.macosx-10.3-i386-2.5 -ldfftpack -lfftw3 -o build/lib.macosx-10.3-i386-2.5/scipy/fftpack/_fftpack.so
ifort: command line warning #10156: ignoring option '-s'; no argument required
ifort: command line warning #10156: ignoring option '-s'; no argument required
Undefined symbols:
  "_PyExc_AttributeError", referenced from:
      _PyExc_AttributeError$non_lazy_ptr in fortranobject.o
  "_PyObject_Str", referenced from:
      _array_from_pyobj in fortranobject.o
  "_PyArg_ParseTupleAndKeywords", referenced from:
      _f2py_rout__fftpack_zfft in _fftpackmodule.o
      _f2py_rout__fftpack_drfft in _fftpackmodule.o
      _f2py_rout__fftpack_zrfft in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _f2py_rout__fftpack_destroy_zfft_cache in _fftpackmodule.o
      _f2py_rout__fftpack_destroy_zfftnd_cache in _fftpackmodule.o
      _f2py_rout__fftpack_destroy_drfft_cache in _fftpackmodule.o
  "_PyExc_ValueError", referenced from:
      _PyExc_ValueError$non_lazy_ptr in fortranobject.o
  "_PyExc_TypeError", referenced from:
      _PyExc_TypeError$non_lazy_ptr in fortranobject.o
  "_PyDict_GetItemString", referenced from:
      _fortran_getattr in fortranobject.o
  "_PyCObject_AsVoidPtr", referenced from:
      _init_fftpack in _fftpackmodule.o
  "_Py_BuildValue", referenced from:
      _f2py_rout__fftpack_zfft in _fftpackmodule.o
      _f2py_rout__fftpack_drfft in _fftpackmodule.o
      _f2py_rout__fftpack_zrfft in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _f2py_rout__fftpack_destroy_zfft_cache in _fftpackmodule.o
      _f2py_rout__fftpack_destroy_zfftnd_cache in _fftpackmodule.o
      _f2py_rout__fftpack_destroy_drfft_cache in _fftpackmodule.o
  "_PyComplex_Type", referenced from:
      _PyComplex_Type$non_lazy_ptr in _fftpackmodule.o
  "_PyDict_New", referenced from:
      _PyFortranObject_NewAsAttr in fortranobject.o
      _fortran_setattr in fortranobject.o
      _PyFortranObject_New in fortranobject.o
      _PyFortranObject_New in fortranobject.o
  "_MAIN__", referenced from:
      _main in libifcore.a(for_main.o)
  "_PyDict_SetItemString", referenced from:
      _init_fftpack in _fftpackmodule.o
      _init_fftpack in _fftpackmodule.o
      _init_fftpack in _fftpackmodule.o
      _F2PyDict_SetItemString in fortranobject.o
      _fortran_getattr in fortranobject.o
      _fortran_getattr in fortranobject.o
      _fortran_setattr in fortranobject.o
      _PyFortranObject_New in fortranobject.o
  "_PyType_Type", referenced from:
      _PyType_Type$non_lazy_ptr in _fftpackmodule.o
  "__PyObject_New", referenced from:
      _PyFortranObject_NewAsAttr in fortranobject.o
      _PyFortranObject_New in fortranobject.o
      _PyFortranObject_New in fortranobject.o
  "_PyInt_Type", referenced from:
      _PyInt_Type$non_lazy_ptr in _fftpackmodule.o
  "_PyString_FromString", referenced from:
      _init_fftpack in _fftpackmodule.o
      _init_fftpack in _fftpackmodule.o
      _fortran_getattr in fortranobject.o
      _fortran_getattr in fortranobject.o
  "_PyErr_Occurred", referenced from:
      _int_from_pyobj in _fftpackmodule.o
      _f2py_rout__fftpack_zfft in _fftpackmodule.o
      _f2py_rout__fftpack_zfft in _fftpackmodule.o
      _f2py_rout__fftpack_drfft in _fftpackmodule.o
      _f2py_rout__fftpack_drfft in _fftpackmodule.o
      _f2py_rout__fftpack_zrfft in _fftpackmodule.o
      _f2py_rout__fftpack_zrfft in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _f2py_rout__fftpack_destroy_zfft_cache in _fftpackmodule.o
      _f2py_rout__fftpack_destroy_zfftnd_cache in _fftpackmodule.o
      _f2py_rout__fftpack_destroy_drfft_cache in _fftpackmodule.o
      _init_fftpack in _fftpackmodule.o
      _F2PyDict_SetItemString in fortranobject.o
  "_PyErr_NewException", referenced from:
      _init_fftpack in _fftpackmodule.o
  "_PyImport_ImportModule", referenced from:
      _init_fftpack in _fftpackmodule.o
  "_PyMem_Free", referenced from:
      _fortran_dealloc in fortranobject.o
      _fortran_dealloc in fortranobject.o
  "_PyCObject_Type", referenced from:
      _PyCObject_Type$non_lazy_ptr in _fftpackmodule.o
  "_PyExc_ImportError", referenced from:
      _PyExc_ImportError$non_lazy_ptr in _fftpackmodule.o
  "_PyErr_Format", referenced from:
      _init_fftpack in _fftpackmodule.o
      _fortran_call in fortranobject.o
      _fortran_call in fortranobject.o
  "_PyNumber_Int", referenced from:
      _int_from_pyobj in _fftpackmodule.o
  "_PyCObject_FromVoidPtr", referenced from:
      _fortran_getattr in fortranobject.o
  "_PyObject_GetAttrString", referenced from:
      _int_from_pyobj in _fftpackmodule.o
      _init_fftpack in _fftpackmodule.o
  "_PyErr_Print", referenced from:
      _init_fftpack in _fftpackmodule.o
      _F2PyDict_SetItemString in fortranobject.o
  "_PyString_Type", referenced from:
      _PyString_Type$non_lazy_ptr in _fftpackmodule.o
  "__Py_NoneStruct", referenced from:
      __Py_NoneStruct$non_lazy_ptr in _fftpackmodule.o
      __Py_NoneStruct$non_lazy_ptr in fortranobject.o
  "_Py_FindMethod", referenced from:
      _fortran_getattr in fortranobject.o
  "_PyString_ConcatAndDel", referenced from:
      _fortran_getattr in fortranobject.o
  "_PyErr_Clear", referenced from:
      _int_from_pyobj in _fftpackmodule.o
      _F2PyDict_SetItemString in fortranobject.o
  "_Py_InitModule4", referenced from:
      _init_fftpack in _fftpackmodule.o
  "_PyModule_GetDict", referenced from:
      _init_fftpack in _fftpackmodule.o
  "_PyExc_RuntimeError", referenced from:
      _PyExc_RuntimeError$non_lazy_ptr in _fftpackmodule.o
      _PyExc_RuntimeError$non_lazy_ptr in fortranobject.o
  "_PyDict_DelItemString", referenced from:
      _fortran_setattr in fortranobject.o
  "_PyObject_Type", referenced from:
      _array_from_pyobj in fortranobject.o
  "_PySequence_Check", referenced from:
      _int_from_pyobj in _fftpackmodule.o
  "_PyString_AsString", referenced from:
      _array_from_pyobj in fortranobject.o
  "_PySequence_GetItem", referenced from:
      _int_from_pyobj in _fftpackmodule.o
  "_PyErr_SetString", referenced from:
      _int_from_pyobj in _fftpackmodule.o
      _f2py_rout__fftpack_zfft in _fftpackmodule.o
      _f2py_rout__fftpack_zfft in _fftpackmodule.o
      _f2py_rout__fftpack_zfft in _fftpackmodule.o
      _f2py_rout__fftpack_drfft in _fftpackmodule.o
      _f2py_rout__fftpack_drfft in _fftpackmodule.o
      _f2py_rout__fftpack_drfft in _fftpackmodule.o
      _f2py_rout__fftpack_zrfft in _fftpackmodule.o
      _f2py_rout__fftpack_zrfft in _fftpackmodule.o
      _f2py_rout__fftpack_zrfft in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _init_fftpack in _fftpackmodule.o
      _array_from_pyobj in fortranobject.o
      _fortran_setattr in fortranobject.o
      _fortran_setattr in fortranobject.o
  "_PyType_IsSubtype", referenced from:
      _int_from_pyobj in _fftpackmodule.o
      _int_from_pyobj in _fftpackmodule.o
      _int_from_pyobj in _fftpackmodule.o
      _array_from_pyobj in fortranobject.o
ld: symbol(s) not found
ifort: command line warning #10156: ignoring option '-s'; no argument required
ifort: command line warning #10156: ignoring option '-s'; no argument required
Undefined symbols:
  "_PyExc_AttributeError", referenced from:
      _PyExc_AttributeError$non_lazy_ptr in fortranobject.o
  "_PyObject_Str", referenced from:
      _array_from_pyobj in fortranobject.o
  "_PyArg_ParseTupleAndKeywords", referenced from:
      _f2py_rout__fftpack_zfft in _fftpackmodule.o
      _f2py_rout__fftpack_drfft in _fftpackmodule.o
      _f2py_rout__fftpack_zrfft in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _f2py_rout__fftpack_destroy_zfft_cache in _fftpackmodule.o
      _f2py_rout__fftpack_destroy_zfftnd_cache in _fftpackmodule.o
      _f2py_rout__fftpack_destroy_drfft_cache in _fftpackmodule.o
  "_PyExc_ValueError", referenced from:
      _PyExc_ValueError$non_lazy_ptr in fortranobject.o
  "_PyExc_TypeError", referenced from:
      _PyExc_TypeError$non_lazy_ptr in fortranobject.o
  "_PyDict_GetItemString", referenced from:
      _fortran_getattr in fortranobject.o
  "_PyCObject_AsVoidPtr", referenced from:
      _init_fftpack in _fftpackmodule.o
  "_Py_BuildValue", referenced from:
      _f2py_rout__fftpack_zfft in _fftpackmodule.o
      _f2py_rout__fftpack_drfft in _fftpackmodule.o
      _f2py_rout__fftpack_zrfft in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _f2py_rout__fftpack_destroy_zfft_cache in _fftpackmodule.o
      _f2py_rout__fftpack_destroy_zfftnd_cache in _fftpackmodule.o
      _f2py_rout__fftpack_destroy_drfft_cache in _fftpackmodule.o
  "_PyComplex_Type", referenced from:
      _PyComplex_Type$non_lazy_ptr in _fftpackmodule.o
  "_PyDict_New", referenced from:
      _PyFortranObject_NewAsAttr in fortranobject.o
      _fortran_setattr in fortranobject.o
      _PyFortranObject_New in fortranobject.o
      _PyFortranObject_New in fortranobject.o
  "_MAIN__", referenced from:
      _main in libifcore.a(for_main.o)
  "_PyDict_SetItemString", referenced from:
      _init_fftpack in _fftpackmodule.o
      _init_fftpack in _fftpackmodule.o
      _init_fftpack in _fftpackmodule.o
      _F2PyDict_SetItemString in fortranobject.o
      _fortran_getattr in fortranobject.o
      _fortran_getattr in fortranobject.o
      _fortran_setattr in fortranobject.o
      _PyFortranObject_New in fortranobject.o
  "_PyType_Type", referenced from:
      _PyType_Type$non_lazy_ptr in _fftpackmodule.o
  "__PyObject_New", referenced from:
      _PyFortranObject_NewAsAttr in fortranobject.o
      _PyFortranObject_New in fortranobject.o
      _PyFortranObject_New in fortranobject.o
  "_PyInt_Type", referenced from:
      _PyInt_Type$non_lazy_ptr in _fftpackmodule.o
  "_PyString_FromString", referenced from:
      _init_fftpack in _fftpackmodule.o
      _init_fftpack in _fftpackmodule.o
      _fortran_getattr in fortranobject.o
      _fortran_getattr in fortranobject.o
  "_PyErr_Occurred", referenced from:
      _int_from_pyobj in _fftpackmodule.o
      _f2py_rout__fftpack_zfft in _fftpackmodule.o
      _f2py_rout__fftpack_zfft in _fftpackmodule.o
      _f2py_rout__fftpack_drfft in _fftpackmodule.o
      _f2py_rout__fftpack_drfft in _fftpackmodule.o
      _f2py_rout__fftpack_zrfft in _fftpackmodule.o
      _f2py_rout__fftpack_zrfft in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _f2py_rout__fftpack_destroy_zfft_cache in _fftpackmodule.o
      _f2py_rout__fftpack_destroy_zfftnd_cache in _fftpackmodule.o
      _f2py_rout__fftpack_destroy_drfft_cache in _fftpackmodule.o
      _init_fftpack in _fftpackmodule.o
      _F2PyDict_SetItemString in fortranobject.o
  "_PyErr_NewException", referenced from:
      _init_fftpack in _fftpackmodule.o
  "_PyImport_ImportModule", referenced from:
      _init_fftpack in _fftpackmodule.o
  "_PyMem_Free", referenced from:
      _fortran_dealloc in fortranobject.o
      _fortran_dealloc in fortranobject.o
  "_PyCObject_Type", referenced from:
      _PyCObject_Type$non_lazy_ptr in _fftpackmodule.o
  "_PyExc_ImportError", referenced from:
      _PyExc_ImportError$non_lazy_ptr in _fftpackmodule.o
  "_PyErr_Format", referenced from:
      _init_fftpack in _fftpackmodule.o
      _fortran_call in fortranobject.o
      _fortran_call in fortranobject.o
  "_PyNumber_Int", referenced from:
      _int_from_pyobj in _fftpackmodule.o
  "_PyCObject_FromVoidPtr", referenced from:
      _fortran_getattr in fortranobject.o
  "_PyObject_GetAttrString", referenced from:
      _int_from_pyobj in _fftpackmodule.o
      _init_fftpack in _fftpackmodule.o
  "_PyErr_Print", referenced from:
      _init_fftpack in _fftpackmodule.o
      _F2PyDict_SetItemString in fortranobject.o
  "_PyString_Type", referenced from:
      _PyString_Type$non_lazy_ptr in _fftpackmodule.o
  "__Py_NoneStruct", referenced from:
      __Py_NoneStruct$non_lazy_ptr in _fftpackmodule.o
      __Py_NoneStruct$non_lazy_ptr in fortranobject.o
  "_Py_FindMethod", referenced from:
      _fortran_getattr in fortranobject.o
  "_PyString_ConcatAndDel", referenced from:
      _fortran_getattr in fortranobject.o
  "_PyErr_Clear", referenced from:
      _int_from_pyobj in _fftpackmodule.o
      _F2PyDict_SetItemString in fortranobject.o
  "_Py_InitModule4", referenced from:
      _init_fftpack in _fftpackmodule.o
  "_PyModule_GetDict", referenced from:
      _init_fftpack in _fftpackmodule.o
  "_PyExc_RuntimeError", referenced from:
      _PyExc_RuntimeError$non_lazy_ptr in _fftpackmodule.o
      _PyExc_RuntimeError$non_lazy_ptr in fortranobject.o
  "_PyDict_DelItemString", referenced from:
      _fortran_setattr in fortranobject.o
  "_PyObject_Type", referenced from:
      _array_from_pyobj in fortranobject.o
  "_PySequence_Check", referenced from:
      _int_from_pyobj in _fftpackmodule.o
  "_PyString_AsString", referenced from:
      _array_from_pyobj in fortranobject.o
  "_PySequence_GetItem", referenced from:
      _int_from_pyobj in _fftpackmodule.o
  "_PyErr_SetString", referenced from:
      _int_from_pyobj in _fftpackmodule.o
      _f2py_rout__fftpack_zfft in _fftpackmodule.o
      _f2py_rout__fftpack_zfft in _fftpackmodule.o
      _f2py_rout__fftpack_zfft in _fftpackmodule.o
      _f2py_rout__fftpack_drfft in _fftpackmodule.o
      _f2py_rout__fftpack_drfft in _fftpackmodule.o
      _f2py_rout__fftpack_drfft in _fftpackmodule.o
      _f2py_rout__fftpack_zrfft in _fftpackmodule.o
      _f2py_rout__fftpack_zrfft in _fftpackmodule.o
      _f2py_rout__fftpack_zrfft in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _f2py_rout__fftpack_zfftnd in _fftpackmodule.o
      _init_fftpack in _fftpackmodule.o
      _array_from_pyobj in fortranobject.o
      _fortran_setattr in fortranobject.o
      _fortran_setattr in fortranobject.o
  "_PyType_IsSubtype", referenced from:
      _int_from_pyobj in _fftpackmodule.o
      _int_from_pyobj in _fftpackmodule.o
      _int_from_pyobj in _fftpackmodule.o
      _array_from_pyobj in fortranobject.o
ld: symbol(s) not found
error: Command "/opt/intel/fc/10.1.014/bin/ifort -shared -shared -nofor_main build/temp.macosx-10.3-i386-2.5/build/src.macosx-10.3-i386-2.5/scipy/fftpack/_fftpackmodule.o build/temp.macosx-10.3-i386-2.5/scipy/fftpack/src/zfft.o build/temp.macosx-10.3-i386-2.5/scipy/fftpack/src/drfft.o build/temp.macosx-10.3-i386-2.5/scipy/fftpack/src/zrfft.o build/temp.macosx-10.3-i386-2.5/scipy/fftpack/src/zfftnd.o build/temp.macosx-10.3-i386-2.5/build/src.macosx-10.3-i386-2.5/fortranobject.o -L/usr/local/lib -Lbuild/temp.macosx-10.3-i386-2.5 -ldfftpack -lfftw3 -o build/lib.macosx-10.3-i386-2.5/scipy/fftpack/_fftpack.so" failed with exit status 1

I appreciate any advice. Thanks,

Andrés




_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: Building Scipy with ifort in Mac os X 10.5.2

Robert Kern-2
On Sat, Apr 12, 2008 at 9:00 PM, Andres Gonzalez-Mancera
<[hidden email]> wrote:

> Hi all,
>
> I'm trying to build Scipy with ifort on a core 2 duo iMac running 10.5.2 and
> the latest version of the developer tools. I'm using python 2.5.2 from
> python.org. In the same system I'm able to build and run Scipy with gfortran
> from the att research web site without any problems. I do not have the intel
> C compiler so I'm using gcc for this purpose.
>
> I'm using the 32 bit version of ifort 10.1.014 with 10.0.2.018 version of
> the intel MKL. I haven't been able to find concrete building instructions so
> I'm following the instructions in scipy.org except I'm using:
>
> python setup.py build_src build_clib --fcompiler=intel build_ext
> --fcompiler=intel build
>
> to build Scipy. The build process fails with the following message:

This is a known (to me, at any rate) deficiency. We simply haven't
implemented the correct link flags for the Intel Fortran compiler on
OS X. I have occasionally taken a stab at the problem, but I haven't
found a satisfactory solution. As far as I can tell, the Intel Fortran
compiler is only capable of building dynamic libraries (.dylib files),
not the bundles (.so files) which is the required format for Python
extension modules. If you come up with a set of link flags that will
create a Python extension module, please let us know.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco
_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user