[SciPy-user] numpy build problems...

James Evans jrevans1 at earthlink.net
Thu Jan 25 17:52:37 CST 2007


I am attempting to build numpy-1.0.1 and am seeing incorrect behavior.

 

I am using Python-2.4.4 (built as a shared library).

I have a regular build of lapack/atlas on my system.

I have modified the site.cfg file to point to the correct lib dir.

 

Following is what I get when I type "python setup.py build" 

(truncated for readability, see attached for full details)

 

Apparently the link step is doing two things wrong:

1) Not linking against python, which this is dependant upon.

2) Not specifying the '-shared' flag

 

.

 

creating build/temp.linux-i686-2.4/numpy/linalg

compile options: '-DNO_ATLAS_INFO=2 -Inumpy/core/include -Ibuild/src.linux-i686-2.4/numpy/core -Inumpy/core/src -Inumpy/core/include
-I/home/jrevans/COTS/PyTest/include/python2.4 -c'

gcc: numpy/linalg/lapack_litemodule.c

/home/jrevans/local/COTS/1.0-20060808A/bin/gcc -fPIC -Wl,-E -L/home/jrevans/local/COTS/1.0-20060808A/lib
build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o -L/home/jrevans/COTS/devel/lib -llapack -llapack -lblas -lg2c -o
build/lib.linux-i686-2.4/numpy/linalg/lapack_lite.so

/usr/lib/crt1.o: In function `_start':

(.text+0x18): undefined reference to `main'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `check_object':

numpy/linalg/lapack_litemodule.c:103: undefined reference to `PyType_IsSubtype'

numpy/linalg/lapack_litemodule.c:114: undefined reference to `PyErr_Format'

numpy/linalg/lapack_litemodule.c:109: undefined reference to `PyErr_Format'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_dgeev':

numpy/linalg/lapack_litemodule.c:149: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:165: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_dsyevd':

numpy/linalg/lapack_litemodule.c:235: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:248: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_zheevd':

numpy/linalg/lapack_litemodule.c:321: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:335: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_dgelsd':

numpy/linalg/lapack_litemodule.c:359: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:374: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_dgesv':

numpy/linalg/lapack_litemodule.c:392: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:401: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_dgesdd':

numpy/linalg/lapack_litemodule.c:424: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:466: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_dgetrf':

numpy/linalg/lapack_litemodule.c:482: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:490: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_dpotrf':

numpy/linalg/lapack_litemodule.c:504: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:510: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_dgeqrf':

numpy/linalg/lapack_litemodule.c:523: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:534: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_dorgqr':

numpy/linalg/lapack_litemodule.c:549: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:556: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_zgeev':

numpy/linalg/lapack_litemodule.c:579: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:595: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_zgelsd':

numpy/linalg/lapack_litemodule.c:620: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:635: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_zgesv':

numpy/linalg/lapack_litemodule.c:652: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:661: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_zgesdd':

numpy/linalg/lapack_litemodule.c:685: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:702: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_zgetrf':

numpy/linalg/lapack_litemodule.c:718: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:726: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_zpotrf':

numpy/linalg/lapack_litemodule.c:740: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:745: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_zgeqrf':

numpy/linalg/lapack_litemodule.c:758: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:768: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_zungqr':

numpy/linalg/lapack_litemodule.c:781: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:791: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `initlapack_lite':

numpy/linalg/lapack_litemodule.c:827: undefined reference to `Py_InitModule4'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `_import_array':

build/src.linux-i686-2.4/numpy/core/__multiarray_api.h:945: undefined reference to `PyImport_ImportModule'

build/src.linux-i686-2.4/numpy/core/__multiarray_api.h:948: undefined reference to `PyObject_GetAttrString'

build/src.linux-i686-2.4/numpy/core/__multiarray_api.h:950: undefined reference to `PyCObject_Type'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `initlapack_lite':

numpy/linalg/lapack_litemodule.c:830: undefined reference to `PyErr_Print'

numpy/linalg/lapack_litemodule.c:830: undefined reference to `PyExc_ImportError'

numpy/linalg/lapack_litemodule.c:830: undefined reference to `PyErr_SetString'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `initlapack_lite':

build/src.linux-i686-2.4/numpy/core/__multiarray_api.h:958: undefined reference to `PyExc_RuntimeError'

build/src.linux-i686-2.4/numpy/core/__multiarray_api.h:958: undefined reference to `PyErr_Format'

build/src.linux-i686-2.4/numpy/core/__multiarray_api.h:951: undefined reference to `PyCObject_AsVoidPtr'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `initlapack_lite':

numpy/linalg/lapack_litemodule.c:831: undefined reference to `PyModule_GetDict'

numpy/linalg/lapack_litemodule.c:832: undefined reference to `PyErr_NewException'

numpy/linalg/lapack_litemodule.c:833: undefined reference to `PyDict_SetItemString'

collect2: ld returned 1 exit status

/usr/lib/crt1.o: In function `_start':

(.text+0x18): undefined reference to `main'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `check_object':

numpy/linalg/lapack_litemodule.c:103: undefined reference to `PyType_IsSubtype'

numpy/linalg/lapack_litemodule.c:114: undefined reference to `PyErr_Format'

numpy/linalg/lapack_litemodule.c:109: undefined reference to `PyErr_Format'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_dgeev':

numpy/linalg/lapack_litemodule.c:149: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:165: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_dsyevd':

numpy/linalg/lapack_litemodule.c:235: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:248: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_zheevd':

numpy/linalg/lapack_litemodule.c:321: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:335: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_dgelsd':

numpy/linalg/lapack_litemodule.c:359: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:374: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_dgesv':

numpy/linalg/lapack_litemodule.c:392: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:401: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_dgesdd':

numpy/linalg/lapack_litemodule.c:424: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:466: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_dgetrf':

numpy/linalg/lapack_litemodule.c:482: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:490: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_dpotrf':

numpy/linalg/lapack_litemodule.c:504: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:510: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_dgeqrf':

numpy/linalg/lapack_litemodule.c:523: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:534: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_dorgqr':

numpy/linalg/lapack_litemodule.c:549: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:556: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_zgeev':

numpy/linalg/lapack_litemodule.c:579: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:595: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_zgelsd':

numpy/linalg/lapack_litemodule.c:620: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:635: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_zgesv':

numpy/linalg/lapack_litemodule.c:652: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:661: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_zgesdd':

numpy/linalg/lapack_litemodule.c:685: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:702: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_zgetrf':

numpy/linalg/lapack_litemodule.c:718: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:726: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_zpotrf':

numpy/linalg/lapack_litemodule.c:740: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:745: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_zgeqrf':

numpy/linalg/lapack_litemodule.c:758: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:768: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `lapack_lite_zungqr':

numpy/linalg/lapack_litemodule.c:781: undefined reference to `PyArg_ParseTuple'

numpy/linalg/lapack_litemodule.c:791: undefined reference to `Py_BuildValue'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `initlapack_lite':

numpy/linalg/lapack_litemodule.c:827: undefined reference to `Py_InitModule4'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `_import_array':

build/src.linux-i686-2.4/numpy/core/__multiarray_api.h:945: undefined reference to `PyImport_ImportModule'

build/src.linux-i686-2.4/numpy/core/__multiarray_api.h:948: undefined reference to `PyObject_GetAttrString'

build/src.linux-i686-2.4/numpy/core/__multiarray_api.h:950: undefined reference to `PyCObject_Type'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `initlapack_lite':

numpy/linalg/lapack_litemodule.c:830: undefined reference to `PyErr_Print'

numpy/linalg/lapack_litemodule.c:830: undefined reference to `PyExc_ImportError'

numpy/linalg/lapack_litemodule.c:830: undefined reference to `PyErr_SetString'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `initlapack_lite':

build/src.linux-i686-2.4/numpy/core/__multiarray_api.h:958: undefined reference to `PyExc_RuntimeError'

build/src.linux-i686-2.4/numpy/core/__multiarray_api.h:958: undefined reference to `PyErr_Format'

build/src.linux-i686-2.4/numpy/core/__multiarray_api.h:951: undefined reference to `PyCObject_AsVoidPtr'

build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o: In function `initlapack_lite':

numpy/linalg/lapack_litemodule.c:831: undefined reference to `PyModule_GetDict'

numpy/linalg/lapack_litemodule.c:832: undefined reference to `PyErr_NewException'

numpy/linalg/lapack_litemodule.c:833: undefined reference to `PyDict_SetItemString'

collect2: ld returned 1 exit status

error: Command "/home/jrevans/local/COTS/1.0-20060808A/bin/gcc -fPIC -Wl,-E -L/home/jrevans/local/COTS/1.0-20060808A/lib
build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o -L/home/jrevans/COTS/devel/lib -llapack -llapack -lblas -lg2c -o
build/lib.linux-i686-2.4/numpy/linalg/lapack_lite.so" failed with exit status 1

 

Thanks,

--James Evans

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20070125/4345c290/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.zip
Type: application/octet-stream
Size: 4702 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/scipy-user/attachments/20070125/4345c290/attachment-0001.obj 


More information about the SciPy-user mailing list