Issues installing/building the CGAL Library with vcpkg manager - c++

To start, I am new to C++ and its package managers so there is a good chance that I just did something dumb.
Note: I am on a 64bit Windows 10 system, I have Clion and visual studio 2019 installed and want to start using CGAL's library. To do so, I simply followed the steps on their website to install the things that I need:
mkdir vcpkgclone
cd vcpkgclone
git clone https://github.com/microsoft/vcpkg
cd vcpkg
bootstrap-vcpkg.bat
vcpkg install yasm-tool:x86-windows
vcpkg install cgal:x64-windows
However, I get the following error:
CMake Error at scripts/cmake/vcpkg_fail_port_install.cmake:97 (message):
The yasm-tool port is only intended to be built for x86 Windows
Architecture 'x64' not supported by yasm-tool!
Call Stack (most recent call first):
ports/yasm-tool/portfile.cmake:1 (vcpkg_fail_port_install)
scripts/ports.cmake:142 (include)
Error: Building package yasm-tool:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: yasm-tool:x64-windows
Vcpkg version: 2021-01-13-d67989bce1043b98092ac45996a8230a059a2d7e
Additionally, attach any relevant sections from the log files above.
Your assistance in solving this problem would be greatly appreciated

Related

Qt 5.9.5 on Ubuntu can't find "GL/gl.h" in "/usr/include/libdrm" despite drivers being installed

When trying to build a piece Qt software, I get an error:
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:9 (message):
Failed to find "GL/gl.h" in "/usr/include/libdrm".
Call Stack (most recent call first):
/usr/lib/x86_64-linux-gnu/cmake/Qt5Gui/Qt5GuiConfig.cmake:184 (include)
build/FindQt5.cmake:32 (find_package)
CMakeLists.txt:87 (include)
All the solutions to this error that I've found are to run sudo apt install mesa-common-dev, but this is something I've already done with no positive effect:
mesa-common-dev is already the newest version (20.0~git1912130730.828f8f~oibaf~b).
Could the fact that I'm using a third-party graphics driver library (oibaf) be the cause for this?
Other things I've tried include symlinking the only other gl.h file that occurs (/usr/include/hwlock/gl.h) to the location Qt is searching at, but that only creates more errors.
I'm on Ubuntu 18.04.3 LTS, using Qt installed from the Ubuntu apt repos. Any help is very much appreciated; this is driving me round the bend.
sudo apt-get install libgl1-mesa-dev
Oibaf seemed to be the problem. After running sudo ppa-purge ppa:oibaf/graphics-drivers, everything is back in the right place and I can build.

Qt 5.6 install issue

I am really new to programming and Linux and I want to install PCL.
Now I want to install VTK and Qt 5.6. So I followed the steps on this site:
http://www.vtk.org/Wiki/VTK/Building/Linux
When I want to configure VTK I get this error:
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake:26 (find_package):
Could not find a package configuration file provided by "Qt5UiPlugin" with
any of the following names:
Qt5UiPluginConfig.cmake
qt5uiplugin-config.cmake
Add the installation prefix of "Qt5UiPlugin" to CMAKE_PREFIX_PATH or set
"Qt5UiPlugin_DIR" to a directory containing one of the above files. If
"Qt5UiPlugin" provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
GUISupport/Qt/CMakeLists.txt:142 (find_package)
I searched the internet and got this:
http://www.qtcentre.org/threads/65284-vtk-integration-with-Qt-5-5
How can I recompile a programm? Can somebody help? I am really frustrated...
Thanks!!
What distro are you using? If you're on ubuntu you should try this:
sudo apt-get install qttools5-dev
sudo apt-get update
Hope that helps.

Ubuntu OpenCV not compiling

I'm trying to compile OpenCV 3.2 with contributions with the following commands:
1.
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/usr/local/ -DOPENCV_EXTRA_MODULES_PATH=/home/matteo/Desktop/Xilinx/OpenCV/source/opencv_contrib/modules/ /home/matteo/Desktop/Xilinx/OpenCV/source/opencv-3.2.0/
2.
make -j7 # runs 7 jobs in parallel
3.
sudo make install
Can you explain why I get
...
........
...........
........................
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
-- Caffe: NO
-- Protobuf: NO
-- Glog: NO
-- Downloading ...
CMake Error at cmake/OpenCVUtils.cmake:1043 (file):
file DOWNLOAD cannot open file for write.
Call Stack (most recent call first):
../opencv_contrib/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake:32 (ocv_download)
../opencv_contrib/modules/dnn/CMakeLists.txt:5 (include)
CMake Error at cmake/OpenCVUtils.cmake:1047 (message):
Failed to download . Status=
Call Stack (most recent call first):
../opencv_contrib/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake:32 (ocv_download)
../opencv_contrib/modules/dnn/CMakeLists.txt:5 (include)
-- Configuring incomplete, errors occurred!
I'm working with Ubuntu 16.04 . I already had OpenCV on the system: maybe I unistall it in the wrong way? I remember to compile OpenCV 3.2 with the same command used above.
You must have matching versions of the opencv_contrib and the opencv itself.
Under the opencv github, go to the OpenCV releases and download the 3.2.0 (it should be the same in the master branch).
Now, go to https://github.com/opencv/opencv_contrib/releases and download the 3.2.0. Then you will have both versions matching.
After that all the cmake commands found on the README.md at opencv_contrib master branch should work fine.
I get the same error, that exact error, around the protobuf. There's another error on the xfeatures2d module, too, if your delete the dnn modules (so they don't get configured/built). My problem is, I need the "non-free" xfeatures2d module. :(
The problem appears to be in the opencv_contrib, in the DNN and xfeatures2d modules, but I'm not sure how to fix it. the call to ocv_download seems to be having empty inputs, even though the dnn and xfeatures2d cmake files are passing in arguments. I am not even a novice with cmake, so I'm not sure how to troubleshoot further.
I get this error on both Mac configuring for XCode and on Windows configuring for Visual Studio, using the latest version of cmake-gui, 3.8.0-rc3.
EDIT: I think I've found the issue, though. I opened an issue in the opencv_contrib github. There is a call to ocv_download in the dnn and xfeatures2d cmake files that uses FILENAME as the first parameter, but should be using PACKAGE instead. When I changed the parameters to PACKAGE, CMake successfully configured opencv with the opencv_contrib modules.
Hope this helps! :)
You might not use the same version of opencv and opencv_contrib
https://github.com/opencv/opencv_contrib/archive/<version>.zip
https://github.com/opencv/opencv/archive/<version>.zip
like master or 3.2.0
SHORT
You need to have the same version in opencv and opencv_contrib (.../opencv_contrib/modules/... belongs to an independent repo).
Either the same release or the last commit in BOTH repositories.
Check which version you have and move the other. In your case, I guess you have to change the version of opencv_contrib, then move to the release with git or download it from github.
git checkout <number_opencv_version i.e. 3.2.0>
LONG
I guess as Ken Lee, that you do not have the same version in the repositories.
As Matt referenced in the opened issue, there is a problem with the call of ocv_download because the version is not the one that was used when opencv-3.1, therefore it fails because the parameter is not the expected one.
It happens to me when I was using opencv 3.1.0 and the last version of opencv_contrib. You could change the cmake files one by one, but it is easier to take the correct version in each repo.
There is a right conflict in your build folder (may result from your previous sudo make install). I don't remember how I fixed it, but you can try recursively chown to both source and build folders (or chmod to 777).

Installing the SFGUI with Cmake

I've been trying to install SFGUI library with Cmake tool with instructions given here: SFGUI Install Tutorial . Still got many problems in major with Cmake, which couldn't find few files from SFGUI directory, for example
CMake Error: The source "D:/SFGUI-master/CMakeLists.txt" does not match the source "D:/SFGUI-0.3.0/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
Restarting didn't help. Could anyone write how to install this in simple steps? Regards.
cmake is telling you that the files it has generated in it's cache from a previous run don't match the source files you are currently using. I would imagine that you ran cmake, then switched git branches or tags and tried to run cmake again. You can just rm -r CMakeFiles in your build directory to remove the cache. Then you should be able to run cmake again without errors.
Thanks! It moved a little bit, but stopped actually at error:
CMake Error at cmake/Modules/FindSFML.cmake:306 (message):
Could NOT find SFML (missing: SFML_GRAPHICS_LIBRARY SFML_WINDOW_LIBRARY
SFML_SYSTEM_LIBRARY)
Call Stack (most recent call first):
CMakeLists.txt:21 (find_package)
Configuring incomplete, errors occurred!
See also "C:/Users/admin/Documents/Visual Studio 2015/Projects/sfml1/sfml1/CMakeFiles/CMakeOutput.log".
To be honest, I will write down steps I did: 1.Configured SFML in VS15 in Windows 8.1 2. I installed the newswet version of CMake 3. Installed also newest SFGUI from Github. 4.In Cmake GUI as a build I choose my project in VS and as a source - SFGUI directory. 5.In CMake Configure and there are the errors. Did I missed something?

qttorch Build Error Ubuntu 14.04

I'm trying to install qttorch package on Ubuntu 14.04,
but I get this error during installation:
CMake Warning at /usr/share/cmake-3.2/Modules/FindQt4.cmake:626 (message):
/usr/bin/qmake reported QT_INSTALL_LIBS as "/usr/lib/x86_64-linux-gnu" but
QtCore could not be found there. Qt is NOT installed correctly for the
target build environment.
Call Stack (most recent call first):
CMakeLists.txt:38 (FIND_PACKAGE)
CMake Error at /usr/share/cmake-3.2/Modules/FindQt4.cmake:634 (message):
Could NOT find QtCore. Check
/tmp/luarocks_qtlua-scm-1-2765/qtlua/build/CMakeFiles/CMakeError.log for
more details.
Call Stack (most recent call first):
CMakeLists.txt:38 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
See also "/tmp/luarocks_qtlua-scm-1-2765/qtlua/build/CMakeFiles/CMakeOutput.log".
Error: Failed installing dependency: https://raw.githubusercontent.com/torch/rocks/master/qtlua-scm-1.rockspec - Build error: Failed building.
Is libqtcore4 the right package for QTCore? or is there another package that should be installed?
because it's already installed in "/usr/lib/x86_64-linux-gnu" as qmake reported!
I also tried reinstalling it, but still the same error!!
In most Linux distributions the packages are split between development and none-development parts. Usually the normal package only includes the shared library, data and executables while the dev package adds headers, static libraries and build tools like qmake. I assume this split is done to save space.
For ubuntu the dev packages usually has the -dev suffix. So try if a libqtcore4-dev package exists. Otherwise, libqt4-dev should include it.