Open
Description
The intent of the flags BLAS++
and LAPACK++
in the building system is to build libblaspp
and liblapackpp
. As I understand from the CMakeLists.txt
, those libraries should be linked to the local libraries libblas
and liblapack
, the ones we store in the directory lib
. However, I found out that this does not seem to be working properly.
Below, I assume that the patch c431f75 was already applied to the master branch. Otherwise, we may end up in the problem reported at #903.
Some of my findings using the flag BLAS++=ON
:
- If I have a BLAS library previously installed in my system,
libblaspp
may actually choose that BLAS library instead of the local one. - If I don't have a BLAS library installed and
BUILD_SHARED=ON
, it will link with "-lblas" (I assume it is the local one). However, I seelibblas.so.3 => not found
when I runldd libblaspp.so
. I would say this is a problem, but I am not sure about that. - If I don't have a BLAS library installed and
BUILD_SHARED_LIBS=OFF
, occasionally I get the errorBLAS library not found.
from BLAS++. I didn't investigate further why this only happens occasionally.
Script to reproduce the problem on a Ubuntu system:
sudo apt update
sudo apt install -y cmake gfortran git
git clone https://github.com/weslleyspereira/lapack.git
cd lapack
git checkout c431f75a4a07e4842e69c7eadc1ff73836dee668
sudo apt install -y libopenblas-dev # Comment this line if you want to test cases 2 and 3.
cmake -B build -D BUILD_TESTING=OFF -D BLAS++=ON # -D BUILD_SHARED_LIBS=ON if you want to test case 2
cmake --build build
I tested both in my personal machine and in the docker image: ghcr.io/catthehacker/ubuntu:act-latest.