Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with scraping ROS2 packages that link against local libraries. #353

Open
dyershov-bdai opened this issue May 24, 2024 · 1 comment

Comments

@dyershov-bdai
Copy link

dyershov-bdai commented May 24, 2024

image_geometry is a dependency for other ROS2 packages that I would like to use.
Simply adding

ROS2_PACKAGES = [
    ...
    "image_geometry",
] + [
    "rmw_cyclonedds_cpp",
]
ros2_local_repository(
    name = "ros2",
    include_packages = ROS2_PACKAGES,
    workspaces = ["/opt/ros/humble"],
)

and building

bazel build @ros2//:image_geometry_cc

yields an error:

Starting local Bazel server and connecting to it...
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=282
INFO: Reading rc options for 'build' from /workspaces/bdai/projects/dexterous_mobile_manipulation/.bazelrc:
  'build' options: --announce_rc --cxxopt=-std=c++20 --cxxopt=-Werror --cxxopt=-Wall --cxxopt=-Wextra --cxxopt=-Wdouble-promotion --cxxopt=-Wformat --cxxopt=-Wunused --cxxopt=-Wfloat-equal --cxxopt=-Wshadow --cxxopt=-Wconversion --cxxopt=-Winline --cxxopt=-Wno-variadic-macros --cxxopt=-Wnon-virtual-dtor --cxxopt=-Wpedantic --incompatible_strict_action_env --@aspect_rules_py//py:interpreter_version=3.10.12 --local_ram_resources=HOST_RAM*.9 --local_cpu_resources=HOST_CPUS-1
ERROR: /home/dyershov/.cache/bazel/_bazel_dyershov/b08d3ca622a076ec86ba271c886293c4/external/ros2/BUILD.bazel:974:11: @ros2//:image_geometry_cc: invalid label '/usr/local/cuda/targets/x86_64-linux/lib/libOpenCL.so.1' in element 2 of attribute 'srcs' in 'cc_library' rule: invalid target name '/usr/local/cuda/targets/x86_64-linux/lib/libOpenCL.so.1': target names may not start with '/'
ERROR: /home/dyershov/.cache/bazel/_bazel_dyershov/b08d3ca622a076ec86ba271c886293c4/external/ros2/BUILD.bazel:974:11: @ros2//:image_geometry_cc: invalid label '/usr/local/cuda/targets/x86_64-linux/lib/libOpenCL.so.1' in element 3 of attribute 'data' in 'cc_library' rule: invalid target name '/usr/local/cuda/targets/x86_64-linux/lib/libOpenCL.so.1': target names may not start with '/'
ERROR: Skipping '@ros2//:image_geometry_cc': Error evaluating '@ros2//:image_geometry_cc': error loading package '@ros2//': Package '' contains errors
WARNING: Target pattern parsing failed.
ERROR: Error evaluating '@ros2//:image_geometry_cc': error loading package '@ros2//': Package '' contains errors
INFO: Elapsed time: 24.758s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (2 packages loaded)

I understand that it is somehow related to linking against local libraries which is not allowed in bazel-ros, but for some reason this check fails to detect it.

Also, while we are here, what is the reason to reject local libary dependency? If I patch scraping scripts to allow it, do you expect it to fail in any way? What is the fundamental difference between /usr/lib and /usr/local/lib, and why libconsole_bridge is ok to depend on?

FYI: @adeeb10abbas

@adeeb10abbas
Copy link
Member

FWIW - I believe it's a clone and was reported here as well #330

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants