pmix: add explicit hwloc dependency (#30897)

pmix@:2 uses hwloc if it's available (e.g. in homebrew) which can break
the installation.
This commit is contained in:
Seth R. Johnson 2022-06-02 08:47:53 -04:00 committed by GitHub
parent dac5fec255
commit b2d3ed9096
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,6 +62,7 @@ class Pmix(AutotoolsPackage):
variant('restful', variant('restful',
default=False, default=False,
when='@4:',
description="allow a PMIx server to request services from " description="allow a PMIx server to request services from "
"a system-level REST server") "a system-level REST server")
@ -69,18 +70,18 @@ class Pmix(AutotoolsPackage):
default=False, default=False,
description='Build manpages') description='Build manpages')
depends_on('libevent@2.0.20:') depends_on("m4", type="build", when="@master")
depends_on('hwloc@1.11:1,2:', when='@3:') depends_on("autoconf", type="build", when="@master")
depends_on("m4", type=("build"), when="@master") depends_on("automake", type="build", when="@master")
depends_on("autoconf", type=("build"), when="@master") depends_on("libtool", type="build", when="@master")
depends_on("automake", type=("build"), when="@master") depends_on("perl", type="build", when="@master")
depends_on("libtool", type=("build"), when="@master")
depends_on("perl", type=("build"), when="@master")
depends_on('curl', when="+restful")
depends_on('jansson@2.11:', when="+restful")
depends_on('pandoc', type='build', when='+docs') depends_on('pandoc', type='build', when='+docs')
conflicts('@:3', when='+restful') depends_on('libevent@2.0.20:')
depends_on('hwloc@1.0:1', when='@:2')
depends_on('hwloc@1.11:1,2:', when='@3:')
depends_on('curl', when="+restful")
depends_on('jansson@2.11:', when="+restful")
def autoreconf(self, spec, prefix): def autoreconf(self, spec, prefix):
"""Only needed when building from git checkout""" """Only needed when building from git checkout"""
@ -92,34 +93,27 @@ def autoreconf(self, spec, prefix):
perl('./autogen.pl') perl('./autogen.pl')
def configure_args(self): def configure_args(self):
spec = self.spec spec = self.spec
config_args = [ config_args = [
'--enable-shared', '--enable-shared',
'--enable-static' '--enable-static'
] ]
if '+pmi_backwards_compatibility' in self.spec: config_args.append('--with-libevent=' + spec['libevent'].prefix)
config_args.append('--enable-pmi-backward-compatibility') config_args.append('--with-hwloc=' + spec['hwloc'].prefix)
else:
config_args.append('--disable-pmi-backward-compatibility') config_args.extend(self.enable_or_disable(
'pmi-backward-compatibility', variant='pmi_backwards_compatibility'
))
if '~docs' in self.spec: if '~docs' in self.spec:
config_args.append('--disable-man-pages') config_args.append('--disable-man-pages')
# libevent support
config_args.append(
'--with-libevent={0}'.format(spec['libevent'].prefix))
# Versions < 2.1.1 have a bug in the test code that *sometimes* # Versions < 2.1.1 have a bug in the test code that *sometimes*
# causes problems on strict alignment architectures such as # causes problems on strict alignment architectures such as
# aarch64. Work-around is to just not build the test code. # aarch64. Work-around is to just not build the test code.
if (self.spec.satisfies('target=aarch64:') and if spec.satisfies('@:2.1.0 target=aarch64:'):
self.spec.version < Version('2.1.1')):
config_args.append('--without-tests-examples') config_args.append('--without-tests-examples')
# Versions >= 3.0 also use hwloc
if self.spec.version >= Version('3.0.0'):
config_args.append('--with-hwloc={0}'.format(spec['hwloc'].prefix))
return config_args return config_args