Skip to content

CMake Error when bulid "autoware_tensorrt_plugins" in WSL2 Ubuntu 22.04 #6355

@mrmuyi

Description

@mrmuyi

Checklist

  • I've read the contribution guidelines.
  • I've searched other issues and no duplicate issues were found.
  • I'm convinced that this is not my fault but a bug.

Description

When "colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release", it report error:CMake Error at CMakeLists.txt:128 (add_library):
Target "autoware_tensorrt_plugins" links to target "CUDA::cudart" but the
target was not found. Perhaps a find_package() call is missing for an
IMPORTED target, or an ALIAS target is missing?

CMake Error at CMakeLists.txt:128 (add_library):
Target "autoware_tensorrt_plugins" links to target "spconv::spconv" but the
target was not found. Perhaps a find_package() call is missing for an
IMPORTED target, or an ALIAS target is missing?

Expected behavior

build success.

Actual behavior

report error and abort.

Steps to reproduce

followed the source install steps:
source /opt/ros/humble/setup.bash
sudo apt update && sudo apt upgrade
rosdep update
rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release

Versions

WINDOWS 11 WSL2-Ubuntu 22.04 LTS
Ros2 humble
Autoware main

Possible causes

When i try "./setup-dev-env.sh", it report error too:
TASK [autoware.dev_env.agnocast : Install linux headers for the running kernel] ****************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "No package matching 'linux-headers-6.6.87.2-microsoft-standard-WSL2' is available"}

Maybe it caused by the WSL2 Ubuntu, I tried install "sudo apt install -y linux-headers-generic", it could not help.

Additional context

If ignore the "autoware_tensorrt_plugins":
"colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-ignore autoware_tensorrt_plugins",
it can finished success.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions