Skip to content

Commit

Permalink
Fix issue install step tries to delete rpath multiple times (MacOS AR…
Browse files Browse the repository at this point in the history
…M64) (#532)

### Fix issue where it tries to delete rpath multiple times

### Linked issues
n/a

### Summarize your change.
Fix an issue during the install step where it tries to delete a RPATH
multiple time due to a universal library.
Keep a list of deleted rpath for a specific file and do not delete the
same RPATH multiple time.

### Describe the reason for the change.
Install step was failing on MacOS ARM64

### Describe what you have tested and on which operating system.
- [x] MacOS ARM64

### Add a list of changes, and note any that might need special
attention during the review.

### If possible, provide screenshots.

Signed-off-by: Cédrik Fuoco <[email protected]>
  • Loading branch information
cedrik-fuoco-adsk authored Aug 9, 2024
1 parent 2880daf commit 9a698e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/build/remove_absolute_rpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,14 @@ def fix_rpath(target, root):
logging.info(f"Skipping {file} because numpy")
return

# Prevent delete the same rpath multiple time (e.g. MacOS fat binary).
deletedRPATH = []
for rpath in get_rpaths(file):
output = f"\trpath: {rpath}"

if rpath.startswith("@") is False and rpath.startswith(".") is False:
if rpath.startswith("@") is False and rpath.startswith(".") is False and not rpath in deletedRPATH:
delete_rpath(file, rpath)
deletedRPATH.append(rpath)
output += " (Deleted)"

logging.info(output)
Expand Down

0 comments on commit 9a698e8

Please sign in to comment.