Bug 860332 - linking to liblapacke.so results in undefined references
Summary: linking to liblapacke.so results in undefined references
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: lapack
Version: 17
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-25 16:01 UTC by Tony Schreiner
Modified: 2012-12-20 15:08 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-20 15:08:56 UTC
Type: Bug
Embargoed:


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

Description Tony Schreiner 2012-09-25 16:01:28 UTC
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 18:24:28 UTC
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 17:25:20 UTC
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 17:25:32 UTC
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 19:39:28 UTC
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 17:07:55 UTC
(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 15:08:59 UTC
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.