-1

I have compiled BLAS and LAPACK library using gcc in ubuntu 18.4 LTS. The static libraries are working well with Armadillo headers but the shared lapack library is getting error with 28 undefined references of blas functions which I presume are "Extra Precise BLAS routines". I don't know if I made something wrong with the build of lapack shared library?! The linking errors of armadillo are as follows:

g++  -o ../../lib/Debug/numlib ../../lib/Debug/src/arma_test_1.o ../../lib/Debug/src/blas_test.o ../../lib/Debug/src/cmatrix_test.o ../../lib/Debug/src/main.o   ../../lib/Debug/liblapack.so ../../lib/Debug/libblas.so ../../../../../../../usr/lib/gcc/x86_64-linux-gnu/7.3.0/libgfortran.a ../../../../../../../usr/lib/gcc/x86_64-linux-gnu/7.3.0/libquadmath.a

../../lib/Debug/liblapack.so: undefined reference to `blas_sgemv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_zgemv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_cgbmv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_cgbmv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_chemv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_csymv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_sgbmv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_dgemv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_zsymv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_csymv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_ssymv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_ssymv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_zgemv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_dsymv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_zhemv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_zgbmv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_sgemv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_chemv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_dgemv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_cgemv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_sgbmv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_zgbmv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_dgbmv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_zhemv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_zsymv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_dsymv_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_dgbmv2_x_'
../../lib/Debug/liblapack.so: undefined reference to `blas_cgemv_x_'

collect2: error: ld returned 1 exit status

It is very specific about armadillo+Lapack(shared library built from netlib's LAPACK src..) ... I want to know the possible source of these BLAS routines which are not available in netlib's BLAS and LAPACK!

  • 1
    Possible duplicate of [What is an undefined reference/unresolved external symbol error and how do I fix it?](https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – Toby Speight Jul 24 '18 at 12:15
  • My question is very specific about armadillo+Lapack(shared library built from netlib's LAPACK src..) ... I am expecting an answer regarding the possible source of these BLAS routines which are not available in netlib's BLAS and LAPACK packages! – Avisek Mukherjee Jul 24 '18 at 20:16

1 Answers1

0

XBLAS need to be integrated.. Details can be found in the following link.

http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=2&t=1730

  • Unfortunately that link has since gone offline, and it looks like even wayback doesn't have it. What was discussed at that URL? I end up with the same undefined symbols problem (I have xblas installed, but it includes symbols without the extra trailing underscore, e.g. blas_sgemv_x not blas_sgemv_x_) – Jason Pepas Aug 20 '23 at 14:20