CMake to find a package configuration file provided by "gazebo", but CMake did not find one - cmake

I try build this khancyr/ardupilot_gazebo (github) plugin but I get this error after run sudo cmake ..
I use fedora35 so I cant run apt-get install libgazeboX-dev
what can I do for this problem ?
CMake Error at CMakeLists.txt:11 (find_package):
By not providing "Findgazebo.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "gazebo", but
CMake did not find one.
Could not find a package configuration file provided by "gazebo" with any
of the following names:
gazeboConfig.cmake
gazebo-config.cmake
Add the installation prefix of "gazebo" to CMAKE_PREFIX_PATH or set
"gazebo_DIR" to a directory containing one of the above files. If "gazebo"
provides a separate development package or SDK, be sure it has been
installed.

Have you tried running apt-get update && apt-get install ros-foxy-gazebo-ros-pkgs before running your command.

Related

When I build someone else's code it says `Package Qt5Gui was not found in the pkg-config search path` but i installed it

I have installed Qt 5.1.4 but when I 'make install' it shows
Package Qt5Gui was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5Gui.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Qt5Gui' found
Package Qt5Widgets was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5Widgets.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Qt5Widgets' found
Package Qt5Multimedia was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5Multimedia.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Qt5Multimedia' found
But I installed this software qt-opensource-linux-x64-5.14.0.run, after I tried to find them I ran locate Qt5Gui but no Qt5Gui.pc returned,so how can i get Qt5*.pc on my ubuntu 20.04 ?
The installation I started was missing a few more packages
The complete installation should look like this
sudo apt install qtmultimedia5-dev qt5-default -y
The construction of the qt compilation environment requires more than the installation package downloaded from the official website
It worked for me !
Now i can find the Qt5*.pc !
You need to install qtbase5-dev which is part of qt5-default
see: https://packages.ubuntu.com/bionic/amd64/qtbase5-dev/filelist
EDIT: you may also have to install the package qtmultimedia5-dev.

include could not fined load file: CGAL_TBB_support

I'm trying to run "Triangulation_3" examples and while doing the "cmake" I get this error:
CMake Error at CMakeLists.txt:44 (include):
include could not find load file:
CGAL_TBB_support
I'm using ubuntu 20.04 and I've already installed TBB library using
sudo apt-get install libtbb-dev
How can I fix this error?
Thanks.
It seems you are using the system libcgal-dev version 5.0.3, as provided by apt for Ubuntu 20.04. That version of CGAL does not have the CMake module CGAL_TBB_support.cmake.
Probably you are using CGAL examples from more recent version of CGAL, maybe one you downloaded or cloned using Git.
If you recent version of CGAL is, for example, at the path /home/me/downloads/CGAL-5.3, then set the CMake cache variable CGAL_DIR to that directory. You can pass the option -DCGAL_DIR=/home/me/downloads/CGAL-5.3 to the cmake command line, for example. Or set the variable CGAL_DIR to /home/me/downloads/CGAL-5.3 in CMake-GUI. Of course, adjust you the real path on your system.

Locations PCLConfig.cmake and pcl-config.cmake files for PCL library

I installed PCL using the following commands.
sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
sudo apt-get update
sudo apt-get install libpcl-all
When I compiled my PCL program with the following lines in CMakeLists.txt
find_package(PCL 1.3 REQUIRED COMPONENTS)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
I have errors as
CMake Error at CMakeLists.txt:17 (find_package):
By not providing "FindPCL.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "PCL", but
CMake did not find one.
Could not find a package configuration file provided by "PCL" (requested
version 1.3) with any of the following names:
PCLConfig.cmake
pcl-config.cmake
Add the installation prefix of "PCL" to CMAKE_PREFIX_PATH or set "PCL_DIR"
to a directory containing one of the above files. If "PCL" provides a
separate development package or SDK, be sure it has been installed.
I can't locate PCLConfig.cmake and pcl-config.cmake in my system.
I did like
locate PCLConfig.cmake
/home/ttt/.local/share/Trash/files/PCLConfig.cmake
/home/ttt/.local/share/Trash/files/DemoApplications-master/Calculus/tv_auto_on_off/voxel-sdk/libvoxelpcl/VoxelPCLConfig.cmake.in
/home/ttt/.local/share/Trash/files/config/VoxelPCLConfig.cmake.in
/home/ttt/.local/share/Trash/files/voxelsdk.2/config/VoxelPCLConfig.cmake.in
/home/ttt/.local/share/Trash/info/PCLConfig.cmake.trashinfo
/home/ttt/Softwares/voxelsdk/config/VoxelPCLConfig.cmake.in
/usr/lib/cmake/VoxelPCL/VoxelPCLConfig.cmake
Does it make sense?
I tried like
set(PCL_DIR "/home/ttt/.local/share/Trash/files/PCLConfig.cmake")
find_package(PCL 1.3 REQUIRED COMPONENTS)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
But still have the same error.
How to locate PCLConfig.cmake in my system?
Thanks
you should specify the PCL dir for the CMake to find it.
In a terminal run :
$ locate PCLConfig.cmake
Then, add the found folder (without the filename) to your CMakeLists like the following :
set(PCL_DIR "/found/folder/")
#change X.x to whatever version yo installed
Sidenote : /usr/share/pcl-x.x is the usual path to your pcl folder.
I had the same problem when I followed the steps mentioned on the website http://www.pointclouds.org/downloads/linux.html, for Ubuntu 18.
You simply need to run
sudo apt install libpcl-dev
as bionic is not mentioned in the distributions (http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu/dists/)

Could not find CMake package configuration file for "Eigen3"

When I enter this command:
cd /Users/mona/ros_catkin_ws/build_isolated/pcl_ros && /Users/mona/ros_catkin_ws/install_isolated/env.sh cmake /Users/mona/ros_catkin_ws/src/perception_pcl/pcl_ros -DCATKIN_DEVEL_PREFIX=/Users/mona/ros_catkin_ws/devel_isolated/pcl_ros -DCMAKE_INSTALL_PREFIX=/Users/mona/ros_catkin_ws/install_isolated -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles'
I receive this error:
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- system
-- filesystem
-- thread
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/mona/ros_catkin_ws/build_isolated/pcl_ros/CMakeFiles/CMakeOutput.log".
This command is ran as part of running this command for installing ROS:
./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
Any idea how that could be fixed?
Please see more details of question here: http://answers.ros.org/question/215080/how-to-add-the-installation-prefix-of-eigen3-to-cmake_prefix_path-or-set-eigen3_dir-to-a-directory-containing-one-of-the-above-files/
For linux users, this may help like it did for me: just install the developers' package of the eigen3 lib by the following command.
sudo apt install libeigen3-dev
You have to install Eigen3. It provides the FindEigen3.cmake file. The error occurs because the project you want to configure, has a dependency to Eigen3.
If you have Eigen3 installed, follow the error message and add Eigen3 to CMake's search path.

how to map pkg-config names to yum/apt-get

Lots of makefiles use pkg-config but the names don't relate to package managers (e.g. yum / apt). How to map pkg-config names to them? is there a trick?
Example: if I do yum searchName -- look through the name and approximate to pkg-config's name
Result:
$ pkg-config --libs dbus-glib-0
Package dbus-glib-0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `dbus-glib-0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'dbus-glib-0' found
$ sudo yum install dbus-glib
Loaded plugins: langpacks, refresh-packagekit
Package dbus-glib-0.100-5.fc19.i686 already installed and latest version
Nothing to do
$ sudo yum install dbus-glib-0
Loaded plugins: langpacks, refresh-packagekit
No package dbus-glib-0 available.
Error: Nothing to do
In the case of apt-get, if you have some software that complains about this missing package via pkg-config, for instance:
configure: error: Package requirements (gtk+-2.0 >= 2.8) were not met:
No package 'gtk+-2.0' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables GTK_CFLAGS
and GTK_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
Error: Could not run ./configure, which is required to configure banshee
Then it means that the configure script is looking for the gtk+-2.0 pkgconfig package.
Then, what you can do is this:
$ sudo apt-get install apt-file
...
$ apt-file update
...
$ apt-file search gtk+-2.0 | grep "\.pc"
libgtk2.0-dev: /usr/lib/x86_64-linux-gnu/pkgconfig/gtk+-2.0.pc
Which means you can install package libgtk2.0-dev:
sudo apt-get install libgtk2.0-dev
And the dependency would be satisfied.
In the particular case of the original question:
$ apt-file search --package-only dbus-glib-1.pc
libdbus-glib-1-dev
(dbus-glib-0 seems to be too old to show up in my system.)
The pkg-config files are usually provided by the -devel package so in most cases foo.pc is provided by libfoo-devel. That's still guesswork, but there are two shortcuts:
Installing by path name, if you know where the .pc file will end up
$> yum install /usr/lib64/pkgconfig/foo.pc
That works for any file, but you still need to guess where the .pc file is. The best approach is using the actual pkgconfig requirement:
$> yum install "pkgconfig(foo)"
Use the quotes to avoid the shell trying to interpret the parenthesis.