The same vcpkg repository clone used in classic and manifest mode - c++

I was using vcpkg in classic mode. Then I found about vcpkg manifests, I placed a vcpkg.json file on my project folder and fired cmake. And the following happened:
-- Building for: Visual Studio 16 2019
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.29.1.windows.1")
-- Bootstrapping vcpkg before install
-- Bootstrapping vcpkg before install - failed
CMake Error at C:/Users/user/project/src/vcpkg/scripts/buildsystems/vcpkg.cmake:850 (message):
vcpkg install failed. See logs for more information:
C:\Users\user\project\src\mylib\x64\vcpkg-bootstrap.log
Call Stack (most recent call first):
C:/Qt/Tools/CMake_64/share/cmake-3.21/Modules/CMakeDetermineSystem.cmake:121 (include)
CMakeLists.txt:6 (project)
-- Configuring incomplete, errors occurred!
Microsoft (R) Build Engine version 16.11.0+0538acc04 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist.
Switch: ALL_BUILD.vcxproj
C:\Users\user\project\src\mylib
done
It tells me to check vcpkg-bootstrap.log but it is empty.
So, am I messing with something or it's not really supported to use vcpkg in manifest mode after it has been used in classic mode?
Or, in other words, do I need a fresh vcpkg git clone to use manifests?

Related

How to I install libuv and subsequently uWebSockets library on Windows 10?

I am trying to install few libraries that are required for cmake to build a project.
For successful build, cmake requires libuv and uWebSockets libraries to be installed:
https://github.com/uNetworking/uWebSockets
I'm using MinGW gcc compiler (C:\msys64\mingw64) along with cmake.
However, during configuration cmake fails with the following errors:
[cmake] Not searching for unused variables given on the command line.
[cmake] CMake Error at examples/example1/CMakeLists.txt:14 (find_library):
[cmake] Could not find UV_LIB using the following names: uv
[cmake]
[cmake]
[cmake] -- Configuring incomplete, errors occurred!
Now, I have downloaded the tar-balls from the above GitHub repo, but I am unable to understand where and how this is to be installed.

CMake - New Boost version may have incorrect or missing dependencies and imported

I am using CMake version 3.19 and Boost version 1.75 in Windows Server 2008.
I also added environment variable "BOOST_ROOT" as shown below :
However, I got the warning below while using CMake:
CMake Warning at C:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1204 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1326 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.19/Modules/FindBoost.cmake:1935 (_Boost_MISSING_DEPENDENCIES)
dep/boost/CMakeLists.txt:47 (find_package)
Is there anyway to deal with the warning above? Thank you in advance
These warnings simply mean that your CMake version is older than your Boost version.
The CMake devs can update their dependency lists only after a new Boost release, so you need to update to a CMake version that was released after boost 1.75.
Look at the Boost version history: https://www.boost.org/users/history/
Boost 1.75 was released at 12/11/20.
Now look at the CMake version history: https://cmake.org/files/v3.19/
CMake 3.19.2 was the first version after that.
You should propably just go with the latest CMake release, 3.19.5.

Could not find a package configuration file provided by "io2d" (Windows)

I am newbie in using C++ and I have hard times to compile the io2d with CMake. I am currently using Windows, and I have used vcpkg to download the io2d packages, cairo packages and graphicsmagick packages. Everything are downloaded by both x64 and x86 windows.
The way I follow through on the installation work is from the Buildings Steps in Cairo/Win32 on Windows:
https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md
However, when I build with cmake -G "Visual Studio 16 2019" --config Debug "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_TOOLCHAIN_FILE=c:/source/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" ..\. , it appears the following error. And I have looked for online but seems cannot find a solution with windows system.
Happy to get any opinions and help on this issue.
PS C:\Users\samue\OneDrive\桌面\Udacity\CppND-Route-Planning-Project\P0267_RefImpl\Debug> cmake -G "Visual Studio 16 2019" --config Debug "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_TOOLCHAIN_FILE=c:/source/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" ..\.
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
Default IO2D backend was not specified, choosing automatically...
Found Windows, using CAIRO_WIN32.
CMake Error at C:/Program Files/CMake/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
Could NOT find Cairo (missing: CAIRO_INCLUDE_DIRS CAIRO_LIBRARIES)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:577 (_FPHSA_FAILURE_MESSAGE)
cmake/FindCairo.cmake:102 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt:5 (find_package)
-- Configuring incomplete, errors occurred!
I have tried another way to compile, but also does not work which yield to another problem. The location of my entire project folder is in the following address: C:\Users\samue\OneDrive\桌面\Udacity\CppND-Route-Planning-Project.
When I tried to build the project, firstly I cd to the address above.
Then use mkdir build and cd build
Then run cmake ..
But, it appears the error code in finding the io2d configuration files. I have no idea how to let CMake to find the required files. The error is located as belows:
PS C:\Users\samue\OneDrive\桌面\Udacity\CppND-Route-Planning-Project\build> cmake ..
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
CMake Error at C:/source/vcpkg/scripts/buildsystems/vcpkg.cmake:622 (_find_package):
By not providing "Findio2d.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "io2d", but
CMake did not find one.
Could not find a package configuration file provided by "io2d" with any of
the following names:
io2dConfig.cmake
io2d-config.cmake
Add the installation prefix of "io2d" to CMAKE_PREFIX_PATH or set
"io2d_DIR" to a directory containing one of the above files. If "io2d"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
CMakeLists.txt:15 (find_package)
-- Configuring incomplete, errors occurred!

Mongodb C-driver install fail on windows

when build c-driver libbson, I have a CMake error
C:\mongo-c-driver-1.15.0\src\libbson>cmake -DCMAKE_INSTALL_PREFIX=C:\mongo-c-driver -G "Visual Studio 14 2015 Win64"
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
-- Selecting Windows SDK version 10.0.14393.0 to target Windows 10.0.17134.
libbson version (from VERSION_CURRENT file): 1.15.0
-- struct timespec found
CMake Error at C:/Program Files/CMake/share/cmake-3.15/Modules/CMakePackageConfigHelpers.cmake:265 (message):
Variable LIBRARY_INSTALL_DIRS does not exist
Call Stack (most recent call first):
build/cmake/BSONPackage.cmake:10 (configure_package_config_file)
build/cmake/BSONPackage.cmake:26 (install_package_config_file)
CMakeLists.txt:378 (include)
and LIBRARY_INSTALL_DIRS is in BSONPackage.cmake
set (INCLUDE_INSTALL_DIRS ${BSON_HEADER_INSTALL_DIR})
set (LIBRARY_INSTALL_DIRS ${CMAKE_INSTALL_LIBDIR})
set (PACKAGE_LIBRARIES bson-1.0)
How can i build it?
I had the same CMake error when running this command inside the libbson folder C:\mongo-c-driver-1.15.0\src\libbson. Can you try running it in the C driver folder instead:
C:\mongo-c-driver-1.15.0>cmake -DCMAKE_INSTALL_PREFIX=C:\mongo-c-driver -G "Visual Studio 14 2015 Win64"

CMake 3.4.3 Can't find CUDA on windows

I am trying to build something with CMake (it has to be an older version because of the project) and when I run it I get this error:
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/FindCUDA.cmake:617 (message):
Specify CUDA_TOOLKIT_ROOT_DIR
Call Stack (most recent call first):
libethash-cuda/CMakeLists.txt:3 (FIND_PACKAGE)
I have looked everywhere online but I only find solutions for Linux.
So, my CMake (v3.7.0) found the toolkit automatically. It's located in:
C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0
In general, I've found on Windows it has difficulty finding the SDK which is in:
C:\ProgramData\NVIDIA Corporation\CUDA Samples\v8.0
To set CUDA_TOOLKIT_ROOT_DIR in CMake on windows, open up cmake-gui, run "configure" once then go to "advanced:"
Scroll down until you see CUDA_TOOLKIT_ROOT_DIR:
And set it to your CUDA toolkit directory (which is probably C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0 if you're using CUDA version 8.0)
git clone —recursive https://github.com/Danko-Lab/Rgtsvm.git
cd Rgtsvm
git submodule init
git submodule update
mkdir build
cd build
cmake .. -G”Visual Studio 15 2017 Win64" -DCUDA_TOOLKIT_ROOT_DIR="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2/lib/x64" -DUSE_CUDA=ON -DLIBR_EXECUTABLE=”C:/Program Files/Microsoft SQL Server/140/R_SERVER/bin/R.exe” -DR_LIB=ON -DGPU_COMPUTE_VER=52
cmake --build . --target install --config Release
does it for Win10, where
-G”Visual Studio 15 2017 Win64" what your VS version is
-DCUDA_TOOLKIT_ROOT_DIR="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2/lib/x64" where your CUDA version is installed
-DGPU_COMPUTE_VER=52 choose your GPU architecture