FS#9905 - Blas package from netlib is different from the provided by Lapack

Attached to Project: Arch Linux
Opened by Kazuo Teramoto (kazuo) - Saturday, 22 March 2008, 06:44 GMT
Last edited by Jan de Groot (JGC) - Monday, 03 November 2008, 10:42 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Damir Perisa (damir.perisa)
Architecture All
Severity Medium
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No


Trying to compile python-scipy I found a strange inconsistency on blas package from netlib it don't include some files that Lapack include and use, like scabs1.f. With this the scipy can't be compiled. Stopping with the follow error:

ImportError: /usr/lib/libblas.so.3: undefined symbol: scabs1_

If I change the PKGBUILD (I make a new blas.tgz and add a scabs1.o to the Makefile) to use the BLAS dist provided by LAPACK it compile and works.

I don't know are the problem is (I have nearly zero knowledge about how lapack and blas works) but what I know is that the current blas package break scipy (and pygsl too)

Attached is file of the differences from a diff -u of the contents of the two distros
This task depends upon

Closed by  Jan de Groot (JGC)
Monday, 03 November 2008, 10:42 GMT
Reason for closing:  Fixed
Additional comments about closing:  Assuming fixed in blas 20070405-1.
Comment by Kazuo Teramoto (kazuo) - Sunday, 23 March 2008, 22:46 GMT
PS. I'm using x86_64.
Comment by Kazuo Teramoto (kazuo) - Sunday, 23 March 2008, 22:51 GMT
New info, the source tarball from ubuntu have the scabs1.f. I'm thinking that blas from netlib is not the "correctly" one... (man, ubuntu have 341kb of patches for blas, the source tarball have 420kb!)
Comment by xiao er (xia0er) - Monday, 24 March 2008, 20:25 GMT
It seems that the BLAS package in LAPACK is known to miss some routines (http://icl.cs.utk.edu/lapack-forum/archives/lapack/msg00120.html). I don't know why it has been working well before the the current upgrade of blas (1.4), which is basically just a recompile of 1.3 and the source tar file blas.tgz hasn't been changed since 04/05/2007 according to its time stamp.
Another alternative solution is to install atlas-lapack from AUR (the PKGBUILD in the package won't build, but the one provided by buggs in the comment works), which provides optimized BLAS and LAPACK. Now I need to get R working with this atlas-lapack.
Comment by Cristian Höner zu Siederdissen (choener) - Wednesday, 26 March 2008, 12:37 GMT
Basically all *.f files are missing their corresponding object files for inclusion in the library. A solution would be to include them all.
Comment by Travis (tesjo) - Thursday, 27 March 2008, 18:14 GMT
Yes it seems the object files just need to be added to the Makefile. I simply added scabs1.o to the OBJS list and then rebuilt with makepkg and it worked for me.
Comment by Kazuo Teramoto (kazuo) - Saturday, 29 March 2008, 03:49 GMT
Ok, I now understand, I don't know why but the first time I looked I don't found the scabs1.f on blas.tgz... So we only need to add the scabs1.o to makefile to fix the problem.

Sorry for the wrong bug report...
Comment by Travis (tesjo) - Saturday, 29 March 2008, 05:33 GMT
I would definitely call this a bug and think the blas Makefile needs to be fixed. It may be strictly due to gcc 4.3, I've had to change some of my own programs to compile them just header stuff, but things seem more strict.
Comment by Levin Du (levose) - Tuesday, 20 May 2008, 08:43 GMT
I met this problem today when using scipy.


$ python
from scipy import *

which throws an error:
ImportError: /usr/lib/libblas.so.3: undefined symbol: scabs1_

So I do an objdump:

$ objdump -t libblas.so | grep scabs1
0002c430 g F .text 00000013 scabs1_

The symbol is really not defined.

I try to build it from abs, and find that 'scabs1.o' is missing in the Makefile.
After adding it, build the package and install, scipy is imported happily now.

Patch attached. Hope the problem is solved soon.

Comment by Levin Du (levose) - Tuesday, 20 May 2008, 08:46 GMT
oh, forgot to mention that the patch above is against Makefile in ABS, not the one in blas.tgz.
Comment by Damir Perisa (damir.perisa) - Tuesday, 20 May 2008, 23:02 GMT
blas-19980702-5-x86_64 built to include scabs1
Comment by Greg (dolby) - Monday, 21 July 2008, 15:29 GMT
Is this solved?