Bug 860332 - linking to liblapacke.so results in undefined references
linking to liblapacke.so results in undefined references
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: lapack (Show other bugs)
17
Unspecified Linux
unspecified Severity medium
: ---
: ---
Assigned To: Tom "spot" Callaway
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-25 12:01 EDT by Tony Schreiner
Modified: 2012-12-20 10:08 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-20 10:08:56 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
the source program (565 bytes, application/octet-stream)
2012-09-25 12:01 EDT, Tony Schreiner
no flags Details

  None (edit)
Description Tony Schreiner 2012-09-25 12:01:28 EDT
Created attachment 617101 [details]
the source program

Description of problem:
Linking a simple c program to lapacke works when using the static liblapacke.a but when using the shared liblapacke.so, it failes with undefined references

Version-Release number of selected component (if applicable):
lapack-3.4.0-2.fc17

How reproducible:
always

Steps to Reproduce:
1.a .c program with a call to LAPACKE_dgels
2.link with default shared libraries
cc dgels.o -llapacke -llapack -lblas -lgfortran -lm
3.
  
Actual results:
/usr/lib/gcc/i686-redhat-linux/4.7.0/../../../liblapacke.so: undefined reference to `zposvxx_'
/usr/lib/gcc/i686-redhat-linux/4.7.0/../../../liblapacke.so: undefined reference to `clagge_'
/usr/lib/gcc/i686-redhat-linux/4.7.0/../../../liblapacke.so: undefined reference to `clatms_'
/usr/lib/gcc/i686-redhat-linux/4.7.0/../../../liblapacke.so: undefined reference to `chesvxx_'
/usr/lib/gcc/i686-redhat-linux/4.7.0/../../../liblapacke.so: undefined reference to `cposvxx_'
/usr/lib/gcc/i686-redhat-linux/4.7.0/../../../liblapacke.so: undefined reference to `cgesvxx_'
/usr/lib/gcc/i686-redhat-linux/4.7.0/../../../liblapacke.so: undefined reference to `ssyrfsx_'
/usr/lib/gcc/i686-redhat-linux/4.7.0/../../../liblapacke.so: undefined reference to `csyrfsx_'
/usr/lib/gcc/i686-redhat-linux/4.7.0/../../../liblapacke.so: undefined reference to `dlagsy_'
....
many more, these references are mostly irrelevant to the program

Expected results:
successful linking

Additional info:
installing lapack-static and compiling with
cc dgels.c -Wl,-Bstatic -llapacke -Wl,-Bdynamic -llapack -lblas -lgfortran -lm
is successful
Comment 1 Tony Schreiner 2012-10-23 14:24:28 EDT
Have since updated to lapack-3.4.1-1 when it came out. Fewer undefined references when linking to the shared liblapacke, but still some

{cdsz}lagge_
{cz}laghe_
{cdsz}lagsy
{cdsz}latms

This also happens when using the upstream distribution.

It turns out that these functions are not in the lapack/SRC directory but in the TESTING directory and are not included in liblapack.

They should probably not be included in liblapacke either. A simple change to lapacke/src/Makefile would solve this

--- Makefile.old	2012-10-23 09:50:07.000000000 -0400
+++ Makefile	2012-10-23 09:50:26.000000000 -0400
@@ -2040,7 +2040,7 @@ lapacke_slagsy_work.o \
 lapacke_zlagsy.o \
 lapacke_zlagsy_work.o
 
-ALLOBJ = $(SRC_OBJ) $(MATGEN_OBJ) 
+ALLOBJ = $(SRC_OBJ)
 
 ifdef USEXBLAS
 ALLXOBJ = $(SXLASRC) $(DXLASRC) $(CXLASRC) $(ZXLASRC)
Comment 2 Fedora Update System 2012-10-24 13:25:20 EDT
lapack-3.4.1-2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/lapack-3.4.1-2.fc17
Comment 3 Fedora Update System 2012-10-24 13:25:32 EDT
lapack-3.4.1-2.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/lapack-3.4.1-2.fc18
Comment 4 Fedora Update System 2012-10-26 15:39:28 EDT
Package lapack-3.4.1-2.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing lapack-3.4.1-2.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-16938/lapack-3.4.1-2.fc18
then log in and leave karma (feedback).
Comment 5 Tony Schreiner 2012-10-30 13:07:55 EDT
(In reply to comment #4)
> Package lapack-3.4.1-2.fc18:
> * should fix your issue,
> * was pushed to the Fedora 18 testing repository,
> * should be available at your local mirror within two days.
> Update it with:
> # su -c 'yum update --enablerepo=updates-testing lapack-3.4.1-2.fc18'
> as soon as you are able to.
> Please go to the following url:
> https://admin.fedoraproject.org/updates/FEDORA-2012-16938/lapack-3.4.1-2.fc18
> then log in and leave karma (feedback).

Tested lapack-3.4.1-2.fc17. The issue is fixed. Thanks.
Comment 6 Fedora Update System 2012-12-20 10:08:59 EST
lapack-3.4.1-2.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.