diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-10-06 15:57:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-06 15:57:23 -0700 |
commit | dbc864c9db38a363a68c6a140d957a2b24a7a2ff (patch) | |
tree | 863a156ca98e3513a575b022b09d5e3dc860ab86 | |
parent | 9683e0df07301da408c15a2655c2a1e283b1b06c (diff) | |
download | spack-dbc864c9db38a363a68c6a140d957a2b24a7a2ff.tar.gz spack-dbc864c9db38a363a68c6a140d957a2b24a7a2ff.tar.bz2 spack-dbc864c9db38a363a68c6a140d957a2b24a7a2ff.tar.xz spack-dbc864c9db38a363a68c6a140d957a2b24a7a2ff.zip |
Restore default RPATH settings but allow packages to limit to immediate deps. (#1954)
- Some packages (netcdf) NEED RPATHs for transitive deps.
- Others (dealii) will exceed OS limits when the DAG is too large.
-rw-r--r-- | lib/spack/spack/build_environment.py | 7 | ||||
-rw-r--r-- | lib/spack/spack/package.py | 9 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/dealii/package.py | 4 |
3 files changed, 18 insertions, 2 deletions
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index cc5cfc6b39..3f2939609d 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -383,8 +383,11 @@ def set_module_variables_for_package(pkg, module): def get_rpath_deps(pkg): - """We only need to RPATH immediate dependencies.""" - return pkg.spec.dependencies(deptype='link') + """Return immediate or transitive RPATHs depending on the package.""" + if pkg.transitive_rpaths: + return [d for d in pkg.spec.traverse(root=False, deptype=('link'))] + else: + return pkg.spec.dependencies(deptype='link') def get_rpaths(pkg): diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 23ae8bd98f..aa874bf508 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -310,17 +310,26 @@ class Package(object): # """By default we build in parallel. Subclasses can override this.""" parallel = True + """# jobs to use for parallel make. If set, overrides default of ncpus.""" make_jobs = None + """By default do not run tests within package's install()""" run_tests = False + """Most packages are NOT extendable. Set to True if you want extensions.""" extendable = False + + """When True, add RPATHs for the entire DAG. When False, add RPATHs only + for immediate dependencies.""" + transitive_rpaths = True + """List of prefix-relative file paths (or a single path). If these do not exist after install, or if they exist but are not files, sanity checks fail. """ sanity_check_is_file = [] + """List of prefix-relative directory paths (or a single path). If these do not exist after install, or if they exist but are not directories, sanity checks will fail. diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 0d293e5d92..1dee94bfff 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -32,6 +32,10 @@ class Dealii(Package): homepage = "https://www.dealii.org" url = "https://github.com/dealii/dealii/releases/download/v8.4.1/dealii-8.4.1.tar.gz" + # Don't add RPATHs to this package for the full build DAG. + # only add for immediate deps. + transitive_rpaths = False + version('8.4.2', '84c6bd3f250d3e0681b645d24cb987a7') version('8.4.1', 'efbaf16f9ad59cfccad62302f36c3c1d') version('8.4.0', 'ac5dbf676096ff61e092ce98c80c2b00') |