Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[noetic-devel][Windows] Fix file COPY cannot read symlink #1109

Merged
merged 2 commits into from
Jul 23, 2020

Conversation

seanyen
Copy link
Contributor

@seanyen seanyen commented Jul 22, 2020

A recent change from #1100 introduced an usage of file(COPY) and unfortunately this idiom has some limitation on Windows. For example, CMake doesn't support the case where the source file is a symlink, due to the absent of ReadSymlink implementation on Windows.

And when the conditions are met, it will render as errors like below:

-- rospy_tutorials: 2 messages, 2 services
CMake Error at C:/opt/ros/melodic/x64/share/catkin/cmake/catkin_install_python.cmake:45 (file):
  file COPY cannot read symlink
  "C:/workspace/rospy_ws/src/ros_tutorials/rospy_tutorials/001_talker_listener/listener"
  to duplicate at
  "C:/workspace/rospy_ws/build_isolated/rospy_tutorials/catkin_generated/installspace/listener":
  No error.
Call Stack (most recent call first):
  CMakeLists.txt:14 (catkin_install_python)

This pull request is to make the file copying conditional and unblock any build breaks due to the limitation. And please consider to back-port to kinetic-devel as well.

@dirk-thomas
Copy link
Member

Thanks for the patch and the quick response.

@dirk-thomas dirk-thomas merged commit 30adb35 into ros:noetic-devel Jul 23, 2020
dirk-thomas added a commit that referenced this pull request Jul 24, 2020
* conditionally file copying on Windows.

* fix condition

Co-authored-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
@dirk-thomas
Copy link
Member

Cherry-picked to kinetic-devel in 232339e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants