![](https://secure.gravatar.com/avatar/c5b4fd92db0b1c7f6e03da5d7170ca23.jpg?s=120&d=mm&r=g)
Hi, I tried "python setup.py install" (Python2.4) in order to get Numeric-23.6 messages : running install running build running build_py running build_ext building 'lapack_lite' extension gcc -pthread -shared build/temp.linux-i686-2.4/Src/lapack_litemodule.o -L/usr/lib/atlas -llapack -lcblas -lf77blas -latlas -lg2c -o build/lib.linux-i686-2.4/lapack_lite.so error : /usr/i486-suse-linux/bin/ld: cannot find -llapack collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Please, what is missing ? -- René Bastian http://www.musiques-rb.org : Musique en Python
![](https://secure.gravatar.com/avatar/5dde29b54a3f1b76b2541d0a4a9b232c.jpg?s=120&d=mm&r=g)
René Bastian wrote:
I tried "python setup.py install" (Python2.4) in order to get Numeric-23.6
/usr/i486-suse-linux/bin/ld: cannot find -llapack
AARRGG!! I can't believe this bug is still there! Who is responsible for maintaining the setup.py for Numeric? This has been discussed numerous times on this list, does there need to be a bug report officially filed somewhere? Anyway, the problem is that it's looking for lapack libs that you don't have. By default, setup.py is supposed to be configured to use only the built-in lapack-lite, so it should build anywhere. I've looked in the setup.py, and found that it's closer, but apparently not fixed. I've got lapack on my system, so it's hard for me to test, but try making these changes in setup.py: # delete all but the first one in this list if using your own LAPACK/BLAS #This looks to be right: sourcelist = [os.path.join('Src', 'lapack_litemodule.c'), # os.path.join('Src', 'blas_lite.c'), # os.path.join('Src', 'f2c_lite.c'), # os.path.join('Src', 'zlapack_lite.c'), # os.path.join('Src', 'dlapack_lite.c') ] # set these to use your own BLAS; #library_dirs_list = ['/usr/lib/atlas'] library_dirs_list = [] #libraries_list = ['lapack', 'cblas', 'f77blas', 'atlas', 'g2c'] # if you also set `use_dotblas` (see below), you'll need: # ['lapack', 'cblas', 'f77blas', 'atlas', 'g2c'] libraries_list = [] # set to true (1), if you also want BLAS optimized #matrixmultiply/dot/innerproduct #use_dotblas = 1 use_dotblas = 0 #include_dirs = ['/usr/include/atlas'] # You may need to set this to include_dirs = [] find cblas.h # e.g. on UNIX using ATLAS this should be ['/usr/include/atlas'] Note that some of those may be harmless, even if they don't exist, but it won't hurt to get rid of paths you don't have anyway. Also, if you are doing any linear algebra, you'll get much better performance with a native lapack, such as the atlas one, so you may want to get that installed, rather than making this fix. search this list for lapack and/or atlas, to learn how. Suse is likely to provide an atlas rpm. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov
![](https://secure.gravatar.com/avatar/c5b4fd92db0b1c7f6e03da5d7170ca23.jpg?s=120&d=mm&r=g)
Thanks! Now it work's. I will see if numpy is faster than numarray for my music/audio business. Le Mardi 4 Janvier 2005 18:24, Chris Barker a écrit :
René Bastian wrote:
I tried "python setup.py install" (Python2.4) in order to get Numeric-23.6
/usr/i486-suse-linux/bin/ld: cannot find -llapack
AARRGG!! I can't believe this bug is still there! Who is responsible for maintaining the setup.py for Numeric? This has been discussed numerous times on this list, does there need to be a bug report officially filed somewhere?
Anyway, the problem is that it's looking for lapack libs that you don't have. By default, setup.py is supposed to be configured to use only the built-in lapack-lite, so it should build anywhere.
I've looked in the setup.py, and found that it's closer, but apparently not fixed. I've got lapack on my system, so it's hard for me to test, but try making these changes in setup.py:
# delete all but the first one in this list if using your own LAPACK/BLAS
#This looks to be right:
sourcelist = [os.path.join('Src', 'lapack_litemodule.c'), # os.path.join('Src', 'blas_lite.c'), # os.path.join('Src', 'f2c_lite.c'), # os.path.join('Src', 'zlapack_lite.c'), # os.path.join('Src', 'dlapack_lite.c') ] # set these to use your own BLAS;
#library_dirs_list = ['/usr/lib/atlas'] library_dirs_list = [] #libraries_list = ['lapack', 'cblas', 'f77blas', 'atlas', 'g2c'] # if you also set `use_dotblas` (see below), you'll need: # ['lapack', 'cblas', 'f77blas', 'atlas', 'g2c']
libraries_list = []
# set to true (1), if you also want BLAS optimized #matrixmultiply/dot/innerproduct #use_dotblas = 1 use_dotblas = 0 #include_dirs = ['/usr/include/atlas'] # You may need to set this to include_dirs = []
Note that some of those may be harmless, even if they don't exist, but it won't hurt to get rid of paths you don't have anyway.
Also, if you are doing any linear algebra, you'll get much better performance with a native lapack, such as the atlas one, so you may want to get that installed, rather than making this fix. search this list for lapack and/or atlas, to learn how.
Suse is likely to provide an atlas rpm.
-Chris
-- René Bastian http://www.musiques-rb.org : Musique en Python
![](https://secure.gravatar.com/avatar/80473ff660f57aa7f90affadd2240008.jpg?s=120&d=mm&r=g)
Chris Barker wrote:
Suse is likely to provide an atlas rpm.
How? I've struggled with trying to create ATLAS RPMs in order to maintain it locally, but the rpm program doesn't have the hooks to distinguish between the various architectures ATLAS supports; it distinguishes between Athlon and Pentium, for example, and an ATLAS library built on the former core dumps on the latter. It would also be nice if ATLAS could be made a shared library, but that's also not supported at this time. Without it, Numeric and numarray built against ATLAS inherit its architecture dependence. It makes maintaining all of this at our site a real pain.
![](https://secure.gravatar.com/avatar/fa19cc49b962fc962fef716c010b7c39.jpg?s=120&d=mm&r=g)
On Tue, 2005-01-04 at 10:10 -0800, Stephen Walton wrote:
Chris Barker wrote:
Suse is likely to provide an atlas rpm.
How? I've struggled with trying to create ATLAS RPMs in order to maintain it locally, but the rpm program doesn't have the hooks to distinguish between the various architectures ATLAS supports; it distinguishes between Athlon and Pentium, for example, and an ATLAS library built on the former core dumps on the latter.
It would also be nice if ATLAS could be made a shared library, but that's also not supported at this time.
ATLAS is built as a shared library in Debian, named libatlas.so.3 and libblas.so.3.
Without it, Numeric and numarray built against ATLAS inherit its architecture dependence. It makes maintaining all of this at our site a real pain.
In Debian there are several packages that "Provide" the atlas shared libraries (atlas3-base, atlas3-sse atlas3-sse2 atlas3-3dnow). A dependent package would "Depend" on the generic name. I don't know anything about how RPM's support for "Provides" works, but I would assume that you can manage something similar. The preinstall scripts for each one verify that the CPU supports the instructions used in the package. HTH, -Jonathan
![](https://secure.gravatar.com/avatar/5dde29b54a3f1b76b2541d0a4a9b232c.jpg?s=120&d=mm&r=g)
Stephen Walton wrote:
How? I've struggled with trying to create ATLAS RPMs in order to maintain it locally, but the rpm program doesn't have the hooks to distinguish between the various architectures ATLAS supports; it distinguishes between Athlon and Pentium, for example, and an ATLAS library built on the former core dumps on the latter.
sorry, I can't help here. I'm running Gentoo, which has a "compile everything yourself" philosophy! René Bastian wrote:
Numeric is installed but :
Traceback (most recent call last): File "benchmark.py", line 93, in ? test00() File "benchmark.py", line 8, in test00 import RandomArray as RA File "/usr/local/lib/python2.4/site-packages/Numeric/RandomArray.py", line 3, in ? import LinearAlgebra File "/usr/local/lib/python2.4/site-packages/Numeric/LinearAlgebra.py", line 8, in ? import lapack_lite ImportError: /usr/local/lib/python2.4/site-packages/Numeric/lapack_lite.so: undefined symbol: dgesdd_
Something wrong ?
Sorry, I'm kind of out of my depth here, but one thing I would try is to trash the build directory of Numeric, and build again, just to make sure you're re-building everything. You might want to delete the /usr/lib/python2.3/site-packages/Numeric Directory too, before installing. - Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov
participants (4)
-
Chris Barker
-
Jonathan Brandmeyer
-
René Bastian
-
Stephen Walton