summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Ciurej <ciurej1@llnl.gov>2016-05-25 12:27:52 -0700
committerJoseph Ciurej <ciurej1@llnl.gov>2016-05-25 12:27:52 -0700
commit734fb459a45896ee41881ca906643bd362be3e37 (patch)
treed088731b7c2e91718541e1a978e87577825ffd1b
parent483ec0d76275521579b2d1c93620a37841159e36 (diff)
downloadspack-734fb459a45896ee41881ca906643bd362be3e37.tar.gz
spack-734fb459a45896ee41881ca906643bd362be3e37.tar.bz2
spack-734fb459a45896ee41881ca906643bd362be3e37.tar.xz
spack-734fb459a45896ee41881ca906643bd362be3e37.zip
Fixing a small bug with metis@4+shared installs on the Mac platform.
-rw-r--r--var/spack/repos/builtin/packages/metis/package.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py
index 5ccc04bd5e..c4f2afaff2 100644
--- a/var/spack/repos/builtin/packages/metis/package.py
+++ b/var/spack/repos/builtin/packages/metis/package.py
@@ -94,17 +94,19 @@ class Metis(Package):
install(sharefile, prefix.share)
if '+shared' in spec:
+ shared_flags = ['-fPIC', '-shared']
if sys.platform == 'darwin':
- lib_dsuffix = 'dylib'
- load_flag = '-Wl,-all_load'
- no_load_flag = ''
+ shared_suffix = 'dylib'
+ shared_flags.extend(['-Wl,-all_load', 'libmetis.a'])
else:
- lib_dsuffix = 'so'
- load_flag = '-Wl,-whole-archive'
- no_load_flag = '-Wl,-no-whole-archive'
+ shared_suffix = 'so'
+ shared_flags.extend(['-Wl,-whole-archive', 'libmetis.a',
+ '-Wl,-no-whole-archive'])
- ccompile('-fPIC', '-shared', load_flag, 'libmetis.a', no_load_flag,
- '-o', '%s/libmetis.%s' % (prefix.lib, lib_dsuffix))
+ shared_out = '%s/libmetis.%s' % (prefix.lib, shared_suffix)
+ shared_flags.extend(['-o', shared_out])
+
+ ccompile(*shared_flags)
# Set up and run tests on installation
ccompile('-I%s' % prefix.include, '-L%s' % prefix.lib,
@@ -128,7 +130,7 @@ class Metis(Package):
os.system('%s %s 10' % (test_bin('partdmesh'), graph))
os.system('%s %s' % (test_bin('mesh2dual'), graph))
- # TODO: The following code should replace the testing code in the
+ # FIXME: The following code should replace the testing code in the
# block above since it causes installs to fail when one or more of the
# Metis tests fail, but it currently doesn't work because the 'mtest',
# 'onmetis', and 'partnmesh' tests return error codes that trigger