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

cmake failures due to relative include dirs in pkg-config files and caches #506

Closed
meyerj opened this issue Sep 6, 2013 · 2 comments
Closed
Assignees
Labels

Comments

@meyerj
Copy link
Contributor

meyerj commented Sep 6, 2013

With the newest catkin version introduced in hydro (currently 0.5.73) I am getting the following cmake errors whenever cmake is run the second time in the same catkin workspace (e.g. if a CMakeLists.txt file has been changed):

-- ==> add_subdirectory(msgs/fmp_msgs)
-- fmp_msgs: 2 messages, 0 services
CMake Error at /opt/ros/hydro/share/catkin/cmake/catkin_package.cmake:335 (message):
  catkin_package() include dir 'include' is neither an absolute directory nor
  exists relative to '/opt/uxvcos/hydro/msgs/fmp_msgs'
Call Stack (most recent call first):
  /opt/ros/hydro/share/catkin/cmake/catkin_package.cmake:98 (_catkin_package)
  msgs/fmp_msgs/CMakeLists.txt:51 (catkin_package)

The fmp_msgs is nothing special, just a standard message only package that has no include directories at all:

...
catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES fmp_msgs
  CATKIN_DEPENDS message_runtime std_msgs
#  DEPENDS system_lib
)
...

I guess the problem is that the cmake cache contains the fmp_msgs_INCLUDE_DIRS variable after the first invocation and catkin_package() prepends these paths to the INCLUDE_DIRS specified in its arguments in catkin_package.cmake:119 and then complains about the missing directory in catkin_package.cmake:335:

fmp_msgs_INCLUDE_DIRS:INTERNAL=/opt/uxvcos/hydro/devel/include;include

The relative include entry was pulled in from std_msgs.pc somehow:

prefix=/opt/ros/hydro

Name: std_msgs
Description: Description of std_msgs
Version: 0.5.8
Cflags: -Iinclude
Libs: -L/opt/ros/hydro/lib 
Requires: message_runtime

Is this problem related to #490, or is there anything else I might be doing wrong here?

@meyerj
Copy link
Contributor Author

meyerj commented Sep 6, 2013

Hmm, I cannot reproduce the cmake error anymore in a clean workspace. Nevertheless, it might be wrong if pkg-config reports a relative include directory on a fresh installation from the ROS Ubuntu repositories:

$ pkg-config --cflags-only-I std_msgs
include
$ rospack cflags-only-I std_msgs
include

@dirk-thomas
Copy link
Member

I could not reproduce your original issue either but the relative include path in the .pc file was definitely a regression of #490.

@dirk-thomas dirk-thomas reopened this Sep 17, 2013
cwecht pushed a commit to cwecht/catkin that referenced this issue Mar 20, 2018
Forward all textures from protobuf to ROS messages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants