Could not find a package configuration file provided by "Eigen3" (requested version 3)? - cmake

When I run the cmake to build openpose, the error message as below comes out.
CMake Error at CMakeLists.txt:415 (find_package): Could not find a package configuration file provided by "Eigen3" (requested version 3) with any of the following names: Eigen3Config.cmake eigen3 config.cmake
Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set "Eigen3_DIR" to a directory containing one of the above files. If "Eigen3" provides a separate development package or SDK, be sure it has been installed.
In the CMakeLitsts.txt file, the 415 line is like this
find_package(Eigen3 3 REQUIRED NO_MODULE)
How can I start to solve? Any idea on what I am missing or doing wrong?

I solved it by downloading the package and built on Cmake alone first.(Configure, Generate, and open with VS2019 under administrator rights so when executing ALL_BUILD and INSTALL it would write files to disk C). Then add the Eigen3_DIR to system path. Reboot the project that didn't find Eigen3 earlier on Cmake, problem disappeared.

Related

How do I solve colcon build on Ubuntu?

The error reads as follows:
By not providing "Findrosidl_default_generators.cmake" in CMAKE_MODULE_PATH
this project has asked CMake to find a package configuration file provided
by "rosidl_default_generators", but CMake did not find one.
Could not find a package configuration file provided by
"rosidl_default_generators" with any of the following names:
rosidl_default_generatorsConfig.cmake
rosidl_default_generators-config.cmake

kdev-ruby's CMakeFile.txt requires weird stuff like KF5Config.cmake

I'm trying to compile a Ruby plugin for KDevelop: https://github.com/KDE/kdev-ruby
When I cut a folder called build, cd build, and run cmake .., I get lots of errors:
CMake Error at CMakeLists.txt:13 (include):
include could not find load file:
KDEInstallDirs
CMake Error at CMakeLists.txt:14 (include):
include could not find load file:
KDECMakeSettings
CMake Error at CMakeLists.txt:15 (include):
include could not find load file:
KDECompilerSettings
CMake Error at CMakeLists.txt:16 (include):
include could not find load file:
ECMQtDeclareLoggingCategory
CMake Error at CMakeLists.txt:24 (find_package):
By not providing "FindKF5.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "KF5", but
CMake did not find one.
Could not find a package configuration file provided by "KF5" (requested
version 5.15.0) with any of the following names:
KF5Config.cmake
kf5-config.cmake
Add the installation prefix of "KF5" to CMAKE_PREFIX_PATH or set "KF5_DIR"
to a directory containing one of the above files. If "KF5" provides a
separate development package or SDK, be sure it has been installed.
How, on Ubuntu, do I install something that provides KF5Config.cmake? Preferably without rebuilding KDevelop or KDE or Qt5.
KDevelop relies on the development headers for various libraries, and finds them via the accompanying CMake files.
The build also uses CMake modules provided by the extra-cmake-modules package.
You must install that and libkf5config-dev.
The apt-file command might help you find the relevant packages for your distro in these situations.

Cmake errors when using LLVM 5.0.0 from brew

I'm trying to use the stock LLVM 5.0.0 provided by Homebrew (MacOS High Sierra 10.13.3). LLVM is installed on my machine under /usr/local/Cellar/llvm/5.0.0/
Now, in my project, I have the following lines in CMakeLists.txt:
# Find the LLVM library
find_package( LLVM 5.0.0 REQUIRED )
include_directories( "${LLVM_INCLUDE_DIRS}" )
link_directories(${LLVM_LIBRARY_DIRS})
message(STATUS "LLVM include dirs: ${LLVM_INCLUDE_DIRS}")
If I run CMake without any parameters, I get:
CMake Error at CMakeLists.txt:74 (find_package):
By not providing "FindLLVM.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "LLVM", but
CMake did not find one.
Could not find a package configuration file provided by "LLVM" (requested
version 5.0.0) with any of the following names:
LLVMConfig.cmake
llvm-config.cmake
Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set
"LLVM_DIR" to a directory containing one of the above files. If "LLVM"
provides a separate development package or SDK, be sure it has been
installed.
It tells me that it couldn't find LLVM. So, I pass the path to the LLVM_DIR, like this:
cmake .. -DLLVM_DIR=/usr/local/Cellar/llvm/5.0.0/share/cmake/modules/
I would expect everything to work. Instead I get the following error:
CMake Error at CMakeLists.txt:74 (find_package):
Could not find a configuration file for package "LLVM" that is compatible
with requested version "5.0.0".
The following configuration files were considered but not accepted:
/usr/local/Cellar/llvm/5.0.0/share/cmake/modules/llvm-config.cmake,
version: unknown
For some reason the version is not present anywhere in the share/cmake/modules directory.
How can I fix this, without changing the brew-installed LLVM?
Found the answer. I was passing a wrong path to LLVM_DIR.
I just have to use another directory (buried in lib, not in share):
cmake .. -DLLVM_DIR=/usr/local/Cellar/llvm/5.0.0/lib/cmake/llvm/
Not sure why brew decided to install 2 versions of CMake helpers for LLVM, one in share and one in lib.

eigen3 missing error during ROS installation

Hi I'm trying to install ROS on my MAC using homebrew.While installation I got this message :
CMake Error at CMakeLists.txt:7 (find_package):
By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Eigen3", but
CMake did not find one
Could not find a package configuration file provided by "Eigen3" with any
of the following names:
Eigen3Config.cmake
eigen3-config.cmake
Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set
"Eigen3_DIR" to a directory containing one of the above files. If "Eigen3"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
See also "/Users/Jishnu/ros_catkin_ws/build_isolated/pcl_ros/CMakeFiles/CMakeOutput.log".
<== Failed to process package 'pcl_ros':
Command '['/Users/Jishnu/ros_catkin_ws/install_isolated/env.sh', ' cmake', '/Users/Jishnu/ros_catkin_ws/src/perception_pcl/pcl_ros', '- DCATKIN_DEVEL_PREFIX=/Users/Jishnu/ros_catkin_ws/devel_isolated/pcl_ros', '-DCMAKE_INSTALL_PREFIX=/Users/Jishnu/ros_catkin_ws/install_isolated', '-DCMAKE_BUILD_TYPE=Release', '-G', 'Unix Makefiles']' returned non-zero exit status 1
I'M a beginner in ROS, so could someone please help me out with this. I have checked if Eigen is installed, version 3.2.4 is already installed
This solved the problem for me.
It seems this has been resolved, but I'll share how I got this
working: Elsewhere in the ros build workspace I found a copy of
FindEigen3.cmake:
ros_catkin_ws$ cp
src/orocos_kinematics_dynamics/orocos_kdl/config/FindEigen3.cmake
src/perception_pcl/pcl_ros/cfg/ Then I removed the following from
CMakeLists:
find_package(Eigen 3 Required) Replacing it with these lines from the
orocos CMakeLists
find_package(Eigen 3 QUIET) if(NOT Eigen_FOUND)
include(${PROJ_SOURCE_DIR}/cfg/FindEigen3.cmake)
set(Eigen_INCLUDE_DIR ${EIGEN3_INCLUDE_DIR}) endif()
include_directories(${Eigen_INCLUDE_DIR}) To be perfectly honest, I
didn't change config -> cfg when I did my build, but it seems to have
worked.
What I did to solve such problem was:
Finding the current value of CMAKE_ROOT by print it out using message( WARNING ${CMAKE_ROOT}) in .cmake file
Make sure Modules/FindEigen3.cmake exists in that folder
If not, download a copy from https://github.com/RainerKuemmerle/g2o/blob/master/cmake_modules/FindEigen3.cmake

Cmake Error for ITK with GDCM configuration

Following error found while configuring ITK with GDCM2.2
CMake Error at Modules/ThirdParty/GDCM/itk-module-init.cmake:5 (find_package):
By not providing "FindGDCM.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "GDCM", but
CMake did not find one.
Could not find a package configuration file provided by "GDCM" with any of
the following names:
GDCMConfig.cmake
gdcm-config.cmake
Add the installation prefix of "GDCM" to CMAKE_PREFIX_PATH or set
"GDCM_DIR" to a directory containing one of the above files. If "GDCM"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
CMakeLists.txt:558 (include)
I have installed GDCM2.2 [not repository] and manually set path of gdcm directory but still this error returned by Cmake.
Please help.
To build ITK with gdcm download .zip file of gdcm2.2.1 or latest version cause installing gdcm by exe is not include any GDCMconfig.cmake file but zip have it. And in ITK configuration we have to give path of directory where GDCMconfig.cmake is present.