catkin build error: no rule to make a .so file

asked 2023-02-11 04:36:35 -0500

annamalai gravatar image

I am following this tutorial to simulate a robotic arm with visual servoing, for which I had required to install MoveIt from source and then build it and also the required packages based on this but I got many errors and resolved most of them. Then I got a error which I couldn't solve. So I had posted it in this forum but I got no response.

Then I installed MoveIt Binary and then I cloned the packages and tried to build it (by following the Getting Started) but I got the very same error that is ,

Errors     << moveit_tutorials:make /home/annamalai/ws_moveit/logs/moveit_tutorials/build.make.004.log                                
make[2]: *** No rule to make target '/opt/ros/noetic/lib/', needed by '/home/annamalai/ws_moveit/devel/.private/moveit_tutorials/lib/'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:4145: doc/controller_configuration/CMakeFiles/controller_manager_example.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
cd /home/annamalai/ws_moveit/build/moveit_tutorials; catkin build --get-env moveit_tutorials | catkin env -si  /usr/bin/make --jobserver-auth=3,4; cd -

Then I found that this file is used by Octomap package ,inorder to use it along the other packages but I coudn't find any solution for it.

OS: Linux Mint 20.3 Cinnamon
ROS-Distro: noetic

env | grep ros


edit retag flag offensive close merge delete


Have you tried installing octomap? Specifically, the following command

$ sudo apt-get install ros-noetic-octomap
$ source /opt/ros/noetic/setup.bash
$ catkin_make
miura gravatar image miura  ( 2023-02-11 05:46:29 -0500 )edit

@miura Yes I tried installing from ros-noetic repositories and as well as git cloning it too. I tried the commands you gave,and it said that ros-noetic-octomap is already installed and since a part of workspace is built using catkin build I can't use catkin_make so it showed up a error so instead of that I even tried with 'catkin build` but it showed the same octomap error as I mentioned in the Question.

annamalai gravatar image annamalai  ( 2023-02-11 07:58:16 -0500 )edit

Thank you for trying it. I am not familiar with octmap, so I did a little research within ROS Answers and it seems that the parameter octomap_DIR needs to be set in CMakeLists.txt.

miura gravatar image miura  ( 2023-02-11 20:29:31 -0500 )edit

@miura Sorry for very late reply. I tried setting octomap_DIR corressponding to location of octomap-config.cmake in CMakeLists.txt of octomap (~/ws_moveit/src/octomap/octomap/CMakeLists.txt) but still I get the same error. Maybe I have to reread the answers and learn the file structures and compilation in depth.

annamalai gravatar image annamalai  ( 2023-02-23 05:04:26 -0500 )edit