Bug report
Required Info:
- Operating System:
- Installation type:
- Any installation that is a merge install (e.g. built with
colcon build --merge-install)
- Version or commit hash:
Steps to reproduce issue
I've created some mock packages that reproduce the issue. These packages and instructions for reproducing can be found in this repository: https://github.com/jacobperron/overlay_bug_reproduction
Expected behavior
We are able to build a package that exists in an underlay ROS 2 installation and have other packages in the overlay workspace properly link against it.
Actual behavior
In some circumstances, subject to the dependency tree, the compiler is given the underlay include directory before the overlay include directories. If a package appears in both the overlay and underlay, then the underlay include directory will be used instead.