Building static libs with vcpkg fails

Issue #169 resolved
Christian Henning created an issue

Perhaps this should be added to the documentation. But this fails:

vcpkg install blaze:x64-windows-static

I'm using the latest cmake, latest vcpkg, and Visual Studio 15.7.3.

Here is the output:

[1/2] cmd /c "cd ../../x64-windows-static-dbg && "C:/Program Files/CMake/bin/cmake.exe" "D:/vcpkg/buildtrees/blaze/src/blaze-lib-blaze-17ad77533435" "-DBLAZE_SMP_THREADS=C++11" "-DCMAKE_MAKE_PROGRAM=D:/vcpkg/downloads/tools/ninja/ninja-1.8.2/ninja.exe" "-DBUILD_SHARED_LIBS=OFF" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows-static" "-DVCPKG_PLATFORM_TOOLSET=v141" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=D:/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=static" "-DVCPKG_LINKER_FLAGS=" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=D:/vcpkg/packages/blaze_x64-windows-static/debug"" FAILED: ../../x64-windows-static-dbg/CMakeCache.txt cmd /c "cd ../../x64-windows-static-dbg && "C:/Program Files/CMake/bin/cmake.exe" "D:/vcpkg/buildtrees/blaze/src/blaze-lib-blaze-17ad77533435" "-DBLAZE_SMP_THREADS=C++11" "-DCMAKE_MAKE_PROGRAM=D:/vcpkg/downloads/tools/ninja/ninja-1.8.2/ninja.exe" "-DBUILD_SHARED_LIBS=OFF" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows-static" "-DVCPKG_PLATFORM_TOOLSET=v141" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=D:/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=static" "-DVCPKG_LINKER_FLAGS=" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=D:/vcpkg/packages/blaze_x64-windows-static/debug"" -- The C compiler identification is MSVC 19.14.26430.0 -- The CXX compiler identification is MSVC 19.14.26430.0 -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx64/x64/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx64/x64/cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx64/x64/cl.exe -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx64/x64/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for sgemm_ -- Looking for sgemm_ - found -- Looking for pthread.h -- Looking for pthread.h - not found -- Found Threads: TRUE
-- Found BLAS: D:/vcpkg/installed/x64-windows-static/debug/lib/openblas.lib
-- Looking for cheev_ -- Looking for cheev_ - not found -- Looking for cheev_ -- Looking for cheev_ - not found -- Looking for cheev_ -- Looking for cheev_ - not found CMake Error at C:/Program Files/CMake/share/cmake-3.11/Modules/FindLAPACK.cmake:376 (message): A required library with LAPACK API not found. Please specify library location. Call Stack (most recent call first): D:/vcpkg/scripts/buildsystems/vcpkg.cmake:247 (_find_package) CMakeLists.txt:53 (find_package)

-- Configuring incomplete, errors occurred! See also "D:/vcpkg/buildtrees/blaze/x64-windows-static-dbg/CMakeFiles/CMakeOutput.log". See also "D:/vcpkg/buildtrees/blaze/x64-windows-static-dbg/CMakeFiles/CMakeError.log". [2/2] cmd /c "cd .. && "C:/Program Files/CMake/bin/cmake.exe" "D:/vcpkg/buildtrees/blaze/src/blaze-lib-blaze-17ad77533435" "-DBLAZE_SMP_THREADS=C++11" "-DCMAKE_MAKE_PROGRAM=D:/vcpkg/downloads/tools/ninja/ninja-1.8.2/ninja.exe" "-DBUILD_SHARED_LIBS=OFF" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows-static" "-DVCPKG_PLATFORM_TOOLSET=v141" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=D:/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=static" "-DVCPKG_LINKER_FLAGS=" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=D:/vcpkg/packages/blaze_x64-windows-static"" FAILED: ../CMakeCache.txt cmd /c "cd .. && "C:/Program Files/CMake/bin/cmake.exe" "D:/vcpkg/buildtrees/blaze/src/blaze-lib-blaze-17ad77533435" "-DBLAZE_SMP_THREADS=C++11" "-DCMAKE_MAKE_PROGRAM=D:/vcpkg/downloads/tools/ninja/ninja-1.8.2/ninja.exe" "-DBUILD_SHARED_LIBS=OFF" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows-static" "-DVCPKG_PLATFORM_TOOLSET=v141" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=D:/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=static" "-DVCPKG_LINKER_FLAGS=" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=D:/vcpkg/packages/blaze_x64-windows-static"" -- The C compiler identification is MSVC 19.14.26430.0 -- The CXX compiler identification is MSVC 19.14.26430.0 -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx64/x64/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx64/x64/cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx64/x64/cl.exe -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx64/x64/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for sgemm_ -- Looking for sgemm_ - found -- Looking for pthread.h -- Looking for pthread.h - not found -- Found Threads: TRUE
-- Found BLAS: D:/vcpkg/installed/x64-windows-static/lib/openblas.lib
-- Looking for cheev_ -- Looking for cheev_ - not found -- Looking for cheev_ -- Looking for cheev_ - not found -- Looking for cheev_ -- Looking for cheev_ - not found CMake Error at C:/Program Files/CMake/share/cmake-3.11/Modules/FindLAPACK.cmake:376 (message): A required library with LAPACK API not found. Please specify library location. Call Stack (most recent call first): D:/vcpkg/scripts/buildsystems/vcpkg.cmake:247 (_find_package) CMakeLists.txt:53 (find_package)

-- Configuring incomplete, errors occurred! See also "D:/vcpkg/buildtrees/blaze/x64-windows-static-rel/CMakeFiles/CMakeOutput.log". See also "D:/vcpkg/buildtrees/blaze/x64-windows-static-rel/CMakeFiles/CMakeError.log". ninja: build stopped: subcommand failed.

Comments (5)

  1. Klaus Iglberger

    Hi Christian!

    Thanks for taking the time to create the issue. Since Blaze is a header only library and therefore never requires any library (static or dynamic) this approach will unfortunately always fail. The important thing from our point of view is that the documented installation command works fine:

    vcpkg install blaze
    

    Could you successfully install Blaze on your system via this command?

    We will extend the installation instruction accordingly. Thanks again for raising this issue,

    Best regards,

    Klaus!

  2. Klaus Iglberger

    The vcpkg installation instructions in the Configuration and Installation wiki page have been extended. Commit f0755de extends the Configuration and Installation tutorial accordingly. The fix is immediately available via cloning the Blaze repository and will be officially released in Blaze 3.4.

  3. Log in to comment