Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: "add_action_files() directory not found", but msg and srv building fine #29

Open
autonomobil opened this issue Jan 17, 2022 · 3 comments

Comments

@autonomobil
Copy link
Contributor

autonomobil commented Jan 17, 2022

The ros package has the following structure:

custom_msg_pkg
├── CMakeLists.txt  
├── package.xml                               
├── action
│   └── some_action.action                 # Action files
├── srv
│   └── some_service.srv                 # Service files
├── msg
│   └── some_message.msg                 # Messages files 

When building (catkin build custom_msg_pkg) I'm getting the following error:

Errors     << custom_msg_pkg:check /home/user/catkin_ws/logs/custom_msg_pkg/build.check.003.log                                                                                                                                                                   
CMake Error at /opt/ros/melodic/share/actionlib_msgs/cmake/actionlib_msgs-extras.cmake:20 (message):
  add_action_files() directory not found:
  /home/user/catkin_ws/src/project/custom_msg_pkg//home/user/catkin_ws/src/project/custom_msg_pkg/action
Call Stack (most recent call first):
  /opt/ros/melodic/share/mrt_cmake_modules/cmake/mrt_cmake_modules-macros.cmake:429 (add_action_files)
  CMakeLists.txt:46 (mrt_add_action_files)


make: *** [cmake_check_build_system] Error 1
cd /home/user/catkin_ws/build/custom_msg_pkg; catkin build --get-env custom_msg_pkg | catkin env -si  /usr/bin/make cmake_check_build_system; cd -
.......................................................................................................................................................................................................................................................
Failed     << custom_msg_pkg:check          [ Exited with code 2 ]                                                                                                                                                                                           
Failed    <<< custom_msg_pkg                [ 0.6 seconds ]                                                                                                                                                                                                  
[build] Summary: 0 of 1 packages succeeded.                                                                                                                                                                                                            
[build]   Ignored:   22 packages were skipped or are blacklisted.                                                                                                                                                                                      
[build]   Warnings:  None.                                                                                                                                                                                                                             
[build]   Abandoned: None.                                                                                                                                                                                                                             
[build]   Failed:    1 packages failed.                                                                                                                                                                                                                
[build] Runtime: 0.7 seconds total.  

If I comment out mrt_add_action_files(action) in CMakeLists.txt everything builds fine.

Does it have to do something with this difference:

if(_ROS_SERVICE_FILES)
add_service_files(FILES ${_ROS_SERVICE_FILES} DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/${folder_name}")

vs.

if(_ROS_ACTION_FILES)
add_action_files(FILES ${_ROS_ACTION_FILES} DIRECTORY "${folder_name}")

@autonomobil
Copy link
Contributor Author

autonomobil commented Jan 17, 2022

Ah it seems that somehow my system has an old version (installed via http://wiki.ros.org/mrt_cmake_modules - sudo apt-get install ros-melodic-mrt-cmake-modules ) and I don't have this change on my system efde1cf#diff-4d4a941bac21cf7c8bfb4aedb3230e5a795d9e3b9665d6bd7b2f40292fb0b376

@autonomobil
Copy link
Contributor Author

autonomobil commented Jan 17, 2022

sudo apt update && 
sudo apt upgrade ros-melodic-mrt-cmake-modules && 
sudo apt install --reinstall ros-melodic-mrt-cmake-modules 

did not help. It seems to be a version from 15.10.2020?

Get:1 http://packages.ros.org/ros/ubuntu bionic/main amd64 ros-melodic-mrt-cmake-modules amd64 1.0.4-1bionic.20201015.070233 [61,8 kB]
Fetched 61,8 kB in 1s (78,7 kB/s)                        
(Reading database ... 389485 files and directories currently installed.)
Preparing to unpack .../ros-melodic-mrt-cmake-modules_1.0.4-1bionic.20201015.070233_amd64.deb ...
Unpacking ros-melodic-mrt-cmake-modules (1.0.4-1bionic.20201015.070233) over (1.0.4-1bionic.20201015.070233) ...
Setting up ros-melodic-mrt-cmake-modules (1.0.4-1bionic.20201015.070233) ...

@wienans
Copy link

wienans commented Apr 21, 2022

Hey @JohannesBeck
would it be possible to update the apt package for melodic and noetic?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants