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/liboctomap.so', needed by '/home/annamalai/ws_moveit/devel/.private/moveit_tutorials/lib/libcontroller_manager_example.so'.  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 liboctomap.so 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

PKG_CONFIG_PATH=/home/annamalai/ws_moveit/devel/lib/pkgconfig:/opt/ros/noetic/lib/pkgconfig:/opt/ros/noetic/lib/x86_64-linux-gnu/pkgconfig
ROS_PACKAGE_PATH=/home/annamalai/ws_moveit/src/octomap/octomap:/home/annamalai/ws_moveit/src/octomap/dynamicEDT3D:/home/annamalai/ws_moveit/src/moveit_tutorials:/home/annamalai/ws_moveit/src/octomap/octovis:/home/annamalai/ws_moveit/src/panda_moveit_config:/opt/ros/noetic/share

ROS_ETC_DIR=/opt/ros/noetic/etc/ros
CMAKE_PREFIX_PATH=/home/annamalai/ws_moveit/devel:/opt/ros/noetic
PYTHONPATH=/opt/ros/noetic/lib/python3/dist-packages
LD_LIBRARY_PATH=/home/annamalai/ws_moveit/devel/lib:/opt/ros/noetic/lib:/opt/ros/noetic/lib/x86_64-linux-gnu
PATH=/home/annamalai/ws_moveit/devel/bin:/opt/ros/noetic/bin:/home/annamalai/.local/bin:/home/annamalai/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin:/home/annamalai/go/bin
ROS_ROOT=/opt/ros/noetic/share/ros
edit retag flag offensive close merge delete

Comments

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.

https://answers.ros.org/question/4087...https://answers.ros.org/question/5284...

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

@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