System: Linux
I am getting the following error when trying to run a C++ code. When I run cmake .., I get -
srishti#ubuntu:~/realtimeKCF/build$ cmake ..
FINALLL TBB_LIBRARIES = 'optimized;/usr/lib/x86_64-linux-gnu/libtbb.so;debug;TBB_tbb_LIBRARY_DEBUG-NOTFOUND'
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
TBB_tbb_LIBRARY_DEBUG (ADVANCED)
linked by target "DSKCFcpp" in directory /home/srishti/realtimeKCF
-- Configuring incomplete, errors occurred!
See also "/home/srishti/realtimeKCF/build/CMakeFiles/CMakeOutput.log".
I also searched for:
TBB_tbb_LIBRARY_DEBUG (ADVANCED)
but I can't find this anywhere. Can someone please help me with this? I am just having this error stopping me from running the code.
Related
I am trying to learn dds. According to the tutorial, Appendix 1 suggests to look at examples on provided in github called dds-examples-cpp-ex.
The simple commands to build this examples according to readme is cmake . && make
I execute the command
cmake . && make
from the cmake directory of this folder after cloning it on my local machine
I get the following error:
CMake Error at CMakeLists.txt:28 (FIND_PACKAGE):
By not providing "FindOpenSplice.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"OpenSplice", but CMake did not find one.
Could not find a package configuration file provided by "OpenSplice" with
any of the following names:
OpenSpliceConfig.cmake
opensplice-config.cmake
Add the installation prefix of "OpenSplice" to CMAKE_PREFIX_PATH or set
"OpenSplice_DIR" to a directory containing one of the above files. If
"OpenSplice" provides a separate development package or SDK, be sure it has
been installed.
-- Configuring incomplete, errors occurred!
See also "/home/gajendra/Documents/AnokhiDocs/DDS/dds-tutorial-cpp-ex/cmake/CMakeFiles/CMakeOutput.log".
I tried to locate OpenSpliceConfig.cmake && opensplice-config.cmake on my system but I did not get any result.
My question is how can I correct the paths or fix this error?
I have OpenSplice running on my local machine and I have executed other examples directly from $OSPL_HOME/opensplice/dcps/Tutorial. and they work fine.
I also tried to build ch1. I edited the second line in ch1/CMakeLists.txt from
set(CMAKE_MODULE_PATH ../cmake)
to
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
so that it can find cmake folder in the root directory where CMakeLists.txt resides.
I run into the same problem when I execute the following:
cd ch1 && mkdir build && cd build && cmake ..
CMake Error at /home/gajendra/Documents/AnokhiDocs/DDS/dds-tutorial-cpp-ex/cmake/FindOpenSplice.cmake:72 (MESSAGE):Could not find OpenSplice DDS
Call Stack (most recent call first):
CMakeLists.txt:8 (find_package)
I had the same problem on Ubuntu 20.04 and OpenSplice 6.10.3p1
I just sourced the release.com file in the installation directory, then went to each "ch" folder as suggested by #Tsyvarev and ran cmake . && make from there.
CMake ran successfully afterwards.
I am trying to run some code from my university, but when I do "cmake .." inside "build" I get the following error:
CMake Error: The following variables are used in this project, but
they are set to NOTFOUND. Please set them or make sure they are set
and tested correctly in the CMake files: iceutil_lib
linked by target "cppgui" in directory /Users/alej/Desktop/project1
linked by target "project1" in directory /Users/alej/Desktop/project1
-- Configuring incomplete, errors occurred!
Any of my friends are getting errors, can you help me?
CMake tries to find all the libraries necessary to create the library or executable you are trying to build from the code from your university.
The found paths to those libraries are stored in special variables in CMake. By default, those variables carry the value <Library-Name>-NOTFOUND. This NOTFOUND flag is what makes CMake prompt the error message.
In general there are two possible reasons, why CMake can not find the library for you:
The library is not installed on your system
The library is installed somewhere CMake did not search for it. In this case you can help CMake by setting the library installation path into the respective CMake variables. To do this, open the file CMakeCache.txt with a text editor and search for ICEUTIL_LIB. Replace the blabla-NOTFOUND value with the actual (absolute) path of the library. There might be other variables with the ICEUTIL prefix. One of them might be named like ICEUTIL_HEADERS or ICEUTIL_INCLUDE_DIR. Replace the value of this one with the absolute path of where the .h files for ICEUTIL are found. If the include path is not set, CMake might run fine without errors, but later you will run into compiler errors saying include file not found.
This question already has answers here:
How to Trace CMakeLists.txt [duplicate]
(2 answers)
Closed 4 years ago.
I am getting some strange error from cmake :
loading initial cache file ../../Tweaks/compiler-rt/arm.txt
-- Performing Test COMPILER_RT_HAS_FPIE_FLAG
CMake Error at CMakeLists.txt:2 (set):
Syntax error in cmake code at
D:/Work/AcSo/Views/llvmSecond/build-arm/compiler-rt/CMakeFiles/CMakeTmp/CMakeLists.txt:2
when parsing string
D:/Work/AcSo/Views/llvmSecond/llvm/projects/compiler-rt/cmake;D:/Work/AcSo/Views/llvmSecond/llvm/projects/compiler-rt/cmake/Modules;D:/Work/AcSo/Views/llvmSecond/llvm/cmake;D:\Work\AcSo\Views\llvmSecond\build-host\Release\lib\cmake\llvm
Invalid character escape '\W'.
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Configuring incomplete, errors occurred!
See also "D:/Work/AcSo/Views/llvmSecond/build-arm/compiler-rt/CMakeFiles/CMakeOutput.log".
All I could understand is that it gets a windows path somehow, and then complains about \W character sequence. Actually I've done what I could to give cmake Linux paths. So I don't know where the Windows path comes from. Nothing seems essential for this error in CMakeOutput.log
I would like to get more diagnostics from cmake, i.e. what and why it does, but searching for "cmake verbose" instead gives results about making the make verbose, not cmake itself.
Is there a way to force cmake verbose / get more diagnostics / debug or trace output? Or if you can tell what's the problem in my specific case, that's appreciated too.
In this particular situation, cmake flags --trace and --debug-output suggested for the questions linked in the comments, were not as helpful as --debug-trycompile flag, which keeps such files as CMakeFiles/CMakeTmp/CMakeLists.txt (so they don't get removed when cmake fails).
I'm using CMake to compile a project. This is the path to my sources: https://github.com/Ro6afF/Snake . When I type this
cd build && cmake ..
it prints this:
CMake Error: Could not find cmake module file: CMakeDetermineSnakeCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_Snake_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_Snake_COMPILER
CMake Error: Could not find cmake module file: /home/asd/snake/build/CMakeFiles/3.5.0/CMakeSnakeCompiler.cmake
CMake Error at CMakeLists.txt:3 (Project):
No CMAKE_Snake_COMPILER could be found.
Tell CMake where to find the compiler by setting the CMake cache entry
CMAKE_Snake_COMPILER to the full path to the compiler, or to the compiler
name if it is in the PATH.
CMake Error: Could not find cmake module file: CMakeSnakeInformation.cmake
CMake Error: CMAKE_Snake_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/home/asd/snake/build/CMakeFiles/CMakeOutput.log".
Can you explain me how to fix this error?
Thanks in advance!
You use the project command incorrectly:
PROJECT(OpenGL Snake)
The space acts as a separator. That means project name is OpenGL and language is Snake. CMake knows no such language.
Change the code to something like
PROJECT(OpenGL_Snake)
I have checked out a version of project from SVN. Below are the different kinds of errors I got while trying to CMAKE a project from SVN. Could it be that some of the files are not checked out? Please, go through the three kinds of errors and help me out with it.
==================Type 1==================================
CMake Error at CMakeLists.txt:184 (add_subdirectory):
add_subdirectory given source "google/gmock" which is not an existing
directory.
==================Type 2==================================
Subversion executable was not found.
CMake Error at CMakeLists.txt:14 (UpLinqSVN_WC_INFO):
Unknown CMake command "UpLinqSVN_WC_INFO".
Call Stack (most recent call first):
CMakeLists.txt:207 (CreateVersionInfo)
========================TYPE 3==========================================
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FFMPEG_AVCODEC_LIB
linked by target "UpLinq" in directory C:/Users/Krishna/Desktop/2.5/GUI
FFMPEG_AVCORE_LIB
linked by target "UpLinq" in directory C:/Users/Krishna/Desktop/2.5/GUI
FFMPEG_AVDEVICE_LIB
linked by target "UpLinq" in directory C:/Users/Krishna/Desktop/2.5/GUI
Configuring incomplete, errors occurred!
Error 1 indeed indicates that the CMakeLists.txt expected there to be a directory called google/gmock (relative to the CMakeLists.txt which is calling add_subdirectory at line 184).
Without more info, there's no way to tell if this is an error in the CMakeLists file or in the repository.
The first part of error 2 (can't find Subversion exe) looks like a custom error message. It may be looking for a ".svn" folder in the project root, and assuming that Subversion is available. Presumably it then looks for the Subversion exe and fails to find it (not in path maybe?)
The second part of error2 (unknown CMake command) is saying that at line 14 of CMakeLists.txt, there's a command called UpLinqSVN_WC_INFO being invoked. It doesn't recognise this as a valid command, which probably means that it's defined as a function or macro in another CMake file somewhere. It would need to be defined before it's invoked at line 14. It could be that the CMakeLists.txt you're executing is expected to be run as part of a larger build, which would define this function before starting on your CMakeLists.txt.
Error 3 is saying that there's a CMake target called "UpLinq" (an exe or lib) which has a dependency on ${FFMPEG_AVCODEC_LIB}. At some point, there's probably been a find_library call looking for the avcodec library which has also failed. The result of the search is held in the variable FFMPEG_AVCODEC, and it shows that ${FFMPEG_AVCODEC} has a value of FFMPEG_AVCODEC-NOTFOUND.
If you need more help than this, you'll need to put up a copy of the relevant parts of the CMakeLists files involved, and a bit more info about your environment / directory structures.