I'm trying to use clapack-3.2.1-CMAKE (from netlib.org), as a dependency for some library I need to build; that library is known to depend on clapack, but the specifics of this dependency are not known to me unfortunately.
So, I downloaded the tarball, opened it, disabled building the tests because there seem to be multiple definitions in there somehow, and built. This gives me: libf2c.a, libblas.a, liblapack.a. Ok, after installing these libraries, and copying include files to the right place, I manage to compile my library of interest, and a test executable which uses it. But - when I try to that test executable, I get "undefined reference" errors for a bunch of functions:
cgemm_(char*, char*, long*, long*, long*, complex*, complex*, long*, complex*, long*, complex*, complex*, long*)
cgesvd_(char*, char*, long*, long*, complex*, long*, float*, complex*, long*, complex*, long*, complex*, long*, float*, long*)
cgesv_(long*, long*, complex*, long*, long*, complex*, long*, long*)
cposv_(char*, long*, long*, complex*, long*, complex*, long*, long*)
dgemm_(char*, char*, long*, long*, long*, double*, double*, long*, double*, long*, double*, double*, long*)
dgesvd_(char*, char*, long*, long*, double*, long*, double*, double*, long*, double*, long*, double*, long*, long*)
dgesv_(long*, long*, double*, long*, long*, double*, long*, long*)
dposv_(char*, long*, long*, double*, long*, double*, long*, long*)
sgemm_(char*, char*, long*, long*, long*, float*, float*, long*, float*, long*, float*, float*, long*)
sgesvd_(char*, char*, long*, long*, float*, long*, float*, float*, long*, float*, long*, float*, long*, long*)
sgesv_(long*, long*, float*, long*, long*, float*, long*, long*)
sposv_(char*, long*, long*, float*, long*, float*, long*, long*)
zgemm_(char*, char*, long*, long*, long*, doublecomplex*, doublecomplex*, long*, doublecomplex*, long*, doublecomplex*, doublecomplex*, long*)
zgesvd_(char*, char*, long*, long*, doublecomplex*, long*, double*, doublecomplex*, long*, doublecomplex*, long*, doublecomplex*, long*, double*, long*)
zgesv_(long*, long*, doublecomplex*, long*, long*, doublecomplex*, long*, long*)
zposv_(char*, long*, long*, doublecomplex*, long*, doublecomplex*, long*, long*)
and indeed, when I examine the three libraries I've built with nm, I find:
0000000000000000 T cgemm_
0000000000000000 T zposv_
0000000000000000 T sgemm_
and so on - that is, the symbols for these primitives are missing.
My question: Where am I supposed to get those symbols from? After all, shouldn't libblas.a have these BLAS primitives implemented? I am a "netlib newbie", despite having encountered BLAS primitives here and there in all sorts of environments.
Related question: undefined reference to cblas_sgemm