I have been trying to use cmake for the build of some libraries from GitHub - Argonne-National-Laboratory/neml: Modular consitutive modeling library for structural materials. For this package, BLAS and LAPACK are required. This is on Windows 10, my cmake version is 3.20.2 and BLAS/LAPACK were installed from the Lapack package 3.9.1. from here (LAPACK for Windows). After invoking cmake for this neml library: cmake -DCMAKE_CXX_COMPILER=icl.exe -DBLAS_blas_LIBRARY=D:\GITlib\lapack_build\bin\libblas.dll -DLAPACK_lapack_LIBRARY=D:\GITlib\lapack_build\bin\liblapack.dll -DBoost_INCLUDE_DIR="D:\GITlib\boost" -DCMAKE_BUILD_TYPE=Release -DUSE_OPENMP=False -G Ninja .
I get the following error: CMake Error at D:/GITlib/cmake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find BLAS (missing: BLAS_LIBRARIES) Call Stack (most recent call first): D:/GITlib/cmake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) D:/GITlib/cmake/share/cmake-3.20/Modules/FindBLAS.cmake:1045 (find_package_handle_standard_args) CMakeLists.txt:42 (FIND_PACKAGE)
I have looked into previous discussions on this, notably one for Win 10 and OpenBlas not being found, but it was not resolved. The suggestions there were to either add the path to blas.dll in the CMakeLists or add blas.dll location to PATH variable - both tried without success. Any help will be much appreciated. Thanks in advance!
Hello Ben,
I assume you meant putting --debug-find in the cmake command line. Output below:
D:\GITlib\neml>cmake -DCMAKE_CXX_COMPILER=icl.exe -DBLAS_blas_LIBRARY=D:\GITlib\lapack_build\bin\libblas.dll -DLAPACK_lapack_LIBRARY=D:\GITlib\lapack_build\bin\liblapack.dll --debug-find -DBoost_INCLUDE_DIR="D:\GITlib\boost" -DCMAKE_BUILD_TYPE=Release -DUSE_OPENMP=False -G Ninja .
Running with debug output on for the `find` commands.
CMake Error at D:/GITlib/cmake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find BLAS (missing: BLAS_LIBRARIES)
Call Stack (most recent call first):
D:/GITlib/cmake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
D:/GITlib/cmake/share/cmake-3.20/Modules/FindBLAS.cmake:1045 (find_package_handle_standard_args)
CMakeLists.txt:42 (FIND_PACKAGE)
CMake Debug Log at CMakeLists.txt:42 (FIND_PACKAGE):
find_package considered the following paths for BLAS.cmake
D:/GITlib/neml/cmake/Modules/FindBLAS.cmake
The file was found at
D:/GITlib/cmake/share/cmake-3.20/Modules/FindBLAS.cmake
@balamurata123@mocobt I had a similar issue on my end with older VS and Intel versions. Solution was - get a newer version of the latter two software. VS 2017 15.0 and Intel 2019 work fine and no issues with BLAS detected for such build. Thanks