question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Symlink stage may fail when binary files collide

See original GitHub issue

System 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:open
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
mantkiewcommented, Oct 10, 2017

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.

add_executable(interpolation
...omitted...
)

(there was the same executable target called “interpolation” in another package).

Catkin should definitely issue a warning about duplicate executable files.

3reactions
mantkiewcommented, Feb 8, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found