-
Notifications
You must be signed in to change notification settings - Fork 143
Description
As far as I understand, in the default configuration symlinking on Windows needs special privileges.
Here
ament_cmake/ament_cmake_python/cmake/ament_python_install_package.cmake
Lines 108 to 121 in 84e1cea
add_custom_target( | |
ament_cmake_python_symlink_${package_name} | |
COMMAND ${CMAKE_COMMAND} -E create_symlink | |
"${ARG_PACKAGE_DIR}" "${build_dir}/${package_name}" | |
) | |
if(ARG_SETUP_CFG) | |
add_custom_target( | |
ament_cmake_python_symlink_${package_name}_setup | |
COMMAND ${CMAKE_COMMAND} -E create_symlink | |
"${ARG_SETUP_CFG}" "${build_dir}/setup.cfg" | |
) | |
list(APPEND egg_dependencies ament_cmake_python_symlink_${package_name}_setup) | |
endif() |
the CMake tries to create some symlink which fails when building from an average user:
CUSTOMBUILD : CMake error : failed to create symbolic link 'C:/Users/robostack/miniforge3/conda-bld/ros_1626859624934/work/build/ament_cmake_python/smclib/smclib': A required privilege is not held by the client. [%SRC_DIR%\build\ament_cmake_python_symlink_smclib.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(238,5): error MSB8066: Custom build for '%SRC_DIR%\build\CMakeFiles\a56e20129da0512e4208cfc6816c1ca9\ament_cmake_python_symlink_smclib.rule' exited with code 1. [%SRC_DIR%\build\ament_cmake_python_symlink_smclib.vcxproj]
A "hard link" should be fine, though.
cc @ooeygui are you aware of other fixes?
Also PS: for the conda installation one doesn't need admin privileges, and it would be quite annoying to change that for symlinks :)
There is apparently a way to allow users to create symlinks: https://community.perforce.com/s/article/3472#:~:text=Create%20Symbolic%20Links%20Privilege&text=Open%20Control%20Panel%2D%3EAdministrative%20Tools,Administrators%20group%2C%20add%20the%20user.