summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Davydov <davydden@gmail.com>2017-01-23 22:59:16 +0100
committerTodd Gamblin <tgamblin@llnl.gov>2017-01-23 13:59:16 -0800
commitc76088906e91af11a343decb5ae532be1d48d896 (patch)
treec1e0ba0ab90153fa5a3d553d700148b7a6b456b7
parenta8e1d78881ce09f3c3d3a22b84dca4a0630d49e5 (diff)
downloadspack-c76088906e91af11a343decb5ae532be1d48d896.tar.gz
spack-c76088906e91af11a343decb5ae532be1d48d896.tar.bz2
spack-c76088906e91af11a343decb5ae532be1d48d896.tar.xz
spack-c76088906e91af11a343decb5ae532be1d48d896.zip
oce & trilinos: force rpath on Sierra to avoid issues with load commands size (#2855)
* oce: force rpath on Sierra to avoid issues with load commands size * trilinos: use rpath on Sierra to avoid load commands limit
-rw-r--r--var/spack/repos/builtin/packages/oce/package.py6
-rw-r--r--var/spack/repos/builtin/packages/trilinos/package.py10
2 files changed, 13 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/oce/package.py b/var/spack/repos/builtin/packages/oce/package.py
index 36b58269f1..950621da40 100644
--- a/var/spack/repos/builtin/packages/oce/package.py
+++ b/var/spack/repos/builtin/packages/oce/package.py
@@ -87,7 +87,11 @@ class Oce(Package):
'-DOCE_OSX_USE_COCOA:BOOL=ON',
])
- options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix)
+ if '.'.join(platform.mac_ver()[0].split('.')[:2]) == '10.12':
+ # use @rpath on Sierra due to limit of dynamic loader
+ options.append('-DCMAKE_MACOSX_RPATH=ON')
+ else:
+ options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix)
cmake('.', *options)
make("install/strip")
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py
index aed722814b..5f8c2debb0 100644
--- a/var/spack/repos/builtin/packages/trilinos/package.py
+++ b/var/spack/repos/builtin/packages/trilinos/package.py
@@ -25,6 +25,7 @@
from spack import *
import os
import sys
+import platform
# Trilinos is complicated to build, as an inspiration a couple of links to
# other repositories which build it:
@@ -171,10 +172,15 @@ class Trilinos(CMakePackage):
'-DLAPACK_LIBRARY_DIRS=%s' % ';'.join(lapack.directories),
'-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON',
'-DTrilinos_ENABLE_CXX11:BOOL=ON',
- '-DTPL_ENABLE_Netcdf:BOOL=ON',
- '-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % self.prefix
+ '-DTPL_ENABLE_Netcdf:BOOL=ON'
])
+ if '.'.join(platform.mac_ver()[0].split('.')[:2]) == '10.12':
+ # use @rpath on Sierra due to limit of dynamic loader
+ options.append('-DCMAKE_MACOSX_RPATH=ON')
+ else:
+ options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix)
+
# Force Trilinos to use the MPI wrappers instead of raw compilers
# this is needed on Apple systems that require full resolution of
# all symbols when linking shared libraries