ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

colcon build fails while following tutorial

asked 2022-07-15 05:50:09 -0500

grubekoty gravatar image

Hi, I'm just starting out with ROS2 Foxy. I installed it on windows and I got to the part of the tutorial where I am to build an example using colcon. No matter what I do, I get the following error:

C:\dev\ros2_example_ws>colcon build --symlink-install --merge-install
[0.981s] root DEBUG Using proactor: IocpProactor
Starting >>> examples_rclcpp_async_client
[0.999s] colcon.colcon_ros.prefix_path.catkin WARNING The path 'C:\opt\ros\foxy\x64\tools\vcpkg\installed\x64-windows' in the environment variable CMAKE_PREFIX_PATH doesn't exist
Starting >>> examples_rclcpp_cbg_executor
Starting >>> examples_rclcpp_minimal_action_client
Starting >>> examples_rclcpp_minimal_action_server
Starting >>> examples_rclcpp_minimal_client
Starting >>> examples_rclcpp_minimal_composition
Starting >>> examples_rclcpp_minimal_publisher
Starting >>> examples_rclcpp_minimal_service
--- stderr: examples_rclcpp_minimal_service
CMake Error: failed to create symbolic link 'C:/dev/ros2_example_ws/install/lib/examples_rclcpp_minimal_service/service_main.exe': operation not permitted
CMake Error at ament_cmake_symlink_install/ament_cmake_symlink_install.cmake:302 (message): Could not create symlink
'C:/dev/ros2_example_ws/install/lib/examples_rclcpp_minimal_service/service_main.exe' pointing to
'C:/dev/ros2_example_ws/build/examples_rclcpp_minimal_service/Release/service_main.exe' Call Stack (most recent call first):
ament_cmake_symlink_install_targets_0_Release.cmake:1 (ament_cmake_symlink_install_targets)
ament_cmake_symlink_install/ament_cmake_symlink_install.cmake:314 (include)
cmake_install.cmake:36 (include)

Failed <<< examples_rclcpp_minimal_service [8.86s, exited with code 1]
Aborted <<< examples_rclcpp_minimal_action_server [8.98s]
Aborted <<< examples_rclcpp_minimal_composition [9.22s]
Aborted <<< examples_rclcpp_minimal_client [9.86s]
Aborted <<< examples_rclcpp_async_client [10.0s]
Aborted <<< examples_rclcpp_minimal_action_client [10.6s]
Aborted <<< examples_rclcpp_cbg_executor [11.9s]
Aborted <<< examples_rclcpp_minimal_publisher [11.8s]

Summary: 0 packages finished [12.6s]
1 package failed: examples_rclcpp_minimal_service
7 packages aborted: examples_rclcpp_async_client examples_rclcpp_cbg_executor examples_rclcpp_minimal_action_client examples_rclcpp_minimal_action_server examples_rclcpp_minimal_client examples_rclcpp_minimal_composition examples_rclcpp_minimal_publisher
2 packages had stderr output: examples_rclcpp_minimal_action_server examples_rclcpp_minimal_service
14 packages not processed

I am running the command through Native Tools, Admin. Any help will be appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-07-15 07:06:27 -0500

grubekoty gravatar image

I can't believe how dumb the issue was. I was following the tutorial for humble, and the command was as follows: git clone src/examples -b humbleall you need to do to make it work for foxy is substitute "foxy" for "humble": git clone src/examples -b foxy

hope these 4 hours will at leas save someone some time.

edit flag offensive delete link more


I don't have enough points to mark this as the answer.

grubekoty gravatar image grubekoty  ( 2022-07-15 07:07:03 -0500 )edit

Question Tools

1 follower


Asked: 2022-07-15 05:50:09 -0500

Seen: 1,422 times

Last updated: Jul 15 '22