[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Please help upgrading eigensoft



Good morning Andreas,

Check this patch, it should help.
It does the same thing as lapacke.patch (which is commented in debian/patches/series file) - it adds a -llapack and -llapacke to LDLIBS in src/Makefile. It also adds -lpthread - without it, this error appears during compilation: "undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'"

I also changed include lines
    #include "../lapack/lapacke/include/lapacke.h"
- in src/eigensrc/eigx.c and
    #include "lapack/lapacke/include/lapacke.h"
- in src/eigx.c
to line
    #include <lapacke.h>
since lapacke is installed system-wide, and this header is not located in relative directory. It may be pointless, since this header is included only when package is compiled on _WIN32 platforms. Remove these parts of patch if you think it doesn't make sense. Patching src/Makefile is enough to make everything work.

2016-07-18 23:21 GMT+03:00 Andreas Tille <andreas@an3as.eu>:
Hi,

I tried to upgrade eigensoft[1].  The build fails with:

...
cc -Wl,-z,relro  pca.o eigensrc/eigsubs.o eigx.o nicksrc/libnick.a  -lgsl -lblas -lgfortran -lrt -lm -o pca
eigx.o: In function `eigx_':
/build/eigensoft-6.1.2+dfsg/src/eigx.c:100: undefined reference to `dspev_'
eigx.o: In function `eigxv_':
/build/eigensoft-6.1.2+dfsg/src/eigx.c:126: undefined reference to `dspev_'
eigx.o: In function `cdc_':
/build/eigensoft-6.1.2+dfsg/src/eigx.c:145: undefined reference to `dpotrf_'
eigx.o: In function `inverse_':
/build/eigensoft-6.1.2+dfsg/src/eigx.c:186: undefined reference to `dgetrf_'
/build/eigensoft-6.1.2+dfsg/src/eigx.c:194: undefined reference to `dgetri_'
eigx.o: In function `solve_':
/build/eigensoft-6.1.2+dfsg/src/eigx.c:223: undefined reference to `dgetrf_'
/build/eigensoft-6.1.2+dfsg/src/eigx.c:230: undefined reference to `dgetrs_'
eigx.o: In function `geneigsolve_':
/build/eigensoft-6.1.2+dfsg/src/eigx.c:250: undefined reference to `dsygv_'
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'pca' failed
make[2]: *** [pca] Error 1
...

That's strange sinde the according functions have prototypes in the very
same c file.  Any idea what might be wrong here?

Kind regards

       Andreas.


[1] https://anonscm.debian.org/debian-med/eigensoft.git

--
http://fam-tille.de




--
Best wishes,
Tanya.
--- eigensoft.orig/src/eigensrc/eigx.c
+++ eigensoft/src/eigensrc/eigx.c
@@ -12,7 +12,7 @@
 
 #define HAVE_LAPACK_CONFIG_H
 #define LAPACK_COMPLEX_STRUCTURE
-#include "../lapack/lapacke/include/lapacke.h"
+#include <lapacke.h>
 typedef int __CLPK_integer;
 
 typedef double __CLPK_doublereal;
--- eigensoft.orig/src/eigx.c
+++ eigensoft/src/eigx.c
@@ -12,7 +12,7 @@
 
 #define HAVE_LAPACK_CONFIG_H
 #define LAPACK_COMPLEX_STRUCTURE
-#include "lapack/lapacke/include/lapacke.h"
+#include <lapacke.h>
 typedef int __CLPK_integer;
 
 typedef double __CLPK_doublereal;
--- eigensoft.orig/src/Makefile
+++ eigensoft/src/Makefile
@@ -1,5 +1,5 @@
 CFLAGS += -I../include
-LDLIBS += -lgsl -lblas -lgfortran -lrt -lm
+LDLIBS += -lgsl -lblas -lgfortran -lrt -lm -llapacke -llapack -lpthread
 
 ifeq ($(OPTIMIZE), 1)
 	CFLAGS += -O2

Reply to: