diff options
author | Denis Davydov <davydden@gmail.com> | 2016-09-22 22:47:22 +0200 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-09-22 13:47:22 -0700 |
commit | 462a4a1353bfcf68e75036d322bd3b668d2b8756 (patch) | |
tree | f0988383c2fee4862a377a94ca8fea7e20ed19ff /var | |
parent | a638b62ab14117b3d8339f766eb673147ec85be8 (diff) | |
download | spack-462a4a1353bfcf68e75036d322bd3b668d2b8756.tar.gz spack-462a4a1353bfcf68e75036d322bd3b668d2b8756.tar.bz2 spack-462a4a1353bfcf68e75036d322bd3b668d2b8756.tar.xz spack-462a4a1353bfcf68e75036d322bd3b668d2b8756.zip |
boost: fix a bug which broke it on macOS with clang+gfortran (#1816)
* dealii: add missing python dependency
* boost: fix a bug which broke it on macOS with clang+gfortran
Boost was using gcc compiler instead of clang++, which lead to
cryptic Undefined symbols linking errors for boost::python::objects::function_object()
when building other packages against boost+python.
* boost: add exceptions for intel
* boost: use spack_cxx
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/boost/package.py | 22 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/dealii/package.py | 1 |
2 files changed, 19 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 0d4ccc7ea3..2b78dbd858 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -138,15 +138,13 @@ class Boost(Package): def determine_toolset(self, spec): if spec.satisfies("platform=darwin"): return 'darwin' - else: - platform = 'linux' toolsets = {'g++': 'gcc', 'icpc': 'intel', 'clang++': 'clang'} if spec.satisfies('@1.47:'): - toolsets['icpc'] += '-' + platform + toolsets['icpc'] += '-linux' for cc, toolset in toolsets.iteritems(): if cc in self.compiler.cxx_names: return toolset @@ -164,6 +162,16 @@ class Boost(Package): join_path(spec['python'].prefix.bin, 'python')) with open('user-config.jam', 'w') as f: + # Boost may end up using gcc even though clang+gfortran is set in + # compilers.yaml. Make sure this does not happen: + if not spec.satisfies('%intel'): + # using intel-linux : : spack_cxx in user-config.jam leads to + # error: at project-config.jam:12 + # error: duplicate initialization of intel-linux with the following parameters: # noqa + # error: version = <unspecified> + # error: previous initialization at ./user-config.jam:1 + f.write("using {0} : : {1} ;\n".format(boostToolsetId, + spack_cxx)) if '+mpi' in spec: f.write('using mpi : %s ;\n' % @@ -204,7 +212,13 @@ class Boost(Package): options.extend([ 'link=%s' % ','.join(linkTypes), - '--layout=tagged']) + '--layout=tagged' + ]) + + if not spec.satisfies('%intel'): + options.extend([ + 'toolset=%s' % self.determine_toolset(spec) + ]) return threadingOpts diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 89732f98b8..0d293e5d92 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -104,6 +104,7 @@ class Dealii(Package): depends_on("oce", when='+oce') depends_on("p4est", when='+p4est+mpi') depends_on("petsc+mpi", when='@8.4.2:+petsc+mpi') + depends_on('python', when='@8.5.0:+python') depends_on("slepc", when='@8.4.2:+slepc+petsc+mpi') depends_on("petsc@:3.6.4+mpi", when='@:8.4.1+petsc+mpi') depends_on("slepc@:3.6.3", when='@:8.4.1+slepc+petsc+mpi') |