Cached CMAKE_PREFIX_PATH problem when building install space

asked 2018-12-07 10:40:27 -0500

jdlangs gravatar image

I am able to reproduce this consistently with the following steps with ROS Kinetic and catkin_tools:

  • Create a new workspace and empty package (test_pkg) inside with catkin init and catkin create pkg ...
  • In a clean terminal, source /opt/ros/kinetic/setup.bash and run catkin build. Everything builds fine and after sourcing devel/setup.bash, rospack find test_pkg works fine.
  • Now set up the workspace to build the install space with catkin config --install and catkin clean
  • Again from a clean terminal, source /opt/ros/kinetic/setup.bash and run catkin build.
  • Now when I start a new terminal and source devel/setup.bash and run catkin config, I see this:

---------------------------------------------------------------------------------------
Profile:                     default
Extending:          [cached] /opt/ros/kinetic:/home/jlangsfeld/Workspaces/test_ws/devel
Workspace:                   /home/jlangsfeld/Workspaces/test_ws
---------------------------------------------------------------------------------------
Source Space:       [exists] /home/jlangsfeld/Workspaces/test_ws/src
Log Space:          [exists] /home/jlangsfeld/Workspaces/test_ws/logs
Build Space:        [exists] /home/jlangsfeld/Workspaces/test_ws/build
Devel Space:        [exists] /home/jlangsfeld/Workspaces/test_ws/devel
Install Space:      [exists] /home/jlangsfeld/Workspaces/test_ws/install
DESTDIR:            [unused] None
---------------------------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        merged
---------------------------------------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
---------------------------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
---------------------------------------------------------------------------------------


---------------------------------------------------------------------------------------
WARNING: Your current environment's CMAKE_PREFIX_PATH is different from the cached
CMAKE_PREFIX_PATH used the last time this workspace was built.

If you want to use a different CMAKE_PREFIX_PATH you should call `catkin clean` to
remove all references to the previous CMAKE_PREFIX_PATH.

Cached CMAKE_PREFIX_PATH:
    /opt/ros/kinetic:/home/jlangsfeld/Workspaces/test_ws/devel
Current CMAKE_PREFIX_PATH:
    /home/jlangsfeld/Workspaces/test_ws/devel:/opt/ros/kinetic
---------------------------------------------------------------------------------------

The problem here is that .../test_ws/devel appears backwards in the cached CMAKE_PREFIX_PATH, breaking other ROS command line tools. Note that if I source install/setup.bash instead, everything works and rospack find test_pkg finds it in the install/share directory.

So my question is am I doing something wrong here or is there a tooling issue?

Thanks, Josh

edit retag flag offensive close merge delete