Skip to content
Snippets Groups Projects
Commit cade0181 authored by Erik Schnetter's avatar Erik Schnetter Committed by becker33
Browse files

Spack: Correct fix_darwin_install_name (#2886)

Previously, fix_darwin_install_name would only handle dependencies that have no path set, and it ignore dependencies that have the build directory as path baked in. Catch this, and replace it by the install directory.
parent bc37a101
Branches
Tags
No related merge requests found
...@@ -455,7 +455,12 @@ def fix_darwin_install_name(path): ...@@ -455,7 +455,12 @@ def fix_darwin_install_name(path):
# fix all dependencies: # fix all dependencies:
for dep in deps: for dep in deps:
for loc in libs: for loc in libs:
if dep == os.path.basename(loc): # We really want to check for either
# dep == os.path.basename(loc) or
# dep == join_path(builddir, os.path.basename(loc)),
# but we don't know builddir (nor how symbolic links look
# in builddir). We thus only compare the basenames.
if os.path.basename(dep) == os.path.basename(loc):
subprocess.Popen( subprocess.Popen(
["install_name_tool", "-change", dep, loc, lib], ["install_name_tool", "-change", dep, loc, lib],
stdout=subprocess.PIPE).communicate()[0] stdout=subprocess.PIPE).communicate()[0]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment