colcon / colcon-cmake

Extension for colcon to support CMake packages
http://colcon.readthedocs.io
Apache License 2.0
16 stars 25 forks source link

RSL official package build on Windows #135

Closed GilmarCorreia closed 6 months ago

GilmarCorreia commented 6 months ago

Hello ROS Developers,

I'm encountering the same error while attempting to build the RSL package on Windows. I'm struggling to identify the solution to this problem. Currently, I'm using ROS Humble, Windows 10, and Visual Studio 16 2019.

Here is the command I'm using and the resulting error:

C:\ros2\humble>colcon build --packages-select rsl --merge-install
Starting >>> rsl
--- stderr: rsl
Traceback (most recent call last):
  File "c:\python38\lib\site-packages\colcon_core\executor\__init__.py", line 91, in __call__
    rc = await self.task(*args, **kwargs)
  File "c:\python38\lib\site-packages\colcon_core\task\__init__.py", line 93, in __call__
    return await task_method(*args, **kwargs)
  File "c:\python38\lib\site-packages\colcon_ros\task\catkin\build.py", line 74, in build
    rc = await extension.build(
  File "c:\python38\lib\site-packages\colcon_cmake\task\cmake\build.py", line 103, in build
    rc = await self._build(
  File "c:\python38\lib\site-packages\colcon_cmake\task\cmake\build.py", line 236, in _build
    if not await has_target(args.build_base, target):
  File "c:\python38\lib\site-packages\colcon_cmake\task\cmake\__init__.py", line 61, in has_target
    assert target == 'install'
AssertionError

What steps should I take to successfully build this package?

GilmarCorreia commented 6 months ago

I have resolved the issue using the following command:

colcon build --packages-select rsl --merge-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja

Thank you.