-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
rhel-9.4
-
No
-
None
-
rhel-sst-pt-llvm-rust-go
-
ssg_platform_tools
-
None
-
False
-
-
None
-
None
-
None
-
None
-
None
What were you trying to do that didn't work?
Please backport https://bodhi.fedoraproject.org/updates/FEDORA-2022-89acaae618 to RHEL9 The customer reported pretty much a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1898979 and so a backport of the fedora fix for the problem into RHEL9 seems like the appropriate solution.
The core bug is that the RHEL 9.x package for boost-devel does not include BoostConfig.cmake. To use Boost in a CMake project you (idiomatically) call find_package(Boost). With no arguments this runs the FindBoost.cmake module-script shipped with CMake, but depending on the arguments passed this script may be skipped and a BoostConfig.cmake config-script needed instead. As of Boost 1.71 this config-script is installed by Boost, but the packaging of boost-devel in RHEL 9 does not include this file. It happens that Dyninst 13.0.0 passes arguments that inadvertently skip the FindBoost.cmake module-script, thus the Dyninst build fails on RHEL 9.
What is the impact of this issue to you?
It creates a problem building one of the libraries that their tool software depends on.
Please provide the package NVR for which the bug is seen:
CMake on RHEL 9
How reproducible is this bug?:
Always
Steps to reproduce
- dnf install -y cmake gcc gcc-c++ boost-devel
- mkdir /tmp/x
- echo 'find_package(Boost CONFIG REQUIRED)' > /tmp/x/CMakeLists.txt
- cmake -S /tmp/x -B /tmp/x-build
...
CMake Error at CMakeLists.txt:1 (find_package):
Could not find a package configuration file provided by "Boost" with any of
the following names:
BoostConfig.cmake
boost-config.cmake
Add the installation prefix of "Boost" to CMAKE_PREFIX_PATH or set
"Boost_DIR" to a directory containing one of the above files. If "Boost"
provides a separate development package or SDK, be sure it has been
installed.
Expected results
Note that this only happens on RHEL 9, the current Fedoras do not run into this problem (and RHEL 8 is too old). Blaming the fix, it seems this was resolved in Fedora by the below bug and code:
https://bugzilla.redhat.com/show_bug.cgi?id=1898979
https://src.fedoraproject.org/rpms/boost/c/19a004c283d3d087e7cafc37d4ed36e381f389de
Actual results
Note also that CMake 3.30 deprecates the FindBoost.cmake module-script (CMP0167), in which case BoostConfig.cmake must be packaged for find_package(Boost) to work at all.