I am developing a formula that uses a CMake step to generate build files. During this I encounter the following error:
CMake Error at /usr/local/Cellar/cmake/3.11.4/share/cmake/Modules/CPack.cmake:441 (message):
CPack license resource file: "/tmp/myformula-20180615-53709-m1sfii/LICENSE.txt"
could not be found.
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.11.4/share/cmake/Modules/CPack.cmake:446 (cpack_check_file_exists)
CMakeModules/installer.cmake:49 (include)
CMakeLists.txt:219 (include)
I checked the temporary directory to see that LICENSE.txt is in fact missing. Browsing the brew source code I saw that brew considers this a Metafile. Is it filtered out? How can I prevent it?
I think CPack is just looking for a licence.txt, that is provided by yourself.
So either:
You can create a license file and use:
set (CPACK_RESOURCE_FILE_LICENSE
"${CMAKE_CURRENT_SOURCE_DIR}/License.txt")
Where you, of course, need to set CMAKE_CURRENT_SOURCE_DIR, or just hardcode for your preferred folder for while testing.
If you don't care of license, just don't set CPACK_RESOURCE_FILE_LICENSE. Packing shall be successful with a license warning.
Related
I am using Windows and using the CMake GUI. In CMake, I set the source code path at
C:/Users/me/Downloads/opencv
opencv and opencv_contribwere obtained from the OpenCV github repos
I set the build path in Cmake as C:/Users/me/Downloads/builds/opencv
I then set OPENCV_EXTRA_MODULES_PATH as C:/Users/me/Downloads/opencv-3.4/source/opencv_contrib/modules and checked WITH_CUDA
after Configuring, I get the error:
CMake Error at cmake/OpenCVDetectCUDA.cmake:125 (string):
string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
cmake/OpenCVDetectCUDA.cmake:174 (ocv_wipeout_deprecated)
cmake/OpenCVFindLibsPerf.cmake:43 (include)
CMakeLists.txt:688 (include)
can anyone help with this?
Recently I am tring to build OpenCV4 use cmake and vs2019 in Windows, but when I configure something, I got the following ERROR:
CMake Warning at cmake/OpenCVGenSetupVars.cmake:54 (message):
CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install
directory
Call Stack (most recent call first):
CMakeLists.txt:1059 (include)
I check the file OpenCVGenSetupVars.cmake:54 and find these:
if(IS_ABSOLUTE "${__python_path}")
set(OPENCV_PYTHON_DIR_RELATIVE_CMAKECONFIG "${__python_path}")
message(WARNING "CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install directory")
But my "python_path" is right, and I have no idea. Do you know what should I to do ?
I had the same problem. The compilation was still successful after ignoring this warning. So the second time I built it, I removed the configuration option(OPENCV_GENERATE_SETUPVARS).
I am now building from source the opencv4.1.0 with cmake3.13. The cmake configuration gives a warning message saying:
CMake Warning at cmake/OpenCVGenSetupVars.cmake:54 (message):
CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install
directory
Call Stack (most recent call first):
CMakeLists.txt:1066 (include)
What does this warning mean? Does that need be carefully addressed for starting the building process?
check the file cmake/OpenCVGenSetupVars.cmake
if(DEFINED __python_path)
if(IS_ABSOLUTE "${__python_path}")
set(OPENCV_PYTHON_DIR_RELATIVE_CMAKECONFIG "${__python_path}")
message(WARNING "CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install directory")
It seems like you have set your Python path wrong
In windows you have to make an relative path in environtment settings to python/libs/site-packages. So in cmake set PYTHON3_SITE_PACKAGES to the relative path e.g %PYTHON_SITE_PACKAGES%.
And remember to run cmake / visual studio as administrator.
I am trying to compile a build file for a sample tutorial in ROS packages. The following shows up in the Terminal,
Errors << catkin_tools_prebuild:cmake /home/comet/mybot_ws/logs/catkin_tools_prebuild/build.cmake.009.log
CMake Error at /opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
execute_process(/home/comet/anaconda3/bin/python
"/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py"
"/opt/ros/kinetic/share/catkin/cmake/../package.xml"
"/home/comet/mybot_ws/build/catkin_tools_prebuild/catkin/catkin_generated/version/package.cmake")
returned error code No such file or directory
Call Stack (most recent call first):
/opt/ros/kinetic/share/catkin/cmake/catkin_package_xml.cmake:74 (safe_execute_process)
/opt/ros/kinetic/share/catkin/cmake/all.cmake:151 (_catkin_package_xml)
/opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
CMakeLists.txt:4 (find_package)
It appears that it is trying to access the python compiler in an anaconda3 folder but I have it uninstalled recently. Any ideas how I could modify the files so that it points to /usr/bin python ? Any ideas are appreciated. Thank you very much!
So there are two possibilities that your environment is tainted
Your PATH variable is still tainted by pointing to your anaconda location. See this question for reference and remove the anaconda entry. Don't forget to open a new terminal to apply the changes
You've created the local catkin workspace while you've sourced the anaconda environment. Thus, you just need to delete build and devel in your current workspace and just rebuild everything from scratch.
Processing both steps one after another should fix the problem.
Just resolved it recently, I have executed catkin clean before catkin build.
I'm trying to compile a project with CMake. I'm getting an error:
Found OpenCV Windows Pack but it has not binaries compatible with your
configuration.
You should manually point CMake variable OpenCV_DIR to your build of OpenCV
library.
Call Stack (most recent call first):
CMakeLists.txt:9 (FIND_PACKAGE)
CMake Error at CMakeLists.txt:9 (FIND_PACKAGE):
Found package configuration file:
C:/Users/Ghenja/AppData/Local/opencv/build/OpenCVConfig.cmake
but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
NOT FOUND.
I don't understand what is happening. Please help me to solve this problem.
Clean your project and remove CMakeCache.txt. OpenCV_FOUND is probably cached now.
If that doesn't work, then run your cmake command with additional flags just to be sure:
cmake -DOpenCV_FOUND:BOOL=ON -DOpenCV_DIR=/path/to/your/OpenCV