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
This commit is contained in:
committed by
Todd Gamblin
parent
a638b62ab1
commit
462a4a1353
@@ -138,15 +138,13 @@ def url_for_version(self, version):
|
|||||||
def determine_toolset(self, spec):
|
def determine_toolset(self, spec):
|
||||||
if spec.satisfies("platform=darwin"):
|
if spec.satisfies("platform=darwin"):
|
||||||
return 'darwin'
|
return 'darwin'
|
||||||
else:
|
|
||||||
platform = 'linux'
|
|
||||||
|
|
||||||
toolsets = {'g++': 'gcc',
|
toolsets = {'g++': 'gcc',
|
||||||
'icpc': 'intel',
|
'icpc': 'intel',
|
||||||
'clang++': 'clang'}
|
'clang++': 'clang'}
|
||||||
|
|
||||||
if spec.satisfies('@1.47:'):
|
if spec.satisfies('@1.47:'):
|
||||||
toolsets['icpc'] += '-' + platform
|
toolsets['icpc'] += '-linux'
|
||||||
for cc, toolset in toolsets.iteritems():
|
for cc, toolset in toolsets.iteritems():
|
||||||
if cc in self.compiler.cxx_names:
|
if cc in self.compiler.cxx_names:
|
||||||
return toolset
|
return toolset
|
||||||
@@ -164,6 +162,16 @@ def determine_bootstrap_options(self, spec, withLibs, options):
|
|||||||
join_path(spec['python'].prefix.bin, 'python'))
|
join_path(spec['python'].prefix.bin, 'python'))
|
||||||
|
|
||||||
with open('user-config.jam', 'w') as f:
|
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:
|
if '+mpi' in spec:
|
||||||
f.write('using mpi : %s ;\n' %
|
f.write('using mpi : %s ;\n' %
|
||||||
@@ -204,7 +212,13 @@ def determine_b2_options(self, spec, options):
|
|||||||
|
|
||||||
options.extend([
|
options.extend([
|
||||||
'link=%s' % ','.join(linkTypes),
|
'link=%s' % ','.join(linkTypes),
|
||||||
'--layout=tagged'])
|
'--layout=tagged'
|
||||||
|
])
|
||||||
|
|
||||||
|
if not spec.satisfies('%intel'):
|
||||||
|
options.extend([
|
||||||
|
'toolset=%s' % self.determine_toolset(spec)
|
||||||
|
])
|
||||||
|
|
||||||
return threadingOpts
|
return threadingOpts
|
||||||
|
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ class Dealii(Package):
|
|||||||
depends_on("oce", when='+oce')
|
depends_on("oce", when='+oce')
|
||||||
depends_on("p4est", when='+p4est+mpi')
|
depends_on("p4est", when='+p4est+mpi')
|
||||||
depends_on("petsc+mpi", when='@8.4.2:+petsc+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("slepc", when='@8.4.2:+slepc+petsc+mpi')
|
||||||
depends_on("petsc@:3.6.4+mpi", when='@:8.4.1+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')
|
depends_on("slepc@:3.6.3", when='@:8.4.1+slepc+petsc+mpi')
|
||||||
|
|||||||
Reference in New Issue
Block a user