Bug#722252: lapack: -Bsymbolic-functions prevents override of xerblas_

Julian Taylor jtaylor.debian at googlemail.com
Mon Sep 9 13:30:53 UTC 2013


Package: lapack
Version: 3.4.2+dfsg-1
Severity: wishlist

The lapack build uses dpkg-buildflags --get LDFLAGS to obtain the LDFLAGS.
This can include -Bsymbolic-functions in some distributions (e.g. 
ubuntu, but not debian).
The use of -Bsymbolic-functions to create liblapack.so binds the 
xerblas_ implementation to the one provided in lapack itself.
This is very problematic as the lapack xerblas_ aborts the process on 
invalid parameters.
User programs must have the option to override this error handler with 
their own code.

To fix this to work on all derivatives and in case of a debian default 
change please adapt the build do handle it.
There are two options, either strip the variable from dpkg-buildflags 
output (DEB_LDFLAGS_STRIP) or keep it in and provide ld with a list of 
functions to not bind to the library with --dynamic-list:

$ cat lapack.dym
{
   xerblas;
# or LAPACKE_xerblas;
};

§ gcc -shared ... -Bsymoblic-functions --dynamic-list=lapack.dym


To test it use attached c file (linked against liblapacke) which should 
print the overrided xerblas. This could be used as an autopkgtest so 
derivatives are notified of the issue when they change their dpkg defaults.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lapacke.c
Type: text/x-csrc
Size: 690 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20130909/6b1b2aa7/attachment.c>


More information about the debian-science-maintainers mailing list