[Debian-med-packaging] Please help upgrading eigensoft
Christian Seiler
christian at iwakd.de
Tue Jul 19 07:27:10 UTC 2016
On 07/18/2016 10:21 PM, Andreas Tille wrote:
> ...
> 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?
DSPEV etc. are LAPACK routines, but you only link against BLAS. [1]
You also need to link against LAPACK for this to work. Add -llapack
before -lblas in your Makefile and it should work.
(Note that LAPACKE is not the same as LAPACK: LAPACKE is a C wrapper
around LAPACK, and it appears your package needs both, because it
calls some Fortran LAPACK routines directly, but it also calls some
LAPACKE routines in other places. Put -llapacke before -llapack in
the linker line, and everything should work though.)
Hope that helps.
Regards,
Christian
PS: You're git URI is wrong, there's a /git/ missing after
https://anonscm.debian.org/; this is also wrong in the package's
debian/control file.
[1] BLAS: Basic Linear Algebra Subroutines
A set of routines that perform elemetary linear algebra
operations. Mostly products (dot product, matrix-vector product,
matrix-matrix product, scalar-vector product, scalar-matrix
product), and efficient routines for some other tihngs
(adding vectors/matrices, transposition, etc.)
LAPACK: Linear Algebra PACKage
Built on top of BLAS, a set of routines that perform various
decompositions on matrices. Matrix inversion, singular value
decomposition, eigenvalue decomposition (i.e. diagonalization),
etc. fall under this category.
If you want to know which one of them contains a specific
routine, just ask yourself: is there a possibility that the
routine might not converge or the result may not be well-
defined? (Such as inversion, which doesn't work on all
matrices.) If so, it's in LAPACK, if not, it's in BLAS.
There's also a naming guide for LAPACK routines:
http://www.netlib.org/lapack/lug/node24.html
DSPEV is hence:
D: data type: double precision
SP: matrix type: symmetric, packed storage
EV: routine: eigenvalue decomposition
BLAS routines follow a similar naming scheme, but it can
deviate a bit.
More information about the Debian-med-packaging
mailing list