From 42c14e0fdbfe6ed477925ad21de77ac15ae9fdcf Mon Sep 17 00:00:00 2001 From: healther Date: Sat, 31 Mar 2018 14:36:56 +0200 Subject: Fix build of boost@:1.58.999 +python (and +mpi) (#7630) * explicitly specify user-config.jam as it isn't found via the environment variable on older boost versions (cf. what debian/rules does) => fixes +mpi build * fix "error: Ambiguous key" error on :1.58.999 boost (cf. https://github.com/boostorg/boost/blob/boost-1.59.0/bootstrap.sh#L357) --- var/spack/repos/builtin/packages/boost/package.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index b34b3e5a7f..fdee5af217 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -194,6 +194,10 @@ class Boost(Package): return 'gcc' def bjam_python_line(self, spec): + # avoid "ambiguous key" error + if spec.satisfies('@:1.58'): + return '' + return 'using python : {0} : {1} : {2} : {3} ;\n'.format( spec['python'].version.up_to(2), spec['python'].command.path, @@ -350,7 +354,7 @@ class Boost(Package): withLibs.append('graph_parallel') # to make Boost find the user-config.jam - env['BOOST_BUILD_PATH'] = './' + env['BOOST_BUILD_PATH'] = self.stage.source_path bootstrap = Executable('./bootstrap.sh') @@ -367,7 +371,12 @@ class Boost(Package): # in 1.59 max jobs became dynamic if jobs > 64 and spec.satisfies('@:1.58'): jobs = 64 - b2_options = ['-j', '%s' % jobs] + + b2_options = [ + '-j', '%s' % jobs, + '--user-config=%s' % os.path.join( + self.stage.source_path, 'user-config.jam') + ] threadingOpts = self.determine_b2_options(spec, b2_options) -- cgit v1.2.3-70-g09d2