Skip to content
Snippets Groups Projects
Commit c7608890 authored by Denis Davydov's avatar Denis Davydov Committed by Todd Gamblin
Browse files

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
parent a8e1d788
No related branches found
No related tags found
No related merge requests found
...@@ -87,7 +87,11 @@ def install(self, spec, prefix): ...@@ -87,7 +87,11 @@ def install(self, spec, prefix):
'-DOCE_OSX_USE_COCOA:BOOL=ON', '-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) cmake('.', *options)
make("install/strip") make("install/strip")
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
from spack import * from spack import *
import os import os
import sys import sys
import platform
# Trilinos is complicated to build, as an inspiration a couple of links to # Trilinos is complicated to build, as an inspiration a couple of links to
# other repositories which build it: # other repositories which build it:
...@@ -171,10 +172,15 @@ def cmake_args(self): ...@@ -171,10 +172,15 @@ def cmake_args(self):
'-DLAPACK_LIBRARY_DIRS=%s' % ';'.join(lapack.directories), '-DLAPACK_LIBRARY_DIRS=%s' % ';'.join(lapack.directories),
'-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON',
'-DTrilinos_ENABLE_CXX11:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON',
'-DTPL_ENABLE_Netcdf:BOOL=ON', '-DTPL_ENABLE_Netcdf:BOOL=ON'
'-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % self.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)
# Force Trilinos to use the MPI wrappers instead of raw compilers # Force Trilinos to use the MPI wrappers instead of raw compilers
# this is needed on Apple systems that require full resolution of # this is needed on Apple systems that require full resolution of
# all symbols when linking shared libraries # all symbols when linking shared libraries
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment