mvukov / rules_ros2

Build ROS 2 with Bazel
Apache License 2.0
74 stars 42 forks source link

Build fails in bazel 7.x.x #328

Open dyershov-bdai opened 3 weeks ago

dyershov-bdai commented 3 weeks ago

Hi! Thank you for the fantastic project. I am attempting to load it as an external dependency in my bazel 7 environment. I am having some issues with the foreign cc rules:

ERROR: /home/dyershov/.cache/bazel/_bazel_dyershov/dd610be539cf5c8dc491d9d968e644d0/external/cyclonedds/BUILD.bazel:122:6: Error while validating output TreeArtifact File:[[<execution_root>]bazel-out/k8-fastbuild/bin]external/cyclonedds/cyclonedds/include : Failed to resolve relative path ddsc/dds.h inside TreeArtifact /home/dyershov/.cache/bazel/_bazel_dyershov/dd610be539cf5c8dc491d9d968e644d0/execroot/_main/bazel-out/k8-fastbuild/bin/external/cyclonedds/cyclonedds/include. The associated file is either missing or is an invalid symlink.
ERROR: /home/dyershov/.cache/bazel/_bazel_dyershov/dd610be539cf5c8dc491d9d968e644d0/external/cyclonedds/BUILD.bazel:122:6: Foreign Cc - CMake: Building cyclonedds failed: not all outputs were created or valid
Target //ros2/test/launch_pytest:ros2_py_test_rclpy_init_test failed to build

Steps to reporoduce: change bazel version in .bazelversion

Is there a simple fix that I can apply, or is it going to be difficult to use ros2 rules with bazel 7?

Thanks again!

mvukov commented 3 weeks ago

Hi, please use settings from .bazelrc, build --noincompatible_sandbox_hermetic_tmp in particular.