CMake error during build in Windows 10 + Visual Studio 2019 + vcpkg
marcofer opened this issue · 8 comments
I’m trying to build the library for Windows, according to this documentation, through Visual Studio 2019.
I successfully built Eigen3
and Poco
through vcpkg
. However, when I try to build libfranka I can’t understand which paths of the builds should be set to Poco_DIR
and Eigen3_DIR
, since I have no paths matching the suggested ones “[…]/lib/cmake/Poco” or “[…]/lib/cmake/eigen3”.
Still, independently from which paths I set, when I run the generation of the Cmake Cache in Visual Studio, I get the following error:
[CMake] CMake Error at C:/Users/alien/Software/vcpkg/scripts/buildsystems/vcpkg.cmake:686 (set):
1> [CMake] Maximum recursion depth of 1000 exceeded
1> [CMake] Call Stack (most recent call first):
1> [CMake] C:/Users/alien/Software/vcpkg/scripts/buildsystems/vcpkg.cmake:764 (_find_package)
after which the last line is repeated likely for 1000 times, before aborting the process.
Any ideas to catch the reason of this error? Please tell me if I didn’t provide enough information and I’ll eventually report further build output messages.
I apologize in advance if I'm posting this here, but there is not other support anywhere, I also tried on Franka world community without success so far.
Apparently I have been able to localize the source of the build error at least to avoid it to occur.
Specifically, the error above is raised when trying to build the test files in the corresponding subdirectory. In fact, setting
option(BUILD_TESTS "Build tests" OFF)
in the CMakeLists.txt does not generate any issues and the build is completed successfully. I don't know if this may be of help for you or if it's still due to some mistakes from my side, but I thought it could be worthy to be mentioned.
thank you,your comment has huge help for me
Thankyou buddy , your troubleshooting guide helped to solve the errors in Visual studio during .json generation but what can be done to find path to the poco directory, even after numerous attempts I am unable to find them => "C:\Path\To\Poco-Install\lib\cmake\Poco". Please pass your views on this.
Thankyou buddy , your troubleshooting guide helped to solve the errors in Visual studio during .json generation but what can be done to find path to the poco directory, even after numerous attempts I am unable to find them => "C:\Path\To\Poco-Install\lib\cmake\Poco". Please pass your views on this.
Apparently administrator mode must be turned on before installing vcpkg, eigen3 and poco
(i.e running cmd prompt as an administrator), else these packages wont install properly. This tip is useful to those people who are trying to building using a device of organization like university or an industry where a user account is different and has no admin rights.
In my opinion personal devices won't require admin rights but its better to enable in order to avoid getting stuck on issues.
Hi, I'm currently trying to program Panda with Windows, and I'm stuck on the issue where I'm unable to find the correct path "C:\Path\To\Poco-Install\lib\cmake\Poco" in Visual Studio. I cannot find the right paths in the file system. I also set option(BUILD_TESTS "Build tests" OFF) in the CMakeLists.txt. I installed everything with administrator rights during installation of vcpkg, eigen3 and poco. Did you manage to set the paths correctly? Can you maybe help me with another advice how you could manage to get it running?
If you have visual studio 2015 or later installed, follow these steps.
1.Make sure you have stored libfranka in C: or in C: subsequent folders.
2.You have set the build test flag to off in cmakelist.txt as mentioned above.
3.make a new folder inside libfranka e.g build, open the folder and copy the path from title bar.
4.In search type native and open the x64 prompt of visual studio in admin mode.
- go to build directory by command cdpaste copied path.
- type command 'vcpkgintegrateinstall' and hit enter.
- An output of cmake toolchain file will be shown on screen, copy it.
8.type "cmake" paste the copied toolchain file path as shown, add the necessary flags as shown.
- Hit enter which will starts the procedure of making Ninja files.
- when the writing build files is completed type ninja and hit enter.
libfranka will be built.