[SciPy-user] Installing scipy: getting worse..

Gnata Xavier gnata at obs.univ-lyon1.fr
Tue Jan 23 11:25:40 CST 2007


Hi,

undefined symbol: ATL_cGetNB : Ok, looks like you have problem with the way you link lapack, blass and atlas after you compile it.

I cannot remember your way to compile all this stuff because it is not needed on my box :). 
Google tells me that "libatlas needs to be linked in after liblapack"

A line containing //"-latlas -llapack" is wrong. It should be "//-llapack -latlas" or "-llapack -lf77blas -latlas" if needed.

I hope this helps.

I have no clue why you haven't seen this bug before.
Maybe just because this function was not yet wrapped in scipy...

Xavier


> Hi,
>
> after the trouble I had with lapack and blas, I decided to reinstall
> everything..
> Now I end up with a different (still annoying) message about libraries
> not being found.
> Here it is (and below I provide the details of what I have done to
> install everything again).
>
> Any help is VERY welcome ....!!!
>
> Eric
>
> ### Doing a config on scipy gives:
> python setup.py config
>
> Traceback (most recent call last):
>   File "setup.py", line 55, in ?
>     setup_package()
>   File "setup.py", line 28, in setup_package
>     from numpy.distutils.core import setup
>   File "/usr/local/lib/python2.4/site-packages/numpy/__init__.py", line
> 40, in ?
>     import linalg
>   File
> "/usr/local/lib/python2.4/site-packages/numpy/linalg/__init__.py", line
> 4, in ?
>     from linalg import *
>   File "/usr/local/lib/python2.4/site-packages/numpy/linalg/linalg.py",
> line 25, in ?
>     from numpy.linalg import lapack_lite
> ImportError:
> /usr/local/lib/python2.4/site-packages/numpy/linalg/lapack_lite.so:
> undefined symbol: ATL_cGetNB
>
> ######### Here are the details of my installation:
> ################# NUMPY/SCIPY ##################
> ## INSTALLATION including blas, lapack, atlas ##
> ################################################
>
> ## Getting the svn for numpy and scipy
> svn co http://svn.scipy.org/svn/numpy/trunk numpy
> svn co http://svn.scipy.org/svn/scipy/trunk scipy
>
> ## allowing root
> su
>
> ## build and install numpy
> cd numpy
> python setup.py install >& inst.log &
> tail -f inst.log
>
> ## Going to scipy directory to build everything else
> cd ..
> cd scipy
>
> ## First BLAS
> mkdir -p blas
> cd blas
> ## Getting the archive
> wget http://www.netlib.org/blas/blas.tgz
> tar xvzf blas.tgz
> ## Compiling
> g77 -fno-second-underscore -O2 -c *.f
> ## Making the library
> ar r libfblas.a *.o
> ranlib libfblas.a
> ## Cleaning
> rm -rf *.o
> ## Coping the output where it should be
> cp libfblas.a /usr/local/lib
> # For bash use export, for tcsh use setenv of course
> # export BLAS=/usr/local/lib/libfblas.a
> setenv BLAS /usr/local/lib/libfblas.a
>
> ## Doing LAPACK now
> cd ..
> wget http://www.netlib.org/lapack/lapack.tgz
> tar xzf lapack.tgz
> cd lapack-3.1.0
> cp INSTALL/make.inc.LINUX make.inc
>
> ######
> Now you must edit make.inc and change (if necessary) the following values:
> OPTS = "-O2"
> ######
> ## !!!!!!
> ## WARNING
> ## With 10.2 OpenSuse you must do:
> ## cd /lib
> ## ln -s libgcc_s.so.1 libgcc_s.so
> ## Maybe it will be corrected later
> ## !!!!!!
> ######
>
> make lapacklib >& make.log &
> tail -f make.log
>
> ######
> ## Now we obtain and compile the ATLAS package. Get it from:
> ## https://sourceforge.net/projects/math-atlas/
> ######
> ##
> ## !!!!!!
> ## Seems that version 3.6.0 does not always work and provide errors such as:
> ## make[3]: *** [res/cMMRES] Erreur 255
> ## GetMMRES: Assertion `fp' failed.
> ##
> ## -> so getting the latest "unstable version": 3.7.25
> ##
> cd scipy
> bunzip2 atlas3.7.25.tar.bz2
> tar xvf atlas3.7.25.tar
>
> ## CPU THROTTLING OFF (otherwise ATLAS builing makes no sense )
> cpufreq-set -g performance
> ## compiling ATLAS
> cd ATLAS
> ## giving a name for this build
> mkdir ATLAS_Linux_P4E ; cd ATLAS_Linux_P4E
> ../configure
>
> ## Now merging the lapack lib and the programs from atlas
> make
> cd lib
> mkdir tmp
> cd tmp
> ## extracting the obj from ATLAS lapack lib
> ar x ../liblapack.a
> cp ../liblapack.a ../liblapack.a.sav
> cp ../../../../lapack-3.1.0/lapack_LINUX.a ../liblapack.a
> ## adding files to the lapack lib from lapack
> ar r ../liblapack.a *.o   
> cd ..
> rm -rf tmp
> cp liblapack.a /usr/local/lib
> # export LAPACK=/usr/local/lib/liblapack.a
> setenv LAPACK /usr/local/lib/liblapack.a
> mkdir /usr/local/lib/atlas
> cp *.a /usr/local/lib/atlas
> # export ATLAS=/usr/local/lib/atlas
> setenv ATLAS /usr/local/lib/atlas
>
> ## Until that point everything seems to have gone ok, but now...
> cd ../../..
> python setup.py install
>
> ==> crashing with the message mentioned above
>
>   



More information about the SciPy-user mailing list