Qt5Widgets cmake error
Hi,
While building a catkin workspace I need to perform the following steps:
$ source /opt/ros/indigo/setup.bash
$ cd ~/overlay_ws/
$ catkin_make
as mentioned on catkin tutorial step 2.3 Following the last step induced an error:
By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5Widgets", but CMake did not find one.
Could not find a package configuration file provided by "Qt5Widgets" with
any of the following names:
Qt5WidgetsConfig.cmake
qt5widgets-config.cmake
Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
"Qt5Widgets_DIR" to a directory containing one of the above files. If
"Qt5Widgets" provides a separate development package or SDK, be sure it has
been installed.
So to fix that I installed Qt5 from the website. Now I had to manually change the CMAKE_PREFIX_PATH
using CMAKE_PREFIX_PATH="$ENV{HOME}\qt5\5.5\gcc_64"
to include qt5.
And then I tried again which gave me another error:
CMake Error at /opt/ros/indigo/share/genmsg/cmake/genmsg-extras.cmake:271 (message):
Could not find 'share/std_msgs/cmake/std_msgs-msg-paths.cmake' (searched in
'/home/pb/ROS01/overlay_ws/devel').
Call Stack (most recent call first):
ros_tutorials/roscpp_tutorials/CMakeLists.txt:11 (generate_messages)
to solve the above error, a forum recommended me to do the source command again
$ source /opt/ros/indigo/setup.bash
Performing the source command again removes the path variable again. Now I am stuck in a loop.
Operating System Details As mentioned in comments, it might be useful for the community to answer based on the operating system I am using as well as the particular installation process I adopted to install ROS. Current OS - Ubuntu 14.04 ROS - indigo Installation guide followed to install indigo - http://wiki.ros.org/indigo/Installati...
Can someone tell me how to change environment path variable properly? Example - how to change CMAKE_PREFIX_PATH in this case?
Kindly help.
Checking the Qt Cmake Manual suggests to:
Have you tried this? I have no setup, so I cannot...
Could you please tell us what package(s) you are trying to build? The last time I've had to manually install Qt on an Ubuntu system has been very long ago, so only in specific circumstances should that be necessary.
@gvdhoorn - I am trying to build https://github.com/ros/ros_tutorials.git which is basically the ros_tutorials package. I am following the steps from the website: http://wiki.ros.org/catkin/Tutorials/... and the step 2.2 instructs me to clone from git and build it in step 2.3
Qt5 is correctly listed as a dependency of
turtlesim
(the pkg that needs it inros_tutorials
). Can you please tell us what OS you are trying this on, how you installed ROS, which version it is, etc?The tutorial doesn't explicitly mention it, but without the necessary prereqs, it won't work.
However, the
sudo apt-get install ros-kinetic-ros-tutorials
in step 1.1 (Preparing the environment) should already have installed all the necessary dependencies, hence my questions about your specific setup.Note that the tutorial does it this way as it is a tutorial on workspace overlaying, not on general Catkin workspace usage or creation. When overlaying, either all dependencies have already been satisfied, or you are responsible for making sure they are installed.
Another thing:
the path separator on Linux/Unix/MacOS(X) is the forward slash (
/
), not a backslash (\
). The backslash is an escape character, so yourCMAKE_PREFIX_PATH
does not work this way.Just realised (but can't test it right now) that it might be that
apt-get
only installed the runtime requirements. If, after installingros-kinetic-ros-tutorials
(and without theCMAKE_PREFIX_PATH
tweak) you still get errors, can you run a ..