Symlink stage may fail when binary files collide
See original GitHub issueSystem Info
- Operating System: ubuntu 14.04.5
- Python Version: 2.7.6
- Version of catkin_tools: 0.4.4
- ROS Distro: indigo
Build / Run Issue
- Works with
catkin_make
- Works with
catkin_make_isolated --merge
- Works with
catkin build
- Works with
catkin build -p1
Expected Behavior
catkin tools should emit a warning when a binary path needs to be symlinked from two different locations.
Actual Behavior
In the symlink stage, the code that checks if a symlink already exists will take an MD5 hash of colliding files. In the process of reading the file, it decodes the file and throws an exception the first time in encounters a non-ascii byte sequence. Here’s an example stacktrace.
Steps to Reproduce the Issue
Inspect this piece of code.
Create two packages that produce a .so
with the same name, then run catkin build.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
git clone error under Windows with symlinks - Stack Overflow
1 Answer 1 · You can ask the maintainer of that repository to remove one of the duplicate files, renaming it; · If...
Read more >Output Directory Layout - Bazel
Bazel must be invoked from a directory containing a WORKSPACE file (the "workspace directory"), or a subdirectory thereof. It reports an error if...
Read more >Arbitrary File Creation/Overwrite via insufficient symlink ...
Collisions related to use of 8.3 short names to replace directories with other (non-symlink) types of entries may make archives fail to extract...
Read more >Why have symbolic links between files in folders at same depth?
The most common reason is "canonical-ize" the original file/binary. This could mean placing binaries in ...
Read more >[RFC PATCH 0/5] Improve path collision conflict resolutions
The code handling the different types of conflicts appear to have been written with different assumptions about whether the colliding files would be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I hit this issue recently and spent many hours trying to solve it. Finally, finding this issue, I commented out a fragment of CMakeFiles for an executable target that had the same name as an executable from another package we had, which solved the issue.
(there was the same executable target called “interpolation” in another package).
Catkin should definitely issue a warning about duplicate executable files.
I think these issues happen when you have targets with the same name from different packages which end up in the same location. I cannot give the specific CMakeFile as it’s internal but the tools should just double check that no target name conflicts arise.