Closed sighingnow closed 2 years ago
You can submit a PR and I'll review it. You'll need to write a test for this.
The install names are kept as-is since the exact names are used to modify the libraries which depend on their required libraries by using those install names. If you call realpath
on them then that information is lost and they can no longer be edited to point to the copied library.
It might be better to edit _analyze_tree_libs
and skip the exception when duplicate required
paths point to the same library.
Looking at it again, the required
part could be the realpath since that isn't the part containing the install name. So it's likely that a call to realpath
is missing somewhere in the code near where you originally suggested.
Looking at it again, the
required
part could be the realpath since that isn't the part containing the install name. So it's likely that a call torealpath
is missing somewhere in the code near where you originally suggested.
Thanks for the quick analysis. I will submit the PR later.
Hi @HexDecimal, I have submitted a PR in #134, with a minimal test case to reproduce the bug.
Fixed by #134.
Describe the bug
Hi @matthew-brett,
It seems that
delocate
cannot process brew-installed libraries correct, e.g., if we have two binary target in a wheel package, one of it links to/usr/local/lib/libabsl_status.2103.0.1.dylib
and another links to/usr/local/Cellar/abseil/20210324.2_1/lib/libabsl_status.2103.0.1.dylib
,delocate
will raise exception:However they are exactly the same library, as the former is just a soft link of the alter. The same issue happens to other libraries that are installed using
brew
too. I'm wondering is there any reason that we don't use therealpath
of libraries in_tree_libs_from_libraries
?It if is ok to fix that I would like to submit a pull request.
To Reproduce
See the full log in https://pipelines.actions.githubusercontent.com/gy2OJWVp8kQU2Am4QAuhjA1IN6fEAQVuP8lbcuQFN2B1NgOLpQ/_apis/pipelines/1/runs/11189/signedlogcontent/2?urlExpires=2021-11-16T05%3A28%3A27.4207285Z&urlSigningMethod=HMACV1&urlSignature=m9fbjkcv2VGzyKSyCYst2qN8r7dxgNA90%2BGF88vCy6M%3D
Expected behavior
The softlink should be resolved before copying libraries.
Platform (please complete the following information):
Additional context Add any other context about the problem here.