From e4c871489a8c7cd85c713f461d37cf1624eef16a Mon Sep 17 00:00:00 2001 From: Victor Brunini Date: Tue, 13 Feb 2024 11:23:13 -0800 Subject: [PATCH] boost: Add patch to workaround mpl compiler error with gcc 8.3 and c++17. (#39144) Works around this issue: https://github.com/boostorg/mpl/issues/44 Co-authored-by: psakievich --- .../boost/boost_gcc83_cpp17_fix.patch | 61 +++++++++++++++++++ .../repos/builtin/packages/boost/package.py | 3 + 2 files changed, 64 insertions(+) create mode 100644 var/spack/repos/builtin/packages/boost/boost_gcc83_cpp17_fix.patch diff --git a/var/spack/repos/builtin/packages/boost/boost_gcc83_cpp17_fix.patch b/var/spack/repos/builtin/packages/boost/boost_gcc83_cpp17_fix.patch new file mode 100644 index 00000000000000..8a328796aefa63 --- /dev/null +++ b/var/spack/repos/builtin/packages/boost/boost_gcc83_cpp17_fix.patch @@ -0,0 +1,61 @@ +--- a/boost/mpl/quote.hpp 2022-09-29 11:47:28.395587000 -0600 ++++ b/boost/mpl/quote.hpp 2022-09-29 11:47:35.363536000 -0600 +@@ -119,7 +119,7 @@ + #define i_ BOOST_PP_FRAME_ITERATION(1) + + template< +- template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F ++ template< BOOST_MPL_PP_PARAMS(i_, typename T) > class F + , typename Tag = void_ + > + struct BOOST_PP_CAT(quote,i_) + +--- a/boost/mpl/aux_/preprocessed/gcc/quote.hpp 2022-09-29 12:39:47.776457000 -0600 ++++ b/boost/mpl/aux_/preprocessed/gcc/quote.hpp 2022-09-29 12:40:15.807044000 -0600 +@@ -24,7 +24,7 @@ + }; + + template< +- template< typename P1 > class F ++ template< typename T1 > class F + , typename Tag = void_ + > + struct quote1 +@@ -41,7 +41,7 @@ + }; + + template< +- template< typename P1, typename P2 > class F ++ template< typename T1, typename T2 > class F + , typename Tag = void_ + > + struct quote2 +@@ -58,7 +58,7 @@ + }; + + template< +- template< typename P1, typename P2, typename P3 > class F ++ template< typename T1, typename T2, typename T3 > class F + , typename Tag = void_ + > + struct quote3 +@@ -75,7 +75,7 @@ + }; + + template< +- template< typename P1, typename P2, typename P3, typename P4 > class F ++ template< typename T1, typename T2, typename T3, typename T4 > class F + , typename Tag = void_ + > + struct quote4 +@@ -96,8 +96,8 @@ + + template< + template< +- typename P1, typename P2, typename P3, typename P4 +- , typename P5 ++ typename T1, typename T2, typename T3, typename T4 ++ , typename T5 + > + class F + , typename Tag = void_ diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 0824029d41bd90..55b9934b3f650f 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -314,6 +314,9 @@ def libs(self): # Patch to workaround compiler bug patch("nvhpc-find_address.patch", when="@1.75.0:1.76%nvhpc") + # Patch to workaround gcc-8.3 compiler issue https://github.com/boostorg/mpl/issues/44 + patch("boost_gcc83_cpp17_fix.patch", when="@1.69:%gcc@8.3") + # Fix for version comparison on newer Clang on darwin # See: https://github.com/boostorg/build/issues/440 # See: https://github.com/macports/macports-ports/pull/6726