Closed VinHub-Gitcent closed 11 months ago
Hi there, I have not seen this specific issue before. I suspect that this may be blocked by a virus scanner?
Hi thank you for your reply. I think the virus scanner is not interfering here.
I wonder if the Warning:
WARNING The path 'C:\opt\ros\foxy\x64\tools\vcpkg\installed\x64-windows' in the environment variable CMAKE_PREFIX_PATH doesn't exist
should occur here.
This is what I got from the colcon log file, maybe this helps.
[0.572s] [34mcolcon[0m [1;30mDEBUG[0m [32mCommand line arguments: ['c:\\opt\\ros\\foxy\\x64\\Scripts\\colcon', 'build', '--merge-install', '--event-handlers', 'console_direct+'][0m
[0.572s] [34mcolcon[0m [1;30mDEBUG[0m [32mParsed command line arguments: Namespace(ament_cmake_args=None, base_paths=['.'], build_base='build', catkin_cmake_args=None, catkin_skip_building_tests=False, cmake_args=None, cmake_clean_cache=False, cmake_clean_first=False, cmake_force_configure=False, cmake_target=None, cmake_target_skip_unavailable=False, continue_on_error=False, event_handlers=['console_direct+'], executor='parallel', ignore_user_meta=False, install_base='install', log_base=None, log_level=None, main=<bound method BuildVerb.main of <colcon_core.verb.build.BuildVerb object at 0x000000000406D1C0>>, merge_install=True, metas=['./colcon.meta'], packages_above=None, packages_above_and_dependencies=None, packages_above_depth=None, packages_end=None, packages_ignore=None, packages_ignore_regex=None, packages_select=None, packages_select_build_failed=False, packages_select_by_dep=None, packages_select_regex=None, packages_select_test_failures=False, packages_skip=None, packages_skip_build_finished=False, packages_skip_by_dep=None, packages_skip_regex=None, packages_skip_test_passed=False, packages_skip_up_to=None, packages_start=None, packages_up_to=None, packages_up_to_regex=None, parallel_workers=12, paths=None, symlink_install=False, test_result_base=None, verb_extension=<colcon_core.verb.build.BuildVerb object at 0x000000000406D1C0>, verb_name='build', verb_parser=<colcon_defaults.argument_parser.defaults.DefaultArgumentsDecorator object at 0x000000000406D670>)[0m
[0.625s] [34mcolcon.colcon_core.package_discovery[0m [1;30mLevel 1[0m discover_packages(colcon_meta) check parameters
[0.625s] [34mcolcon.colcon_core.package_discovery[0m [1;30mLevel 1[0m discover_packages(recursive) check parameters
[0.625s] [34mcolcon.colcon_core.package_discovery[0m [1;30mLevel 1[0m discover_packages(ignore) check parameters
[0.625s] [34mcolcon.colcon_core.package_discovery[0m [1;30mLevel 1[0m discover_packages(path) check parameters
[0.625s] [34mcolcon.colcon_core.package_discovery[0m [1;30mLevel 1[0m discover_packages(colcon_meta) discover
[0.625s] [34mcolcon.colcon_core.package_discovery[0m [1;30mLevel 1[0m discover_packages(recursive) discover
[0.625s] [34mcolcon.colcon_core.package_discovery[0m [1;30mINFO[0m Crawling recursively for packages in 'C:\dev\ros2_ws'
[0.625s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(.) by extensions ['ignore', 'ignore_ament_install']
[0.625s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(.) by extension 'ignore'
[0.625s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(.) by extension 'ignore_ament_install'
[0.625s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(.) by extensions ['colcon_pkg']
[0.625s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(.) by extension 'colcon_pkg'
[0.625s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(.) by extensions ['colcon_meta']
[0.625s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(.) by extension 'colcon_meta'
[0.625s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(.) by extensions ['ros']
[0.625s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(.) by extension 'ros'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(.) by extensions ['cmake', 'python']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(.) by extension 'cmake'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(.) by extension 'python'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(.) by extensions ['python_setup_py']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(.) by extension 'python_setup_py'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(build) by extensions ['ignore', 'ignore_ament_install']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(build) by extension 'ignore'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(build) ignored
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(install) by extensions ['ignore', 'ignore_ament_install']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(install) by extension 'ignore'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(install) ignored
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(log) by extensions ['ignore', 'ignore_ament_install']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(log) by extension 'ignore'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(log) ignored
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src) by extensions ['ignore', 'ignore_ament_install']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src) by extension 'ignore'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src) by extension 'ignore_ament_install'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src) by extensions ['colcon_pkg']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src) by extension 'colcon_pkg'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src) by extensions ['colcon_meta']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src) by extension 'colcon_meta'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src) by extensions ['ros']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src) by extension 'ros'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src) by extensions ['cmake', 'python']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src) by extension 'cmake'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src) by extension 'python'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src) by extensions ['python_setup_py']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src) by extension 'python_setup_py'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials) by extensions ['ignore', 'ignore_ament_install']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials) by extension 'ignore'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials) by extension 'ignore_ament_install'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials) by extensions ['colcon_pkg']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials) by extension 'colcon_pkg'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials) by extensions ['colcon_meta']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials) by extension 'colcon_meta'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials) by extensions ['ros']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials) by extension 'ros'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials) by extensions ['cmake', 'python']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials) by extension 'cmake'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials) by extension 'python'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials) by extensions ['python_setup_py']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials) by extension 'python_setup_py'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials\ros_tutorials) by extensions ['ignore', 'ignore_ament_install']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials\ros_tutorials) by extension 'ignore'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials\ros_tutorials) ignored
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials\roscpp_tutorials) by extensions ['ignore', 'ignore_ament_install']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials\roscpp_tutorials) by extension 'ignore'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials\roscpp_tutorials) ignored
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials\rospy_tutorials) by extensions ['ignore', 'ignore_ament_install']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials\rospy_tutorials) by extension 'ignore'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials\rospy_tutorials) ignored
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials\turtlesim) by extensions ['ignore', 'ignore_ament_install']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials\turtlesim) by extension 'ignore'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials\turtlesim) by extension 'ignore_ament_install'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials\turtlesim) by extensions ['colcon_pkg']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials\turtlesim) by extension 'colcon_pkg'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials\turtlesim) by extensions ['colcon_meta']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials\turtlesim) by extension 'colcon_meta'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials\turtlesim) by extensions ['ros']
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mLevel 1[0m _identify(src\ros_tutorials\turtlesim) by extension 'ros'
[0.640s] [34mcolcon.colcon_core.package_identification[0m [1;30mDEBUG[0m [32mPackage 'src\ros_tutorials\turtlesim' with type 'ros.ament_cmake' and name 'turtlesim'[0m
[0.640s] [34mcolcon.colcon_core.package_discovery[0m [1;30mLevel 1[0m discover_packages(recursive) using defaults
[0.640s] [34mcolcon.colcon_core.package_discovery[0m [1;30mLevel 1[0m discover_packages(ignore) discover
[0.640s] [34mcolcon.colcon_core.package_discovery[0m [1;30mLevel 1[0m discover_packages(ignore) using defaults
[0.640s] [34mcolcon.colcon_core.package_discovery[0m [1;30mLevel 1[0m discover_packages(path) discover
[0.640s] [34mcolcon.colcon_core.package_discovery[0m [1;30mLevel 1[0m discover_packages(path) using defaults
[0.672s] [34mcolcon.colcon_core.verb[0m [1;30mLevel 5[0m set package 'turtlesim' build argument 'cmake_args' from command line to 'None'
[0.672s] [34mcolcon.colcon_core.verb[0m [1;30mLevel 5[0m set package 'turtlesim' build argument 'cmake_target' from command line to 'None'
[0.672s] [34mcolcon.colcon_core.verb[0m [1;30mLevel 5[0m set package 'turtlesim' build argument 'cmake_target_skip_unavailable' from command line to 'False'
[0.672s] [34mcolcon.colcon_core.verb[0m [1;30mLevel 5[0m set package 'turtlesim' build argument 'cmake_clean_cache' from command line to 'False'
[0.672s] [34mcolcon.colcon_core.verb[0m [1;30mLevel 5[0m set package 'turtlesim' build argument 'cmake_clean_first' from command line to 'False'
[0.672s] [34mcolcon.colcon_core.verb[0m [1;30mLevel 5[0m set package 'turtlesim' build argument 'cmake_force_configure' from command line to 'False'
[0.672s] [34mcolcon.colcon_core.verb[0m [1;30mLevel 5[0m set package 'turtlesim' build argument 'ament_cmake_args' from command line to 'None'
[0.672s] [34mcolcon.colcon_core.verb[0m [1;30mLevel 5[0m set package 'turtlesim' build argument 'catkin_cmake_args' from command line to 'None'
[0.672s] [34mcolcon.colcon_core.verb[0m [1;30mLevel 5[0m set package 'turtlesim' build argument 'catkin_skip_building_tests' from command line to 'False'
[0.672s] [34mcolcon.colcon_core.verb[0m [1;30mDEBUG[0m [32mBuilding package 'turtlesim' with the following arguments: {'ament_cmake_args': None, 'build_base': 'C:\\dev\\ros2_ws\\build\\turtlesim', 'catkin_cmake_args': None, 'catkin_skip_building_tests': False, 'cmake_args': None, 'cmake_clean_cache': False, 'cmake_clean_first': False, 'cmake_force_configure': False, 'cmake_target': None, 'cmake_target_skip_unavailable': False, 'install_base': 'C:\\dev\\ros2_ws\\install', 'merge_install': True, 'path': 'C:\\dev\\ros2_ws\\src\\ros_tutorials\\turtlesim', 'symlink_install': False, 'test_result_base': None}[0m
[0.672s] [34mcolcon.colcon_core.executor[0m [1;30mINFO[0m Executing jobs using 'parallel' executor
[0.687s] [34mcolcon.colcon_parallel_executor.executor.parallel[0m [1;30mDEBUG[0m [32mrun_until_complete[0m
[0.687s] [34mcolcon.colcon_ros.task.ament_cmake.build[0m [1;30mINFO[0m Building ROS package in 'C:\dev\ros2_ws\src\ros_tutorials\turtlesim' with build type 'ament_cmake'
[0.687s] [34mcolcon.colcon_cmake.task.cmake.build[0m [1;30mINFO[0m Building CMake package in 'C:\dev\ros2_ws\src\ros_tutorials\turtlesim'
[0.687s] [34mcolcon.colcon_core.plugin_system[0m [1;30mINFO[0m Skipping extension 'colcon_core.shell.sh': Not used on Windows systems
[0.687s] [34mcolcon.colcon_core.shell[0m [1;30mINFO[0m Skip shell extension 'powershell' for command environment: Not usable outside of PowerShell
[0.687s] [34mcolcon.colcon_ros.prefix_path.catkin[0m [1;30mWARNING[0m [33mThe path 'C:\opt\ros\foxy\x64\tools\vcpkg\installed\x64-windows' in the environment variable CMAKE_PREFIX_PATH doesn't exist[0m
[0.787s] [34mcolcon.colcon_core.event_handler.log_command[0m [1;30mDEBUG[0m [32mInvoking command in 'C:\dev\ros2_ws\build\turtlesim': C:\Program Files\CMake\bin C:\dev\ros2_ws\src\ros_tutorials\turtlesim -DCMAKE_INSTALL_PREFIX=C:\dev\ros2_ws\install -G Visual Studio 16 2019[0m
[0.803s] [34mcolcon.colcon_parallel_executor.executor.parallel[0m [1;30mDEBUG[0m [32mrun_until_complete finished with '[WinError 5] Access is denied'[0m
[0.803s] [34mcolcon.colcon_core.event_reactor[0m [1;30mDEBUG[0m [32mjoining thread[0m
[0.809s] [34mcolcon.colcon_core.plugin_system[0m [1;30mINFO[0m Skipping extension 'colcon_notification.desktop_notification.notify2': 'notify2' not found
[0.809s] [34mcolcon.colcon_core.plugin_system[0m [1;30mINFO[0m Skipping extension 'colcon_notification.desktop_notification.notify_send': Not used on non-Linux systems
[0.809s] [34mcolcon.colcon_core.plugin_system[0m [1;30mINFO[0m Skipping extension 'colcon_notification.desktop_notification.terminal_notifier': Not used on non-Darwin systems
[0.809s] [34mcolcon.colcon_notification.desktop_notification[0m [1;30mINFO[0m Sending desktop notification using 'win32'
[5.869s] [34mcolcon.colcon_core.event_reactor[0m [1;30mDEBUG[0m [32mjoined thread[0m
[5.869s] [34mcolcon.colcon_core.shell[0m [1;30mINFO[0m Creating prefix script 'C:\dev\ros2_ws\install\local_setup.ps1'
[5.869s] [34mcolcon.colcon_core.shell[0m [1;30mINFO[0m Creating prefix util module 'C:\dev\ros2_ws\install\_local_setup_util_ps1.py'
[5.884s] [34mcolcon.colcon_core.shell[0m [1;30mINFO[0m Creating prefix chain script 'C:\dev\ros2_ws\install\setup.ps1'
[5.884s] [34mcolcon.colcon_core.shell[0m [1;30mINFO[0m Creating prefix script 'C:\dev\ros2_ws\install\local_setup.bat'
[5.884s] [34mcolcon.colcon_core.shell[0m [1;30mINFO[0m Creating prefix util module 'C:\dev\ros2_ws\install\_local_setup_util_bat.py'
[5.884s] [34mcolcon.colcon_core.shell[0m [1;30mINFO[0m Creating prefix chain script 'C:\dev\ros2_ws\install\setup.bat'
What are your thoughts on this?
Thanks for the log. The warning is a red-herring. We preemptively put that in the path, in case a rosdep needs to use vcpkg. If you create that directory, the warning will go away. (We should have done that in setup, but it was broken at some point)
This line is suspect C:\Program Files\CMake\bin C:\dev\ros2_ws\src\ros_tutorials\turtlesim -DCMAKE_INSTALL_PREFIX=C:\dev\ros2_ws\install -G Visual Studio 16 2019
It looks like it is missing cmake.exe - it should be: `C:\Program Files\CMake\bin\cmake.exe C:\dev\ros2_ws\src\ros_tutorials\turtlesim -DCMAKE_INSTALL_PREFIX=C:\dev\ros2_ws\install -G Visual Studio 16 2019
I won't ask you to post the environment as it includes sensitive info.
However, I would have expected it to use the one deployed in c:\opt\ros\foxy\x64\cmake.exe
.
Perhaps you have an environment overriding it?
Thanks for your reply. I had an existing installation of CMAKE on my system. After uninstalling it and removing from PATH the colcon command works as intended. I still don't get why using another functional installation of Cmake crashes colcon, but the issue can be considered closed I think.
I wonder how I can have a second version of Cmake installed without it interfering with the colcon command of foxy. Maybe you can give me some idea for that.
Thanks again and best regards.
Thank you for closing the loop. I suspect that between versions of cmake the environment variable that's used to locate it changed behaviors? Or on Windows the environment variable behaves differently than on linux?
I'm glad it is working.
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:
This is a really basic operation and should run out of the box when following the installation guide from: https://ms-iot.github.io/ROSOnWindows/GettingStarted/SetupRos2.html
Does Anyone has an idea why this error occures?