1 year ago
#362118
Foad S. Farimani
CMake can't find BLAS on MSYS2
I am trying to compile this software in the MSYS2 environment on Windows. This is the line looking for the packages:
FIND_PACKAGE(BLAS REQUIRED)
FIND_PACKAGE(LAPACK REQUIRED)
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})
I have installed the BLAS/LAPACK dependencies using
pacman -S make msys/cmake msys/gcc-fortran mingw64/mingw-w64-x86_64-openblas64
but I get the error messages:
CMake Error at /usr/share/cmake-3.22.1/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find BLAS (missing: BLAS_LIBRARIES) Call Stack (most recent call first): /usr/share/cmake-3.22.1/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.22.1/Modules/FindBLAS.cmake:1337 (find_package_handle_standard_args) CMakeLists.txt:403 (FIND_PACKAGE)
You may find the modified CMakeLists.txt
file here (I have commented out all the MPI, MMG, MKL, and APPLE-related entries), and the complete output can be seen here.
I can probably specify the locations explicitly as described here and here
SET(BLAS_LIBRARIES /c/tools/msys64/mingw64/lib/libopenblas_64.a) SET(LAPACK_LIBRARIES /c/tools/msys64/mingw64/lib/libopenblas_64.a)
but I want CMake to find these dependencies automatically. I would appreciate it if you could help me know what is the canonical way to get BLAS/LAPACK libraries installed under MSYS2 and get CMAKE to find them automatically with the FIND_PACKAGE()
functions or otherwise.
cmake
mingw-w64
blas
msys2
openblas
0 Answers
Your Answer