From 7d98ba911de3c61547a01b241affea88684eab08 Mon Sep 17 00:00:00 2001 From: Patrick Palka Date: Tue, 8 Jul 2025 16:25:41 -0400 Subject: [PATCH] Fix the CMake config file for openmpi and mpich Resolves: RHEL-97588 --- boost.spec | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/boost.spec b/boost.spec index 4de714c..3f4d2d0 100644 --- a/boost.spec +++ b/boost.spec @@ -42,7 +42,7 @@ Name: boost %global real_name boost Summary: The free peer-reviewed portable C++ source libraries Version: 1.75.0 -Release: 11%{?dist} +Release: 12%{?dist} License: Boost and MIT and Python # Replace each . with _ in %%{version} @@ -831,9 +831,14 @@ mv ${RPM_BUILD_ROOT}${MPI_HOME}/lib/boost-python%{python3_version}/mpi.so \ ${RPM_BUILD_ROOT}%{python3_sitearch}/openmpi/boost/ %endif +# Using 'b2 stage' does not fix the paths in these files, so do it manually +sed -i -e 's|get_filename_component(_BOOST_INCLUDEDIR "${_BOOST_CMAKEDIR}/.*"|get_filename_component(_BOOST_INCLUDEDIR "${_BOOST_CMAKEDIR}/../../../../include"|' ${RPM_BUILD_ROOT}${MPI_HOME}/lib/cmake/*/*-config.cmake + # Remove generic parts of boost that were built for dependencies. rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}* rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_numpy* +rm -rf ${RPM_BUILD_ROOT}${MPI_HOME}/lib/cmake/boost_{python,{w,}serialization}* +rm -rf ${RPM_BUILD_ROOT}${MPI_HOME}/lib/cmake/boost_numpy* %{_openmpi_unload} export PATH=/bin${PATH:+:}$PATH @@ -857,9 +862,14 @@ mv ${RPM_BUILD_ROOT}${MPI_HOME}/lib/boost-python%{python3_version}/mpi.so \ ${RPM_BUILD_ROOT}%{python3_sitearch}/mpich/boost/ %endif +# Using 'b2 stage' does not fix the paths in these files, so do it manually +sed -i -e 's|get_filename_component(_BOOST_INCLUDEDIR "${_BOOST_CMAKEDIR}/.*"|get_filename_component(_BOOST_INCLUDEDIR "${_BOOST_CMAKEDIR}/../../../../include"|' ${RPM_BUILD_ROOT}${MPI_HOME}/lib/cmake/*/*-config.cmake + # Remove generic parts of boost that were built for dependencies. rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}* rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_numpy* +rm -rf ${RPM_BUILD_ROOT}${MPI_HOME}/lib/cmake/boost_{python,{w,}serialization}* +rm -rf ${RPM_BUILD_ROOT}${MPI_HOME}/lib/cmake/boost_numpy* %{_mpich_unload} export PATH=/bin${PATH:+:}$PATH @@ -1286,6 +1296,9 @@ fi %{_mandir}/man1/b2.1* %changelog +* Tue Jul 8 2025 Patrick Palka - 1.75.0-12 +- Fix the CMake config file for openmpi and mpich (RHEL-97588) + * Tue May 13 2025 Jonathan Wakely - 1.75.0-11 - Add patch for cross-device filesystem::copy_file (RHEL-89888)