intel / ad-rss-lib

Library implementing the Responsibility Sensitive Safety model (RSS) for Autonomous Vehicles
https://intel.github.io/ad-rss-lib/
GNU Lesser General Public License v2.1
336 stars 138 forks source link

Issue with colcon building (duplicated dependency package spdlog) #116

Closed mdrwiega closed 2 years ago

mdrwiega commented 2 years ago

Hi,

I have noticed an issue with multiple packages spdlog during the building of ad_rss_lib with colcon.

The ad_rss_lib is added as a dependency to another ROS2 package (custom_package).

repositories:
  external/ad_rss_lib:
    type: git
    url: https://github.com/intel/ad-rss-lib.git
    version: v4.5.0

Then dependencies of custom_package are pulled with vcs import --recursive < dependency.repos. During the building, I'm receiving the below error.

colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to ad_rss
[0.622s] ERROR:colcon:colcon build: Duplicate package names not supported:
- spdlog:
  - src/custom_package/external/ad_rss_lib/dependencies/map/dependencies/spdlog
  - src/custom_package/external/ad_rss_lib/dependencies/spdlog

That's because the spdlog is pulled twice: first as the ad_rss_lib dependency and then again as the dependency of carla_simulator/map.

The same happens during building the ad_rss_lib separately but with the --recursive option in git submodule update.

Thank you for developing the RSS related project. Best regards, Michal

berndgassmann commented 2 years ago

Hi Michal,

Thanks for reaching out. One way out of that would either to not make use of --recursive (as that's the root cause of the problem), but that seems to be not possible in your case, if I understood. So placing COLCON_IGNORE to one of the spdlog folders would help as an immediate solution.

To support this kind of usage in general, we have to remove the ad_rss_lib/dependencies/spdlog but then have to note the '--recursive' usage on submodule update in the readme.

mdrwiega commented 2 years ago

Hi,

Thanks a lot for your help.

Yes, because of other dependencies I have to use --recursive option. Also, the COLCON_IGNORE is not an option because I'm using the ros-tooling/action-ros-ci that doesn't support intermediate steps (to add file) between dependencies importing (vcs) and building with colcon.

But, I'll try to get rid of the spdlog dependency from ad_rss_lib and to use the one from map.

Best regards, Michal