Open 2m opened 1 year ago
This is a CMake bug in the package, which normally goes unnoticed in a traditional Linux distribution. grid_map_loader
calls include_directories(include ...)
, which makes the include directory part of the public interface (i.e. downstream packages will try to add that directory to their include directories). The problem is that the package doesn't actually install any headers, so that directory isn't created in the install prefix. On traditional Linux distributions all packages are installed into the same tree and therefore some other package will have created the directory (which I think ends up being something like /opt/ros/noetic/include
), so downstream packages don't run into any problems.
The fix is to replace the include_directories(include)
call with target_include_directories(${PROJECT_NAME} PRIVATE include)
to prevent the directory from becoming part of the public interface.
Thank you for the explanation. I will create a PR to the upstream project.
While the PR has not yet been merged, I was able to create a flake witch pulls grid_map_loader from my PR (https://github.com/2m/open_mower_ros/blob/fix/nix-flake-2m/flake.nix#L14-L24)
However if I add grid_map which depends on grid_map_demos which depend on grid_map_loader, it still takes the original non-patched version. I was not able to figure out how to patch grid_map_loader transitively. Whats the trick here? :)
First of all I would like to give a big thank you for this project. :) I am new to the ROS world and was having troubles installing noetic packages on my ArchLinux system. I was really glad when I found this repository.
I am working on a flake for OpenMower project and noticed that one of the dependencies
grid-map
does not build with the following error:Not sure if its a bug in the package or something else is going on.