Fix dyninst build with old boost (#36198)
Fix patching old boost versions to account for builders. Add a proper version constraint on boost for recent dyninst. The constraint can be found in dyninst source code under "cmake/Boost.cmake" which contains: set(_boost_min_version 1.70.0) Co-authored-by: Greg Becker <becker33@llnl.gov>
This commit is contained in:
parent
aa99063065
commit
7579eaf75a
@ -727,14 +727,13 @@ def setup_dependent_package(self, module, dependent_spec):
|
||||
# Disable find package's config mode for versions of Boost that
|
||||
# didn't provide it. See https://github.com/spack/spack/issues/20169
|
||||
# and https://cmake.org/cmake/help/latest/module/FindBoost.html
|
||||
is_cmake = isinstance(dependent_spec.package, CMakePackage)
|
||||
if self.spec.satisfies("boost@:1.69.0") and is_cmake:
|
||||
args_fn = type(dependent_spec.package).cmake_args
|
||||
if self.spec.satisfies("boost@:1.69.0") and dependent_spec.satisfies("build_system=cmake"):
|
||||
args_fn = type(dependent_spec.package.builder).cmake_args
|
||||
|
||||
def _cmake_args(self):
|
||||
return ["-DBoost_NO_BOOST_CMAKE=ON"] + args_fn(self)
|
||||
|
||||
type(dependent_spec.package).cmake_args = _cmake_args
|
||||
type(dependent_spec.package.builder).cmake_args = _cmake_args
|
||||
|
||||
def setup_dependent_build_environment(self, env, dependent_spec):
|
||||
if "+context" in self.spec and "context-impl" in self.spec.variants:
|
||||
|
@ -54,6 +54,7 @@ class Dyninst(CMakePackage):
|
||||
depends_on("boost@1.61.0:" + boost_libs, when="@10.1.0:")
|
||||
depends_on("boost@1.61.0:1.69" + boost_libs, when="@:10.0")
|
||||
depends_on("boost@1.67.0:" + boost_libs, when="@11.0.0:")
|
||||
depends_on("boost@1.70.0:" + boost_libs, when="@12:")
|
||||
|
||||
depends_on("libiberty+pic")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user