summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2017-01-20 13:22:59 -0500
committerbecker33 <becker33@llnl.gov>2017-01-20 10:22:59 -0800
commitcade0181fd0d1d0dfe018bb848bbd0f309e5c825 (patch)
tree1a899c394bdf573d84c961c161e725aa4f50f031
parentbc37a1012c3deeb69f06a395d2e4fcad06546a25 (diff)
downloadspack-cade0181fd0d1d0dfe018bb848bbd0f309e5c825.tar.gz
spack-cade0181fd0d1d0dfe018bb848bbd0f309e5c825.tar.bz2
spack-cade0181fd0d1d0dfe018bb848bbd0f309e5c825.tar.xz
spack-cade0181fd0d1d0dfe018bb848bbd0f309e5c825.zip
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.
-rw-r--r--lib/spack/llnl/util/filesystem.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py
index 31e09f2fe6..79f15f9a21 100644
--- a/lib/spack/llnl/util/filesystem.py
+++ b/lib/spack/llnl/util/filesystem.py
@@ -455,7 +455,12 @@ def fix_darwin_install_name(path):
# fix all dependencies:
for dep in deps:
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(
["install_name_tool", "-change", dep, loc, lib],
stdout=subprocess.PIPE).communicate()[0]