ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

catkin_make unable to find actionlib in its original install location

asked 2021-06-20 16:05:55 -0600

cwillia109 gravatar image

updated 2021-06-20 16:29:51 -0600

It seems as though it is looking for actionlib in one of our catkin workspaces. It was installed to /opt/ros/kinetic/share/actionlib. Is there a way to correct how catkin finds it? Is there another issue causing this?

CMake Error at /home/user/catkin_ws/devel/share/actionlib/cmake/actionlibConfig.cmake:113 (message):
  Project 'actionlib' specifies
  '/home/user/catkin_ws/src/actionlib/actionlib/include' as an include dir,
  which is not found.  It does neither exist as an absolute directory nor in
  Check the issue tracker '' and
  consider creating a ticket if the problem has not been reported yet.
Call Stack (most recent call first):
  /opt/ros/kinetic/share/tf2_ros/cmake/tf2_rosConfig.cmake:197 (find_package)
  /opt/ros/kinetic/share/tf/cmake/tfConfig.cmake:197 (find_package)
  /opt/ros/kinetic/share/amcl/cmake/amclConfig.cmake:197 (find_package)
  /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package)
  basic_swarm/CMakeLists.txt:10 (find_package)

Edit: There are two workspaces. I'm working in workspace 2, I removed catkin_ws and now ws 2 makes fine. My new question is why did this happen to begin with?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-06-21 02:50:30 -0600

mgruhler gravatar image

It's hard to debug this after you've already fixed the issue. But I guess you did something along the following lines:

  1. You created catkin_ws and added source path/to/catkin_ws/devel/setup.bash to your .bashrc
  2. You cloned actionlib into catkin_ws and built it
  3. You created ws2, creating an overlay over catkin_ws through workspace chaining, as this had been source'd through your .bashrc
  4. You added source path/to/ws2/devel/setup.bash to your .bashrc
  5. You deleted actionlib from catkin_ws, but did not run a clean build. thus, the cmake artifacts remained, pointing to the now non-existing location
  6. When building ws2, you are presented with the above problem. By deleting catkin_ws and thus the cmake artifcats etc present in that workspace, you fixed everything.

If you still have both source commands in your .bashrc you should see an error about not finding catkin_ws/devel/setup.bash every time you open a new terminal. Note that the "last command wins" when sourcing ROS workspaces (built with catkin). Thus, all previous ones don't take effect.

This is one of the reasons why I personally advocate to never put your source-command into the .bashrc execpt for when you are only working with a single workspace ever (which, as soon as you start to work in larger or more advanced projects, you'll probably not do anymore).

edit flag offensive delete link more


I'm not the only one using the machine, so something along those lines might have happened thank you. Accepted as an answer for search engine's sake.

cwillia109 gravatar image cwillia109  ( 2021-06-28 20:30:07 -0600 )edit

To prevent this from happening again I suggest then the following:

  1. use dedicated user accounts ;-)
  2. if dedicated user accounts are not possible: whenever you create a new workspace, first source /opt/ros/<DISTRO>/setup.bash, create your workspace, and manually source this workspace in each new terminal. This should prevent you from from accidentally chaining workspaces again
mgruhler gravatar image mgruhler  ( 2021-06-29 01:23:11 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2021-06-20 16:05:55 -0600

Seen: 188 times

Last updated: Jun 21 '21