[Scipy-tickets] [SciPy] #315: Build succeeds but fails to link correct libraries: Mac OS X 10.4.8, gcc 4.0.1

SciPy scipy-tickets at scipy.net
Sat Nov 25 21:47:37 CST 2006


#315: Build succeeds but fails to link correct libraries: Mac OS X 10.4.8, gcc
4.0.1
--------------------+-------------------------------------------------------
 Reporter:  nmb     |        Owner:  somebody
     Type:  defect  |       Status:  new     
 Priority:  normal  |    Milestone:          
Component:  Other   |      Version:          
 Severity:  normal  |   Resolution:          
 Keywords:          |  
--------------------+-------------------------------------------------------
Old description:

> I am trying to build scipy on Mac OS X 10.4.8 with gcc 4.0.1.  A build
> from SVN succeeds and 'import scipy' completes, but 'scipy.test(10)'
> fails with:
>
> ======================================================================
> ERROR: check_integer (scipy.io.tests.test_array_import.test_read_array)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
> /site-packages/scipy/io/tests/test_array_import.py", line 55, in
> check_integer
>     from scipy import stats
>   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
> /site-packages/scipy/stats/__init__.py", line 7, in ?
>     from stats import *
>   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
> /site-packages/scipy/stats/stats.py", line 190, in ?
>     import scipy.special as special
>   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
> /site-packages/scipy/special/__init__.py", line 8, in ?
>     from basic import *
>   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
> /site-packages/scipy/special/basic.py", line 8, in ?
>     from _cephes import *
> ImportError: Failure linking new module:
> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-
> packages/scipy/special/_cephes.so: Symbol not found: _printf$LDBLStub
>   Referenced from:
> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-
> packages/scipy/special/_cephes.so
>   Expected in: flat namespace
>

>
> Compiling with LDFLAGS=-lSystemStubs (the usual fix to this problem)
> fails to build with the error:
>
> building 'scipy.fftpack._fftpack' extension
> compiling C sources
> C compiler: gcc -arch ppc -arch i386 -isysroot
> /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double
> -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3
>
> creating build/temp.macosx-10.3-fat-2.4/build
> creating build/temp.macosx-10.3-fat-2.4/build/src.macosx-10.3-fat-2.4
> creating build/temp.macosx-10.3-fat-2.4/build/src.macosx-10.3-fat-2.4/Lib
> creating
> build/temp.macosx-10.3-fat-2.4/build/src.macosx-10.3-fat-2.4/Lib/fftpack
> creating build/temp.macosx-10.3-fat-2.4/Lib/fftpack/src
> compile options: '-DSCIPY_FFTW3_H -I/usr/local/include
> -Ibuild/src.macosx-10.3-fat-2.4
> -I/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-
> packages/numpy/core/include
> -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c'
> gcc: build/src.macosx-10.3-fat-2.4/fortranobject.c
> gcc: Lib/fftpack/src/zrfft.c
> gcc: Lib/fftpack/src/drfft.c
> gcc: build/src.macosx-10.3-fat-2.4/Lib/fftpack/_fftpackmodule.c
> gcc: Lib/fftpack/src/zfft.c
> gcc: Lib/fftpack/src/zfftnd.c
> xlf95 -lSystemStubs
> build/temp.macosx-10.3-fat-2.4/build/src.macosx-10.3-fat-2.4/Lib/fftpack/_fftpackmodule.o
> build/temp.macosx-10.3-fat-2.4/Lib/fftpack/src/zfft.o
> build/temp.macosx-10.3-fat-2.4/Lib/fftpack/src/drfft.o
> build/temp.macosx-10.3-fat-2.4/Lib/fftpack/src/zrfft.o
> build/temp.macosx-10.3-fat-2.4/Lib/fftpack/src/zfftnd.o
> build/temp.macosx-10.3-fat-2.4/build/src.macosx-10.3-fat-2.4/fortranobject.o
> -L/usr/local/lib -Lbuild/temp.macosx-10.3-fat-2.4 -ldfftpack -lfftw3 -o
> build/lib.macosx-10.3-fat-2.4/scipy/fftpack/_fftpack.so
> /usr/bin/ld: Undefined symbols:
> _main
> _PyArg_ParseTupleAndKeywords
> _PyCObject_AsVoidPtr
> _PyCObject_Type
> _PyComplex_Type
> _PyDict_SetItemString
> _PyErr_Clear
> _PyErr_Format
> _PyErr_NewException
> _PyErr_Occurred
> _PyErr_Print
> _PyErr_SetString
> _PyExc_ImportError
> _PyExc_RuntimeError
> _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_InitModule4
> __Py_NoneStruct
> _fprintf$LDBLStub
> _PyCObject_FromVoidPtr
> _PyDict_DelItemString
> _PyDict_GetItemString
> _PyDict_New
> _PyExc_AttributeError
> _PyExc_TypeError
> _PyExc_ValueError
> _PyObject_Free
> _PyObject_Str
> _PyObject_Type
> _PyString_AsString
> _PyString_ConcatAndDel
> _Py_FindMethod
> __PyObject_New
> _sprintf$LDBLStub
> /usr/bin/ld: Undefined symbols:
> _main
> _PyArg_ParseTupleAndKeywords
> _PyCObject_AsVoidPtr
> _PyCObject_Type
> _PyComplex_Type
> _PyDict_SetItemString
> _PyErr_Clear
> _PyErr_Format
> _PyErr_NewException
> _PyErr_Occurred
> _PyErr_Print
> _PyErr_SetString
> _PyExc_ImportError
> _PyExc_RuntimeError
> _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_InitModule4
> __Py_NoneStruct
> _fprintf$LDBLStub
> _PyCObject_FromVoidPtr
> _PyDict_DelItemString
> _PyDict_GetItemString
> _PyDict_New
> _PyExc_AttributeError
> _PyExc_TypeError
> _PyExc_ValueError
> _PyObject_Free
> _PyObject_Str
> _PyObject_Type
> _PyString_AsString
> _PyString_ConcatAndDel
> _Py_FindMethod
> __PyObject_New
> _sprintf$LDBLStub
> error: Command "xlf95 -lSystemStubs
> build/temp.macosx-10.3-fat-2.4/build/src.macosx-10.3-fat-2.4/Lib/fftpack/_fftpackmodule.o
> build/temp.macosx-10.3-fat-2.4/Lib/fftpack/src/zfft.o
> build/temp.macosx-10.3-fat-2.4/Lib/fftpack/src/drfft.o
> build/temp.macosx-10.3-fat-2.4/Lib/fftpack/src/zrfft.o
> build/temp.macosx-10.3-fat-2.4/Lib/fftpack/src/zfftnd.o
> build/temp.macosx-10.3-fat-2.4/build/src.macosx-10.3-fat-2.4/fortranobject.o
> -L/usr/local/lib -Lbuild/temp.macosx-10.3-fat-2.4 -ldfftpack -lfftw3 -o
> build/lib.macosx-10.3-fat-2.4/scipy/fftpack/_fftpack.so" failed with exit
> status 1
>

>
> Version information is:
>
> numpy : 1.0.1.dev3460
> scipy: 0.5.2.dev838
> gcc: 4.0.1
> fortran: xlf 8.1

New description:

 I am trying to build scipy on Mac OS X 10.4.8 with gcc 4.0.1.  A build
 from SVN succeeds and 'import scipy' completes, but 'scipy.test(10)' fails
 with:

 {{{

 ======================================================================
 ERROR: check_integer (scipy.io.tests.test_array_import.test_read_array)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/io/tests/test_array_import.py", line 55, in
 check_integer
     from scipy import stats
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/stats/__init__.py", line 7, in ?
     from stats import *
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/stats/stats.py", line 190, in ?
     import scipy.special as special
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/special/__init__.py", line 8, in ?
     from basic import *
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
 /site-packages/scipy/special/basic.py", line 8, in ?
     from _cephes import *
 ImportError: Failure linking new module:
 /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-
 packages/scipy/special/_cephes.so: Symbol not found: _printf$LDBLStub
   Referenced from:
 /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-
 packages/scipy/special/_cephes.so
   Expected in: flat namespace
 }}}

 Compiling with LDFLAGS=-lSystemStubs (the usual fix to this problem) fails
 to build with the error:

 {{{

 building 'scipy.fftpack._fftpack' extension
 compiling C sources
 C compiler: gcc -arch ppc -arch i386 -isysroot
 /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-
 cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3

 creating build/temp.macosx-10.3-fat-2.4/build
 creating build/temp.macosx-10.3-fat-2.4/build/src.macosx-10.3-fat-2.4
 creating build/temp.macosx-10.3-fat-2.4/build/src.macosx-10.3-fat-2.4/Lib
 creating
 build/temp.macosx-10.3-fat-2.4/build/src.macosx-10.3-fat-2.4/Lib/fftpack
 creating build/temp.macosx-10.3-fat-2.4/Lib/fftpack/src
 compile options: '-DSCIPY_FFTW3_H -I/usr/local/include
 -Ibuild/src.macosx-10.3-fat-2.4
 -I/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-
 packages/numpy/core/include
 -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c'
 gcc: build/src.macosx-10.3-fat-2.4/fortranobject.c
 gcc: Lib/fftpack/src/zrfft.c
 gcc: Lib/fftpack/src/drfft.c
 gcc: build/src.macosx-10.3-fat-2.4/Lib/fftpack/_fftpackmodule.c
 gcc: Lib/fftpack/src/zfft.c
 gcc: Lib/fftpack/src/zfftnd.c
 xlf95 -lSystemStubs
 build/temp.macosx-10.3-fat-2.4/build/src.macosx-10.3-fat-2.4/Lib/fftpack/_fftpackmodule.o
 build/temp.macosx-10.3-fat-2.4/Lib/fftpack/src/zfft.o
 build/temp.macosx-10.3-fat-2.4/Lib/fftpack/src/drfft.o
 build/temp.macosx-10.3-fat-2.4/Lib/fftpack/src/zrfft.o
 build/temp.macosx-10.3-fat-2.4/Lib/fftpack/src/zfftnd.o
 build/temp.macosx-10.3-fat-2.4/build/src.macosx-10.3-fat-2.4/fortranobject.o
 -L/usr/local/lib -Lbuild/temp.macosx-10.3-fat-2.4 -ldfftpack -lfftw3 -o
 build/lib.macosx-10.3-fat-2.4/scipy/fftpack/_fftpack.so
 /usr/bin/ld: Undefined symbols:
 _main
 _PyArg_ParseTupleAndKeywords
 _PyCObject_AsVoidPtr
 _PyCObject_Type
 _PyComplex_Type
 _PyDict_SetItemString
 _PyErr_Clear
 _PyErr_Format
 _PyErr_NewException
 _PyErr_Occurred
 _PyErr_Print
 _PyErr_SetString
 _PyExc_ImportError
 _PyExc_RuntimeError
 _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_InitModule4
 __Py_NoneStruct
 _fprintf$LDBLStub
 _PyCObject_FromVoidPtr
 _PyDict_DelItemString
 _PyDict_GetItemString
 _PyDict_New
 _PyExc_AttributeError
 _PyExc_TypeError
 _PyExc_ValueError
 _PyObject_Free
 _PyObject_Str
 _PyObject_Type
 _PyString_AsString
 _PyString_ConcatAndDel
 _Py_FindMethod
 __PyObject_New
 _sprintf$LDBLStub
 /usr/bin/ld: Undefined symbols:
 _main
 _PyArg_ParseTupleAndKeywords
 _PyCObject_AsVoidPtr
 _PyCObject_Type
 _PyComplex_Type
 _PyDict_SetItemString
 _PyErr_Clear
 _PyErr_Format
 _PyErr_NewException
 _PyErr_Occurred
 _PyErr_Print
 _PyErr_SetString
 _PyExc_ImportError
 _PyExc_RuntimeError
 _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_InitModule4
 __Py_NoneStruct
 _fprintf$LDBLStub
 _PyCObject_FromVoidPtr
 _PyDict_DelItemString
 _PyDict_GetItemString
 _PyDict_New
 _PyExc_AttributeError
 _PyExc_TypeError
 _PyExc_ValueError
 _PyObject_Free
 _PyObject_Str
 _PyObject_Type
 _PyString_AsString
 _PyString_ConcatAndDel
 _Py_FindMethod
 __PyObject_New
 _sprintf$LDBLStub
 error: Command "xlf95 -lSystemStubs
 build/temp.macosx-10.3-fat-2.4/build/src.macosx-10.3-fat-2.4/Lib/fftpack/_fftpackmodule.o
 build/temp.macosx-10.3-fat-2.4/Lib/fftpack/src/zfft.o
 build/temp.macosx-10.3-fat-2.4/Lib/fftpack/src/drfft.o
 build/temp.macosx-10.3-fat-2.4/Lib/fftpack/src/zrfft.o
 build/temp.macosx-10.3-fat-2.4/Lib/fftpack/src/zfftnd.o
 build/temp.macosx-10.3-fat-2.4/build/src.macosx-10.3-fat-2.4/fortranobject.o
 -L/usr/local/lib -Lbuild/temp.macosx-10.3-fat-2.4 -ldfftpack -lfftw3 -o
 build/lib.macosx-10.3-fat-2.4/scipy/fftpack/_fftpack.so" failed with exit
 status 1

 }}}

 Version information is:

 {{{

 numpy : 1.0.1.dev3460
 scipy: 0.5.2.dev838
 gcc: 4.0.1
 fortran: xlf 8.1
 }}}

Comment (by rkern):

 Note that using the environment variable LDFLAGS ''replaces'' all of the
 linker flags not adds to them. If you need to add libraries, pass the
 {{{-lSystemStubs}}} command line option to the {{{build_ext}}} command.

-- 
Ticket URL: <http://projects.scipy.org/scipy/scipy/ticket/315#comment:1>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list