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)
This commit is contained in:
healther 2018-03-31 14:36:56 +02:00 committed by Adam J. Stewart
parent b62ed20f3f
commit 42c14e0fdb

View file

@ -194,6 +194,10 @@ def determine_toolset(self, spec):
return 'gcc' return 'gcc'
def bjam_python_line(self, spec): 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( return 'using python : {0} : {1} : {2} : {3} ;\n'.format(
spec['python'].version.up_to(2), spec['python'].version.up_to(2),
spec['python'].command.path, spec['python'].command.path,
@ -350,7 +354,7 @@ def install(self, spec, prefix):
withLibs.append('graph_parallel') withLibs.append('graph_parallel')
# to make Boost find the user-config.jam # to make Boost find the user-config.jam
env['BOOST_BUILD_PATH'] = './' env['BOOST_BUILD_PATH'] = self.stage.source_path
bootstrap = Executable('./bootstrap.sh') bootstrap = Executable('./bootstrap.sh')
@ -367,7 +371,12 @@ def install(self, spec, prefix):
# in 1.59 max jobs became dynamic # in 1.59 max jobs became dynamic
if jobs > 64 and spec.satisfies('@:1.58'): if jobs > 64 and spec.satisfies('@:1.58'):
jobs = 64 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) threadingOpts = self.determine_b2_options(spec, b2_options)