mrpt: Octomap include problem
When building current master, if there is ros-octomap installed, cmake script finds octomap directory correctly.
However, when compiling, there is an error octomap/octomap.h: No such file or directory
: build log
When uninstalling ros-octomap and using internal one, there is no problem.
Built with internal octomap, MRPT installs and then there is an error when building catkin workspace with MRPT included: build log
Installing ros-octomap between building MRPT and catkin workspace solves compilation problem but looks like a piece of duct tape.
Isn’t it related to #574?
Sincerely, Borys.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 20 (15 by maintainers)
Commits related to this issue
- fix missing octomap -I directory. cc#579 — committed to MRPT/mrpt by jlblancoc 7 years ago
@spsancti :
For these tests, and since you only need MRPT libs, you should disable building all MRPT applications and tests from CMake. If you like GUIs, you can do it via cmake-gui or ccmake. It will save a lot of build time 😉
For your case “octomap uninstalled”: when you do “(sudo) make install”, can you see it actually copies the octomap headers under “/usr/local/include/mrpt/maps/include/mrpt/…” ?? I think I tested it and it worked (?).
Also, please check the contents of the file “/usr/local/share/cmake/MRPTConfig.cmake” (or something alike) and search for “octomap” to see if what you see makes sense.
Will continue debugging it…
@jolting :
Thanks! My idea (despite the huge mess of old CMake code accumulated over the years, in the wait to get it better organized someday…) was trying to write new CMake code as “respectful” as possible: don’t add the INCLUDE_DIRECTORIES and “pollute” all MRPT examples, libraries and apps, only those that use
mrpt-maps
.For now I will probably just pollute everything with a global INCLUDE_DIRECTORIES . I would rather prefer to rewrite all dependencies to external/system libraries as CMake >=3.0’s constructs of the type
add_library(<name> INTERFACE )
, such that adding a dependency to those external libs will automatically . Probably this implies using EXPORTED targets, etc. A lot of work to do here!Will try to give a quick, easy fix to this to unblock the situation…
I think it’s missing a
INCLUDE_DIRECTORIES("${OCTOMAP_INCLUDE_DIRS}")
line. It works with the debian packaged version because /usr/include is already in the system path.On ROS the include path should is
/opt/ros/$ROS_RELEASE/include