Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boost: Fix compilation errors with newer Clang #24967

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
216 changes: 216 additions & 0 deletions recipes/boost/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ patches:
patch_description: "Fix MSVC /RTCc build runtime failures."
patch_type: "official"
patch_source: "https://www.boost.org/patches/1_80_0/0006-unordered-msvc-rtcc.patch"
- patch_file: "patches/boost_build-with-newer-clang.patch"
patch_description: "Fix MPL/Numeric compilation errors with newer Clang"
patch_type: "portability"
patch_source: "https://github.com/boostorg/numeric_conversion/commit/50a1eae942effb0a9b90724323ef8f2a67e7984a , https://github.com/boostorg/mpl/pull/77"
"1.79.0":
- patch_file: "patches/boost_locale_fail_on_missing_backend.patch"
patch_description: "Fails the build when there is no iconv backend"
Expand All @@ -139,6 +143,10 @@ patches:
patch_description: "Fix access specifier preventing use of experimental iterators. Allow more granular control over enabled experimental features."
patch_type: "portability"
patch_source: "https://github.com/boostorg/geometry/discussions/1041"
- patch_file: "patches/boost_build-with-newer-clang.patch"
patch_description: "Fix MPL/Numeric compilation errors with newer Clang"
patch_type: "portability"
patch_source: "https://github.com/boostorg/numeric_conversion/commit/50a1eae942effb0a9b90724323ef8f2a67e7984a , https://github.com/boostorg/mpl/pull/77"
"1.78.0":
- patch_file: "patches/boost_locale_fail_on_missing_backend.patch"
patch_description: "Fails the build when there is no iconv backend"
Expand All @@ -159,3 +167,211 @@ patches:
patch_description: "Don't skip install targets if there's <build>no in ureqs"
patch_type: "official"
patch_source: "https://github.com/boostorg/build/pull/113"
- patch_file: "patches/boost_build-with-newer-clang.patch"
patch_description: "Fix MPL/Numeric compilation errors with newer Clang"
patch_type: "portability"
patch_source: "https://github.com/boostorg/numeric_conversion/commit/50a1eae942effb0a9b90724323ef8f2a67e7984a , https://github.com/boostorg/mpl/pull/77"
"1.77.0":
- patch_file: "patches/boost_locale_fail_on_missing_backend.patch"
patch_description: "Fails the build when there is no iconv backend"
patch_type: "conan"
- patch_file: "patches/boost_1_77_mpi_check.patch"
patch_description: "Fails the build when mpi is not configured"
patch_type: "conan"
- patch_file: "patches/1.69.0-locale-no-system.patch"
patch_description: "This library links to boost_system, even though that library is header-only"
patch_type: "conan"
- patch_file: "patches/1.77.0-type_erasure-no-system.patch"
patch_description: "This library links to boost_system, even though that library is header-only"
patch_type: "conan"
- patch_file: "patches/1.77.0-fiber-mingw.patch"
patch_description: "fix layout=versioned for clang@Macos + mingw@Windows"
patch_type: "conan"
- patch_file: "patches/1.77.0-boost_build-with-newer-b2.patch"
patch_description: "Bump build_requires of 'b2' to '4.7.1' (was '4.5.0')"
patch_type: "conan"
- patch_file: "patches/boost_build-with-newer-clang.patch"
patch_description: "Fix MPL/Numeric compilation errors with newer Clang"
patch_type: "portability"
patch_source: "https://github.com/boostorg/numeric_conversion/commit/50a1eae942effb0a9b90724323ef8f2a67e7984a , https://github.com/boostorg/mpl/pull/77"
"1.76.0":
- patch_file: "patches/boost_locale_fail_on_missing_backend.patch"
patch_description: "Fails the build when there is no iconv backend"
patch_type: "conan"
- patch_file: "patches/boost_mpi_check.patch"
patch_description: "Fails the build when mpi is not configured"
patch_type: "conan"
- patch_file: "patches/1.69.0-locale-no-system.patch"
patch_description: "This library links to boost_system, even though that library is header-only"
patch_type: "conan"
- patch_file: "patches/1.76.0-0001-fix-include-inside-boost-namespace.patch"
patch_description: "Fix #include inside boost namespace"
patch_type: "bugfix"
patch_source: "https://github.com/boostorg/math/pull/670"
- patch_file: "patches/1.77.0-type_erasure-no-system.patch"
patch_description: "This library links to boost_system, even though that library is header-only"
patch_type: "conan"
- patch_file: "patches/1.77.0-boost_build-with-newer-b2.patch"
patch_description: "Bump build_requires of 'b2' to '4.7.1' (was '4.5.0')"
patch_type: "conan"
- patch_file: "patches/boost_build-with-newer-clang.patch"
patch_description: "Fix MPL/Numeric compilation errors with newer Clang"
patch_type: "portability"
patch_source: "https://github.com/boostorg/numeric_conversion/commit/50a1eae942effb0a9b90724323ef8f2a67e7984a , https://github.com/boostorg/mpl/pull/77"
"1.75.0":
- patch_file: "patches/boost_build_qcc_fix_debug_build_parameter_since_1_74.patch"
patch_description: ""
patch_type: "conan"
- patch_file: "patches/python_base_prefix_since_1_74.patch"
patch_description: ""
patch_type: "conan"
- patch_file: "patches/boost_locale_fail_on_missing_backend.patch"
patch_description: "Fails the build when there is no iconv backend"
patch_type: "conan"
- patch_file: "patches/boost_mpi_check.patch"
patch_description: "Fails the build when mpi is not configured"
patch_type: "conan"
- patch_file: "patches/1.69.0-locale-no-system.patch"
patch_description: "This library links to boost_system, even though that library is header-only"
patch_type: "conan"
- patch_file: "patches/1.77.0-type_erasure-no-system.patch"
patch_description: "This library links to boost_system, even though that library is header-only"
patch_type: "conan"
- patch_file: "patches/1.75.0-boost_build-with-newer-b2.patch"
patch_description: "Bump build_requires of 'b2' to '4.7.1' (was '4.5.0')"
patch_type: "conan"
- patch_file: "patches/boost_build-with-newer-clang.patch"
patch_description: "Fix MPL/Numeric compilation errors with newer Clang"
patch_type: "portability"
patch_source: "https://github.com/boostorg/numeric_conversion/commit/50a1eae942effb0a9b90724323ef8f2a67e7984a , https://github.com/boostorg/mpl/pull/77"
"1.74.0":
- patch_file: "patches/boost_build_qcc_fix_debug_build_parameter_since_1_74.patch"
patch_description: ""
patch_type: "conan"
- patch_file: "patches/python_base_prefix_since_1_74.patch"
patch_description: ""
patch_type: "conan"
- patch_file: "patches/boost_locale_fail_on_missing_backend.patch"
patch_description: "Fails the build when there is no iconv backend"
patch_type: "conan"
- patch_file: "patches/boost_mpi_check.patch"
patch_description: "Fails the build when mpi is not configured"
patch_type: "conan"
- patch_file: "patches/1.69.0-locale-no-system.patch"
patch_description: "This library links to boost_system, even though that library is header-only"
patch_type: "conan"
- patch_file: "patches/1.69.0-random-no-system.patch"
patch_description: "This library links to boost_system, even though that library is header-only"
patch_type: "conan"
- patch_file: "patches/1.69.0-type_erasure-no-system.patch"
patch_description: "This library links to boost_system, even though that library is header-only"
patch_type: "conan"
- patch_file: "patches/1.75.0-boost_build-with-newer-b2.patch"
patch_description: "Bump build_requires of 'b2' to '4.7.1' (was '4.5.0')"
patch_type: "conan"
- patch_file: "patches/boost_build-with-newer-clang.patch"
patch_description: "Fix MPL/Numeric compilation errors with newer Clang"
patch_type: "portability"
patch_source: "https://github.com/boostorg/numeric_conversion/commit/50a1eae942effb0a9b90724323ef8f2a67e7984a , https://github.com/boostorg/mpl/pull/77"
"1.73.0":
- patch_file: "patches/boost_build_qcc_fix_debug_build_parameter.patch"
patch_description: ""
patch_type: "conan"
- patch_file: "patches/python_base_prefix.patch"
patch_description: ""
patch_type: "conan"
- patch_file: "patches/boost_locale_fail_on_missing_backend.patch"
patch_description: "Fails the build when there is no iconv backend"
patch_type: "conan"
- patch_file: "patches/boost_mpi_check.patch"
patch_description: "Fails the build when mpi is not configured"
patch_type: "conan"
- patch_file: "patches/1.69.0-locale-no-system.patch"
patch_description: "This library links to boost_system, even though that library is header-only"
patch_type: "conan"
- patch_file: "patches/1.69.0-random-no-system.patch"
patch_description: "This library links to boost_system, even though that library is header-only"
patch_type: "conan"
- patch_file: "patches/1.69.0-type_erasure-no-system.patch"
patch_description: "This library links to boost_system, even though that library is header-only"
patch_type: "conan"
- patch_file: "patches/1.75.0-boost_build-with-newer-b2.patch"
patch_description: "Bump build_requires of 'b2' to '4.7.1' (was '4.5.0')"
patch_type: "conan"
"1.72.0":
- patch_file: "patches/bcp_namespace_issues_1_72.patch"
patch_description: ""
patch_type: "conan"
- patch_file: "patches/boost_build_qcc_fix_debug_build_parameter.patch"
patch_description: ""
patch_type: "conan"
- patch_file: "patches/boost_core_qnx_cxx_provide___cxa_get_globals.patch"
patch_description: ""
patch_type: "conan"
- patch_file: "patches/python_base_prefix.patch"
patch_description: ""
patch_type: "conan"
- patch_file: "patches/solaris_pthread_data.patch"
patch_description: ""
patch_type: "conan"
- patch_file: "patches/0001-revert-cease-dependence-on-range.patch"
patch_description: ""
patch_type: "conan"
- patch_file: "patches/boost_log_filesystem_no_deprecated_1_72.patch"
patch_description: ""
patch_type: "conan"
- patch_file: "patches/boost_locale_fail_on_missing_backend.patch"
patch_description: "Fails the build when there is no iconv backend"
patch_type: "conan"
- patch_file: "patches/boost_mpi_check.patch"
patch_description: "Fails the build when mpi is not configured"
patch_type: "conan"
- patch_file: "patches/1.69.0-locale-no-system.patch"
patch_description: "This library links to boost_system, even though that library is header-only"
patch_type: "conan"
- patch_file: "patches/1.69.0-random-no-system.patch"
patch_description: "This library links to boost_system, even though that library is header-only"
patch_type: "conan"
- patch_file: "patches/1.69.0-type_erasure-no-system.patch"
patch_description: "This library links to boost_system, even though that library is header-only"
patch_type: "conan"
- patch_file: "patches/1.75.0-boost_build-with-newer-b2.patch"
patch_description: "Bump build_requires of 'b2' to '4.7.1' (was '4.5.0')"
patch_type: "conan"
"1.71.0":
- patch_file: "patches/bcp_namespace_issues_1_71.patch"
patch_description: ""
patch_type: "conan"
- patch_file: "patches/boost_build_qcc_fix_debug_build_parameter.patch"
patch_description: ""
patch_type: "conan"
- patch_file: "patches/boost_core_qnx_cxx_provide___cxa_get_globals.patch"
patch_description: ""
patch_type: "conan"
- patch_file: "patches/python_base_prefix.patch"
patch_description: ""
patch_type: "conan"
- patch_file: "patches/solaris_pthread_data.patch"
patch_description: ""
patch_type: "conan"
- patch_file: "patches/boost_locale_fail_on_missing_backend.patch"
patch_description: "Fails the build when there is no iconv backend"
patch_type: "conan"
- patch_file: "patches/boost_mpi_check.patch"
patch_description: "Fails the build when mpi is not configured"
patch_type: "conan"
- patch_file: "patches/1.69.0-contract-no-system.patch"
patch_description: "This library links to boost_system, even though that library is header-only"
patch_type: "conan"
- patch_file: "patches/1.69.0-locale-no-system.patch"
patch_description: "This library links to boost_system, even though that library is header-only"
patch_type: "conan"
- patch_file: "patches/1.69.0-random-no-system.patch"
patch_description: "This library links to boost_system, even though that library is header-only"
patch_type: "conan"
- patch_file: "patches/1.69.0-type_erasure-no-system.patch"
patch_description: "This library links to boost_system, even though that library is header-only"
patch_type: "conan"
- patch_file: "patches/1.75.0-boost_build-with-newer-b2.patch"
patch_description: "Bump build_requires of 'b2' to '4.7.1' (was '4.5.0')"
patch_type: "conan"
89 changes: 89 additions & 0 deletions recipes/boost/all/patches/boost_build-with-newer-clang.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
diff --git a/boost/numeric/conversion/detail/int_float_mixture.hpp b/boost/numeric/conversion/detail/int_float_mixture.hpp
index 464e527..7690d07 100644
--- a/boost/numeric/conversion/detail/int_float_mixture.hpp
+++ b/boost/numeric/conversion/detail/int_float_mixture.hpp
@@ -16,15 +16,15 @@
#include "boost/numeric/conversion/int_float_mixture_enum.hpp"
#include "boost/numeric/conversion/detail/meta.hpp"

-#include "boost/mpl/integral_c.hpp"
+#include "boost/type_traits/integral_constant.hpp"

namespace boost { namespace numeric { namespace convdetail
{
// Integral Constants for 'IntFloatMixture'
- typedef mpl::integral_c<int_float_mixture_enum, integral_to_integral> int2int_c ;
- typedef mpl::integral_c<int_float_mixture_enum, integral_to_float> int2float_c ;
- typedef mpl::integral_c<int_float_mixture_enum, float_to_integral> float2int_c ;
- typedef mpl::integral_c<int_float_mixture_enum, float_to_float> float2float_c ;
+ typedef boost::integral_constant<int_float_mixture_enum, integral_to_integral> int2int_c ;
+ typedef boost::integral_constant<int_float_mixture_enum, integral_to_float> int2float_c ;
+ typedef boost::integral_constant<int_float_mixture_enum, float_to_integral> float2int_c ;
+ typedef boost::integral_constant<int_float_mixture_enum, float_to_float> float2float_c ;

// Metafunction:
//
diff --git a/boost/numeric/conversion/detail/sign_mixture.hpp b/boost/numeric/conversion/detail/sign_mixture.hpp
index c7f9e42..fde1584 100644
--- a/boost/numeric/conversion/detail/sign_mixture.hpp
+++ b/boost/numeric/conversion/detail/sign_mixture.hpp
@@ -16,15 +16,15 @@
#include "boost/numeric/conversion/sign_mixture_enum.hpp"
#include "boost/numeric/conversion/detail/meta.hpp"

-#include "boost/mpl/integral_c.hpp"
+#include "boost/type_traits/integral_constant.hpp"

namespace boost { namespace numeric { namespace convdetail
{
// Integral Constants for 'SignMixture'
- typedef mpl::integral_c<sign_mixture_enum, unsigned_to_unsigned> unsig2unsig_c ;
- typedef mpl::integral_c<sign_mixture_enum, signed_to_signed> sig2sig_c ;
- typedef mpl::integral_c<sign_mixture_enum, signed_to_unsigned> sig2unsig_c ;
- typedef mpl::integral_c<sign_mixture_enum, unsigned_to_signed> unsig2sig_c ;
+ typedef boost::integral_constant<sign_mixture_enum, unsigned_to_unsigned> unsig2unsig_c ;
+ typedef boost::integral_constant<sign_mixture_enum, signed_to_signed> sig2sig_c ;
+ typedef boost::integral_constant<sign_mixture_enum, signed_to_unsigned> sig2unsig_c ;
+ typedef boost::integral_constant<sign_mixture_enum, unsigned_to_signed> unsig2sig_c ;

// Metafunction:
//
diff --git a/boost/numeric/conversion/detail/udt_builtin_mixture.hpp b/boost/numeric/conversion/detail/udt_builtin_mixture.hpp
index 36dbc49..a39d29f 100644
--- a/boost/numeric/conversion/detail/udt_builtin_mixture.hpp
+++ b/boost/numeric/conversion/detail/udt_builtin_mixture.hpp
@@ -15,15 +15,15 @@
#include "boost/numeric/conversion/udt_builtin_mixture_enum.hpp"
#include "boost/numeric/conversion/detail/meta.hpp"

-#include "boost/mpl/integral_c.hpp"
+#include "boost/type_traits/integral_constant.hpp"

namespace boost { namespace numeric { namespace convdetail
{
// Integral Constants for 'UdtMixture'
- typedef mpl::integral_c<udt_builtin_mixture_enum, builtin_to_builtin> builtin2builtin_c ;
- typedef mpl::integral_c<udt_builtin_mixture_enum, builtin_to_udt> builtin2udt_c ;
- typedef mpl::integral_c<udt_builtin_mixture_enum, udt_to_builtin> udt2builtin_c ;
- typedef mpl::integral_c<udt_builtin_mixture_enum, udt_to_udt> udt2udt_c ;
+ typedef boost::integral_constant<udt_builtin_mixture_enum, builtin_to_builtin> builtin2builtin_c ;
+ typedef boost::integral_constant<udt_builtin_mixture_enum, builtin_to_udt> builtin2udt_c ;
+ typedef boost::integral_constant<udt_builtin_mixture_enum, udt_to_builtin> udt2builtin_c ;
+ typedef boost::integral_constant<udt_builtin_mixture_enum, udt_to_udt> udt2udt_c ;

// Metafunction:
//
diff --git a/boost/mpl/aux_/integral_wrapper.hpp b/boost/mpl/aux_/integral_wrapper.hpp
index 8748fbb93..5f24b7949 100644
--- a/boost/mpl/aux_/integral_wrapper.hpp
+++ b/boost/mpl/aux_/integral_wrapper.hpp
@@ -56,7 +56,8 @@ struct AUX_WRAPPER_NAME
// have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC),
// while some other don't like 'value + 1' (Borland), and some don't like
// either
-#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243)
+#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243) \
+ || __cplusplus >= 201103L
private:
BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, next_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1)));
BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, prior_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)));