I am experiencing problems with colcon build. I am running it in x64 Native Tools Command Prompt for VS 2019 as admin. I get this error for every colcon build i was trying to create.
I am using ROS2 foxy for Windows. View the full Error Message below:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional>c:\opt\ros\foxy\x64\setup.bat
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional>cd \dev\ros2_ws
C:\dev\ros2_ws>colcon build --symlink-install --merge-install
[0.790s] root DEBUG Using proactor: IocpProactor
Starting >>> examples_rclcpp_minimal_action_client
[0.804s] 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_minimal_action_server
Starting >>> examples_rclcpp_minimal_client
Starting >>> examples_rclcpp_minimal_composition
Starting >>> examples_rclcpp_minimal_publisher
Starting >>> examples_rclcpp_minimal_service
Starting >>> examples_rclcpp_minimal_subscriber
Starting >>> examples_rclcpp_minimal_timer
Starting >>> examples_rclcpp_multithreaded_executor
Starting >>> examples_rclpy_executors
Starting >>> examples_rclpy_minimal_action_client
Starting >>> examples_rclpy_minimal_action_server
--- stderr: examples_rclcpp_minimal_action_client
Traceback (most recent call last):
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\executor\__init__.py", line 91, in __call__
rc = await self.task(*args, **kwargs)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\task\__init__.py", line 93, in __call__
return await task_method(*args, **kwargs)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_ros\task\ament_cmake\build.py", line 59, in build
rc = await extension.build(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_cmake\task\cmake\build.py", line 87, in build
rc = await self._reconfigure(args, env)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_cmake\task\cmake\build.py", line 174, in _reconfigure
completed = await run(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\task\__init__.py", line 177, in run
completed = await colcon_core_subprocess_run(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\subprocess.py", line 81, in run
rc, _, _ = await _async_check_call(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\subprocess.py", line 139, in _async_check_call
process = await create_subprocess(
File "asyncio\subprocess.py", line 236, in create_subprocess_exec
File "asyncio\base_events.py", line 1630, in subprocess_exec
File "asyncio\windows_events.py", line 385, in _make_subprocess_transport
File "asyncio\base_subprocess.py", line 36, in __init__
File "asyncio\windows_events.py", line 881, in _start
File "asyncio\windows_utils.py", line 153, in __init__
File "subprocess.py", line 854, in __init__
File "subprocess.py", line 1307, in _execute_child
PermissionError: [WinError 5] Zugriff verweigert
---
Failed <<< examples_rclcpp_minimal_action_client [0.80s, exited with code 1]
--- stderr: examples_rclcpp_minimal_action_server
Traceback (most recent call last):
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\executor\__init__.py", line 91, in __call__
rc = await self.task(*args, **kwargs)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\task\__init__.py", line 93, in __call__
return await task_method(*args, **kwargs)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_ros\task\ament_cmake\build.py", line 59, in build
rc = await extension.build(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_cmake\task\cmake\build.py", line 87, in build
rc = await self._reconfigure(args, env)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_cmake\task\cmake\build.py", line 174, in _reconfigure
completed = await run(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\task\__init__.py", line 177, in run
completed = await colcon_core_subprocess_run(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\subprocess.py", line 81, in run
rc, _, _ = await _async_check_call(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\subprocess.py", line 139, in _async_check_call
process = await create_subprocess(
File "asyncio\subprocess.py", line 236, in create_subprocess_exec
File "asyncio\base_events.py", line 1630, in subprocess_exec
File "asyncio\windows_events.py", line 385, in _make_subprocess_transport
File "asyncio\base_subprocess.py", line 36, in __init__
File "asyncio\windows_events.py", line 881, in _start
File "asyncio\windows_utils.py", line 153, in __init__
File "subprocess.py", line 854, in __init__
File "subprocess.py", line 1307, in _execute_child
PermissionError: [WinError 5] Zugriff verweigert
---
Failed <<< examples_rclcpp_minimal_action_server [0.73s, exited with code 1]
--- stderr: examples_rclcpp_minimal_client
Traceback (most recent call last):
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\executor\__init__.py", line 91, in __call__
rc = await self.task(*args, **kwargs)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\task\__init__.py", line 93, in __call__
return await task_method(*args, **kwargs)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_ros\task\ament_cmake\build.py", line 59, in build
rc = await extension.build(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_cmake\task\cmake\build.py", line 87, in build
rc = await self._reconfigure(args, env)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_cmake\task\cmake\build.py", line 174, in _reconfigure
completed = await run(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\task\__init__.py", line 177, in run
completed = await colcon_core_subprocess_run(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\subprocess.py", line 81, in run
rc, _, _ = await _async_check_call(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\subprocess.py", line 139, in _async_check_call
process = await create_subprocess(
File "asyncio\subprocess.py", line 236, in create_subprocess_exec
File "asyncio\base_events.py", line 1630, in subprocess_exec
File "asyncio\windows_events.py", line 385, in _make_subprocess_transport
File "asyncio\base_subprocess.py", line 36, in __init__
File "asyncio\windows_events.py", line 881, in _start
File "asyncio\windows_utils.py", line 153, in __init__
File "subprocess.py", line 854, in __init__
File "subprocess.py", line 1307, in _execute_child
PermissionError: [WinError 5] Zugriff verweigert
---
Failed <<< examples_rclcpp_minimal_client [0.67s, exited with code 1]
--- stderr: examples_rclcpp_minimal_composition
Traceback (most recent call last):
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\executor\__init__.py", line 91, in __call__
rc = await self.task(*args, **kwargs)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\task\__init__.py", line 93, in __call__
return await task_method(*args, **kwargs)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_ros\task\ament_cmake\build.py", line 59, in build
rc = await extension.build(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_cmake\task\cmake\build.py", line 87, in build
rc = await self._reconfigure(args, env)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_cmake\task\cmake\build.py", line 174, in _reconfigure
completed = await run(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\task\__init__.py", line 177, in run
completed = await colcon_core_subprocess_run(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\subprocess.py", line 81, in run
rc, _, _ = await _async_check_call(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\subprocess.py", line 139, in _async_check_call
process = await create_subprocess(
File "asyncio\subprocess.py", line 236, in create_subprocess_exec
File "asyncio\base_events.py", line 1630, in subprocess_exec
File "asyncio\windows_events.py", line 385, in _make_subprocess_transport
File "asyncio\base_subprocess.py", line 36, in __init__
File "asyncio\windows_events.py", line 881, in _start
File "asyncio\windows_utils.py", line 153, in __init__
File "subprocess.py", line 854, in __init__
File "subprocess.py", line 1307, in _execute_child
PermissionError: [WinError 5] Zugriff verweigert
---
Failed <<< examples_rclcpp_minimal_composition [0.61s, exited with code 1]
--- stderr: examples_rclcpp_minimal_publisher
Traceback (most recent call last):
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\executor\__init__.py", line 91, in __call__
rc = await self.task(*args, **kwargs)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\task\__init__.py", line 93, in __call__
return await task_method(*args, **kwargs)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_ros\task\ament_cmake\build.py", line 59, in build
rc = await extension.build(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_cmake\task\cmake\build.py", line 87, in build
rc = await self._reconfigure(args, env)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_cmake\task\cmake\build.py", line 174, in _reconfigure
completed = await run(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\task\__init__.py", line 177, in run
completed = await colcon_core_subprocess_run(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\subprocess.py", line 81, in run
rc, _, _ = await _async_check_call(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\subprocess.py", line 139, in _async_check_call
process = await create_subprocess(
File "asyncio\subprocess.py", line 236, in create_subprocess_exec
File "asyncio\base_events.py", line 1630, in subprocess_exec
File "asyncio\windows_events.py", line 385, in _make_subprocess_transport
File "asyncio\base_subprocess.py", line 36, in __init__
File "asyncio\windows_events.py", line 881, in _start
File "asyncio\windows_utils.py", line 153, in __init__
File "subprocess.py", line 854, in __init__
File "subprocess.py", line 1307, in _execute_child
PermissionError: [WinError 5] Zugriff verweigert
---
Failed <<< examples_rclcpp_minimal_publisher [0.58s, exited with code 1]
--- stderr: examples_rclcpp_minimal_service
Traceback (most recent call last):
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\executor\__init__.py", line 91, in __call__
rc = await self.task(*args, **kwargs)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\task\__init__.py", line 93, in __call__
return await task_method(*args, **kwargs)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_ros\task\ament_cmake\build.py", line 59, in build
rc = await extension.build(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_cmake\task\cmake\build.py", line 87, in build
rc = await self._reconfigure(args, env)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_cmake\task\cmake\build.py", line 174, in _reconfigure
completed = await run(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\task\__init__.py", line 177, in run
completed = await colcon_core_subprocess_run(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\subprocess.py", line 81, in run
rc, _, _ = await _async_check_call(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\subprocess.py", line 139, in _async_check_call
process = await create_subprocess(
File "asyncio\subprocess.py", line 236, in create_subprocess_exec
File "asyncio\base_events.py", line 1630, in subprocess_exec
File "asyncio\windows_events.py", line 385, in _make_subprocess_transport
File "asyncio\base_subprocess.py", line 36, in __init__
File "asyncio\windows_events.py", line 881, in _start
File "asyncio\windows_utils.py", line 153, in __init__
File "subprocess.py", line 854, in __init__
File "subprocess.py", line 1307, in _execute_child
PermissionError: [WinError 5] Zugriff verweigert
---
Failed <<< examples_rclcpp_minimal_service [0.51s, exited with code 1]
--- stderr: examples_rclcpp_minimal_subscriber
Traceback (most recent call last):
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\executor\__init__.py", line 91, in __call__
rc = await self.task(*args, **kwargs)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\task\__init__.py", line 93, in __call__
return await task_method(*args, **kwargs)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_ros\task\ament_cmake\build.py", line 59, in build
rc = await extension.build(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_cmake\task\cmake\build.py", line 87, in build
rc = await self._reconfigure(args, env)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_cmake\task\cmake\build.py", line 174, in _reconfigure
completed = await run(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\task\__init__.py", line 177, in run
completed = await colcon_core_subprocess_run(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\subprocess.py", line 81, in run
rc, _, _ = await _async_check_call(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\subprocess.py", line 139, in _async_check_call
process = await create_subprocess(
File "asyncio\subprocess.py", line 236, in create_subprocess_exec
File "asyncio\base_events.py", line 1630, in subprocess_exec
File "asyncio\windows_events.py", line 385, in _make_subprocess_transport
File "asyncio\base_subprocess.py", line 36, in __init__
File "asyncio\windows_events.py", line 881, in _start
File "asyncio\windows_utils.py", line 153, in __init__
File "subprocess.py", line 854, in __init__
File "subprocess.py", line 1307, in _execute_child
PermissionError: [WinError 5] Zugriff verweigert
---
Failed <<< examples_rclcpp_minimal_subscriber [0.47s, exited with code 1]
--- stderr: examples_rclcpp_minimal_timer
Traceback (most recent call last):
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\executor\__init__.py", line 91, in __call__
rc = await self.task(*args, **kwargs)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\task\__init__.py", line 93, in __call__
return await task_method(*args, **kwargs)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_ros\task\ament_cmake\build.py", line 59, in build
rc = await extension.build(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_cmake\task\cmake\build.py", line 87, in build
rc = await self._reconfigure(args, env)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_cmake\task\cmake\build.py", line 174, in _reconfigure
completed = await run(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\task\__init__.py", line 177, in run
completed = await colcon_core_subprocess_run(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\subprocess.py", line 81, in run
rc, _, _ = await _async_check_call(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\subprocess.py", line 139, in _async_check_call
process = await create_subprocess(
File "asyncio\subprocess.py", line 236, in create_subprocess_exec
File "asyncio\base_events.py", line 1630, in subprocess_exec
File "asyncio\windows_events.py", line 385, in _make_subprocess_transport
File "asyncio\base_subprocess.py", line 36, in __init__
File "asyncio\windows_events.py", line 881, in _start
File "asyncio\windows_utils.py", line 153, in __init__
File "subprocess.py", line 854, in __init__
File "subprocess.py", line 1307, in _execute_child
PermissionError: [WinError 5] Zugriff verweigert
---
Failed <<< examples_rclcpp_minimal_timer [0.39s, exited with code 1]
--- stderr: examples_rclcpp_multithreaded_executor
Traceback (most recent call last):
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\executor\__init__.py", line 91, in __call__
rc = await self.task(*args, **kwargs)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\task\__init__.py", line 93, in __call__
return await task_method(*args, **kwargs)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_ros\task\ament_cmake\build.py", line 59, in build
rc = await extension.build(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_cmake\task\cmake\build.py", line 87, in build
rc = await self._reconfigure(args, env)
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_cmake\task\cmake\build.py", line 174, in _reconfigure
completed = await run(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\task\__init__.py", line 177, in run
completed = await colcon_core_subprocess_run(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\subprocess.py", line 81, in run
rc, _, _ = await _async_check_call(
File "c:\opt\ros\foxy\x64\lib\site-packages\colcon_core\subprocess.py", line 139, in _async_check_call
process = await create_subprocess(
File "asyncio\subprocess.py", line 236, in create_subprocess_exec
File "asyncio\base_events.py", line 1630, in subprocess_exec
File "asyncio\windows_events.py", line 385, in _make_subprocess_transport
File "asyncio\base_subprocess.py", line 36, in __init__
File "asyncio\windows_events.py", line 881, in _start
File "asyncio\windows_utils.py", line 153, in __init__
File "subprocess.py", line 854, in __init__
File "subprocess.py", line 1307, in _execute_child
PermissionError: [WinError 5] Zugriff verweigert
---
Failed <<< examples_rclcpp_multithreaded_executor [0.33s, exited with code 1]
Aborted <<< examples_rclpy_executors [1.16s]
Aborted <<< examples_rclpy_minimal_action_server [1.00s]
Aborted <<< examples_rclpy_minimal_action_client [1.08s]
Summary: 0 packages finished [2.03s]
9 packages failed: examples_rclcpp_minimal_action_client examples_rclcpp_minimal_action_server examples_rclcpp_minimal_client examples_rclcpp_minimal_composition examples_rclcpp_minimal_publisher examples_rclcpp_minimal_service examples_rclcpp_minimal_subscriber examples_rclcpp_minimal_timer examples_rclcpp_multithreaded_executor
3 packages aborted: examples_rclpy_executors examples_rclpy_minimal_action_client examples_rclpy_minimal_action_server
9 packages had stderr output: examples_rclcpp_minimal_action_client examples_rclcpp_minimal_action_server examples_rclcpp_minimal_client examples_rclcpp_minimal_composition examples_rclcpp_minimal_publisher examples_rclcpp_minimal_service examples_rclcpp_minimal_subscriber examples_rclcpp_minimal_timer examples_rclcpp_multithreaded_executor
4 packages not processed
[WinError 5] Zugriff verweigert
Does someone has any ideas on how to resolve this?