build: work around issue with Boost <= 1.80 and Clang >= 18 #30821

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:boost_174_clang_18 changing 1 files +10 −0
  1. fanquake commented at 1:24 pm on September 5, 2024: member

    Our current minimum supported Boost is 1.73.0. However, when compiling with Boost 1.74.0 (Debian Stable), using Clang 18, compilation fails with:

     0In file included from /usr/include/boost/mpl/integral_c.hpp:32:
     1/usr/include/boost/mpl/aux_/integral_wrapper.hpp:73:31: error: integer value -1 is outside the valid range of values [0, 3] for the enumeration type 'udt_builtin_mixture_enum' [-Wenum-constexpr-conversion]
     2   73 |     typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior;
     3      |                               ^
     4/usr/include/boost/mpl/aux_/static_cast.hpp:24:47: note: expanded from macro 'BOOST_MPL_AUX_STATIC_CAST'
     5   24 | #   define BOOST_MPL_AUX_STATIC_CAST(T, expr) static_cast<T>(expr)
     6      |                                               ^
     7In file included from ../../../src/test/validation_chainstatemanager_tests.cpp:8:
     8In file included from ../../../src/node/chainstatemanager_args.h:9:
     9In file included from ../../../src/validation.h:28:
    10In file included from ../../../src/txmempool.h:26:
    11In file included from /usr/include/boost/multi_index/hashed_index.hpp:38:
    12In file included from /usr/include/boost/multi_index/detail/node_handle.hpp:22:
    13In file included from /usr/include/boost/multi_index_container_fwd.hpp:18:
    14In file included from /usr/include/boost/multi_index/indexed_by.hpp:17:
    15In file included from /usr/include/boost/mpl/vector.hpp:36:
    16In file included from /usr/include/boost/mpl/vector/vector20.hpp:18:
    17In file included from /usr/include/boost/mpl/vector/vector10.hpp:18:
    18In file included from /usr/include/boost/mpl/vector/vector0.hpp:24:
    19In file included from /usr/include/boost/mpl/vector/aux_/clear.hpp:18:
    20In file included from /usr/include/boost/mpl/vector/aux_/vector0.hpp:22:
    21In file included from /usr/include/boost/mpl/vector/aux_/iterator.hpp:19:
    22In file included from /usr/include/boost/mpl/plus.hpp:19:
    23In file included from /usr/include/boost/mpl/aux_/arithmetic_op.hpp:17:
    24In file included from /usr/include/boost/mpl/integral_c.hpp:32:
    25/usr/include/boost/mpl/aux_/integral_wrapper.hpp:73:31: error: integer value -1 is outside the valid range of values [0, 3] for the enumeration type 'int_float_mixture_enum' [-Wenum-constexpr-conversion]
    26/usr/include/boost/mpl/aux_/static_cast.hpp:24:47: note: expanded from macro 'BOOST_MPL_AUX_STATIC_CAST'
    27   24 | #   define BOOST_MPL_AUX_STATIC_CAST(T, expr) static_cast<T>(expr)
    28      |                                               ^
    292 errors generated.
    

    Work around this issue by ignoring this diagnostic for this include. I did attempt to just downgrade the error into a warning, but that did not seem to work. Not a huge fan of inline warning/issue suppression, but this seems like the cleanest thing to do here (and easy to backport to 28.x).

    Can be tested with something like:

     0docker pull debian:bookworm
     1docker run -it debian:bookworm /bin/bash
     2
     3apt update &&  apt install ccache cmake git pkg-config libboost-dev libevent-dev python3 libsqlite3-dev lsb-release wget software-properties-common gnupg
     4git clone https://github.com/bitcoin/bitcoin
     5
     6wget https://apt.llvm.org/llvm.sh
     7chmod +x llvm.sh
     8./llvm.sh 18
     9
    10cd bitcoin
    11cmake -B build -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18
    12cmake --build build -j17
    13<snip>
    14In file included from /usr/include/boost/mpl/integral_c.hpp:32:
    15/usr/include/boost/mpl/aux_/integral_wrapper.hpp:73:31: error: integer value -1 is outside the valid range of values [0, 3] for the enumeration type 'int_float_mixture_enum' [-Wenum-constexpr-conversion]
    16/usr/include/boost/mpl/aux_/static_cast.hpp:24:47: note: expanded from macro 'BOOST_MPL_AUX_STATIC_CAST'
    17   24 | #   define BOOST_MPL_AUX_STATIC_CAST(T, expr) static_cast<T>(expr)
    18      |                                               ^
    192 errors generated.
    20
    21Apply the patch
    22
    23cmake --build build -j17
    24ctest --test-dir build -j17
    

    Fixes #30751.

  2. DrahtBot commented at 1:24 pm on September 5, 2024: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK hebasto, achow101

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  3. DrahtBot added the label Build system on Sep 5, 2024
  4. fanquake added the label Needs backport (28.x) on Sep 5, 2024
  5. fanquake added this to the milestone 28.0 on Sep 5, 2024
  6. build: work around issue with Boost <= 1.80 and Clang >= 18
    Our current minimum supported Boost is `1.73.0`. However, when compiling
    with Boost `1.74.0` (Debian Stable), using Clang `18`, compilation fails
    with:
    ```bash
    In file included from /usr/include/boost/mpl/integral_c.hpp:32:
    /usr/include/boost/mpl/aux_/integral_wrapper.hpp:73:31: error: integer value -1 is outside the valid range of values [0, 3] for the enumeration type 'udt_builtin_mixture_enum' [-Wenum-constexpr-conversion]
       73 |     typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior;
          |                               ^
    /usr/include/boost/mpl/aux_/static_cast.hpp:24:47: note: expanded from macro 'BOOST_MPL_AUX_STATIC_CAST'
       24 | #   define BOOST_MPL_AUX_STATIC_CAST(T, expr) static_cast<T>(expr)
          |                                               ^
    In file included from ../../../src/test/validation_chainstatemanager_tests.cpp:8:
    In file included from ../../../src/node/chainstatemanager_args.h:9:
    In file included from ../../../src/validation.h:28:
    In file included from ../../../src/txmempool.h:26:
    In file included from /usr/include/boost/multi_index/hashed_index.hpp:38:
    In file included from /usr/include/boost/multi_index/detail/node_handle.hpp:22:
    In file included from /usr/include/boost/multi_index_container_fwd.hpp:18:
    In file included from /usr/include/boost/multi_index/indexed_by.hpp:17:
    In file included from /usr/include/boost/mpl/vector.hpp:36:
    In file included from /usr/include/boost/mpl/vector/vector20.hpp:18:
    In file included from /usr/include/boost/mpl/vector/vector10.hpp:18:
    In file included from /usr/include/boost/mpl/vector/vector0.hpp:24:
    In file included from /usr/include/boost/mpl/vector/aux_/clear.hpp:18:
    In file included from /usr/include/boost/mpl/vector/aux_/vector0.hpp:22:
    In file included from /usr/include/boost/mpl/vector/aux_/iterator.hpp:19:
    In file included from /usr/include/boost/mpl/plus.hpp:19:
    In file included from /usr/include/boost/mpl/aux_/arithmetic_op.hpp:17:
    In file included from /usr/include/boost/mpl/integral_c.hpp:32:
    /usr/include/boost/mpl/aux_/integral_wrapper.hpp:73:31: error: integer value -1 is outside the valid range of values [0, 3] for the enumeration type 'int_float_mixture_enum' [-Wenum-constexpr-conversion]
    /usr/include/boost/mpl/aux_/static_cast.hpp:24:47: note: expanded from macro 'BOOST_MPL_AUX_STATIC_CAST'
       24 | #   define BOOST_MPL_AUX_STATIC_CAST(T, expr) static_cast<T>(expr)
          |                                               ^
    2 errors generated.
    ```
    
    Work around this issue by ignoring this diagnostic for this include.
    I did attempt to just downgrade the error into a warning, but that did
    not seem to work.
    
    See https://github.com/bitcoin/bitcoin/issues/30751 for further
    discussion.
    cd062d6684
  7. in src/txmempool.h:29 in 3f6092a671 outdated
    22@@ -23,7 +23,13 @@
    23 #include <util/result.h>
    24 #include <util/feefrac.h>
    25 
    26+// This works around a bug in Boost <= 1.80.0 when using Clang >=18.
    27+// See https://github.com/bitcoin/bitcoin/issues/30751.
    28+#pragma clang diagnostic push
    


    TheCharlatan commented at 1:43 pm on September 5, 2024:
    Should this be in a #if defined(__clang__) block?

    fanquake commented at 1:44 pm on September 5, 2024:
    A bit annoying, but yea, looks like we’ll need something like that to work around the windows compiler in any case.

    fanquake commented at 1:48 pm on September 5, 2024:
    (depending on what GCC does, over the lifetime of the 28.x branch, at some point, it may turn in an #ifndef MSVC etc)
  8. fanquake force-pushed on Sep 5, 2024
  9. hebasto approved
  10. hebasto commented at 3:15 pm on September 5, 2024: member

    ACK cd062d6684908d526be7423f8f1057b891254a3c, tested on Fedora 40 using the downloaded Boost 1.74 and commands as follows:

    0$ cmake -B build -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 -DBoost_INCLUDE_DIR=/home/hebasto/boost_1_74_0
    1$ cmake --build build -t test_bitcoin
    
  11. achow101 commented at 7:30 pm on September 5, 2024: member

    ACK cd062d6684908d526be7423f8f1057b891254a3c

    Tested against Boost 1.73 and Clang 18.1.8 and the error was no longer present.

  12. achow101 merged this on Sep 5, 2024
  13. achow101 closed this on Sep 5, 2024

  14. achow101 referenced this in commit 9fc044e9a6 on Sep 5, 2024
  15. maflcko commented at 7:38 am on September 6, 2024: member

    Can you explain this change a bit better?

    The warning will be turned into a hard error in a follow-up release to clang 18.

    Testing with clang-20 shows a new warning, according to the release notes https://github.com/llvm/llvm-project/pull/102364/files#diff-ec770381d76c859f5f572db789175fe44410a72608f58ad5dbb14335ba56eb97R138

    0In file included from /b-c/src/rest.cpp:22:
    1In file included from /b-c/src/rpc/blockchain.h:13:
    2In file included from /b-c/src/validation.h:28:
    3/b-c/src/txmempool.h:30:34: warning: unknown warning group '-Wenum-constexpr-conversion', ignored [-Wunknown-warning-option]
    4   30 | #pragma clang diagnostic ignored "-Wenum-constexpr-conversion"
    5      |                                  ^
    61 warning generated.
    

    The same change also seems to imply that this specific instance is a bug in clang, not in boost. (My understanding is that -1 is a valid value of type int, assuming this is the underlying enum type, even though -1 isn’t explicitly named in the enum list)

    It may be better if the patch only worked around the clang versions that have the warning enabled (and at the same time are buggy). Otherwise, people will just complain about another warning that pops up instead when using a different version of clang.

    An alternative may be to just revert this patch and instead document that this specific combination is unsupported.

    Anyone really wanting to use those previous versions of boost may do so in combination with GCC, or a non-buggy version of Clang.

    If they really want to use an affected Clang, they can use a more recent boost from ./depends or any other source.

  16. fanquake deleted the branch on Sep 6, 2024
  17. fanquake commented at 11:08 am on September 6, 2024: member

    I had hoped we’d be able to land this workaround for 28.x (to atleast avoid compile failures, without any other changes to other dependency or compiler requirements), and then remove it in master fairly soon, by following up with either a wholesale bump to our minimum required Boost, to 1.81.0+, or I guess a clang-18+ restriction to using Boost 1.81.0+.

    I re-tested master (including this change) using Boost 1.74.0:

    • clang-18 builds with no output
    • clang-19 builds with no output (unrelated to this change, there is deprecated decleration output from libstdc++)
    • clang 20 produces warning output for the pragma, and then fails to compile

    So I’m not sure if there is some range of Clang versions we can restrict any workaround too, as, once using clang-20 or later, with Boost <= 1.81.0, this will become a hard failure, with no easy workaround. I’m also not sure if we can continue to rely on GCC going forward (maybe until 15.x ?), although that’s not clear from the upstream issue.

  18. maflcko commented at 12:55 pm on September 6, 2024: member

    clang 20 produces warning output for the pragma, and then fails to compile

    Are you sure? Compilation did pass for me this morning. Do you still happen to have the compile failure or steps to reproduce?

  19. fanquake commented at 1:17 pm on September 6, 2024: member

    Do you still happen to have the compile failure or steps to reproduce?

    Using this Clang:

    0clang++-20 --version
    1Debian clang version 20.0.0 (++20240903115437+0748f4227cd6-1~exp1~20240903115620.935)
    2Target: x86_64-pc-linux-gnu
    3Thread model: posix
    4InstalledDir: /usr/lib/llvm-20/bin
    

    and master (bbf95c0cc57147827b9f4577c641b12dd4170e78). I see:

      0cmake -B build -DCMAKE_C_COMPILER=clang-20 -DCMAKE_CXX_COMPILER=clang++-20
      1cmake --build build --verbose
      2<snip>
      3[ 72%] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/validation_chainstatemanager_tests.cpp.o
      4cd /bitcoin/build/src/test && /usr/bin/ccache /usr/bin/clang++-20 -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DBOOST_NO_CXX98_FUNCTION_BASE -I/bitcoin/build/src -I/bitcoin/src -I/bitcoin/src/univalue/include -I/bitcoin/src/minisketch/include -I/bitcoin/src/secp256k1/include -O2 -g -fPIE -fdebug-prefix-map=/bitcoin=. -fmacro-prefix-map=/bitcoin=. -Wall -Wextra -Wgnu -Wformat -Wformat-security -Wvla -Wshadow-field -Wthread-safety -Wloop-analysis -Wredundant-decls -Wunused-member-function -Wdate-time -Wconditional-uninitialized -Woverloaded-virtual -Wsuggest-override -Wimplicit-fallthrough -Wunreachable-code -Wdocumentation -Wself-assign -Wundef -Wno-unused-parameter -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -Wstack-protector -fstack-protector-all -fcf-protection=full -fstack-clash-protection -std=c++20 -MD -MT src/test/CMakeFiles/test_bitcoin.dir/validation_chainstatemanager_tests.cpp.o -MF CMakeFiles/test_bitcoin.dir/validation_chainstatemanager_tests.cpp.o.d -o CMakeFiles/test_bitcoin.dir/validation_chainstatemanager_tests.cpp.o -c /bitcoin/src/test/validation_chainstatemanager_tests.cpp  
      5In file included from /bitcoin/src/test/validation_chainstatemanager_tests.cpp:8:
      6In file included from /bitcoin/src/node/chainstatemanager_args.h:9:
      7In file included from /bitcoin/src/validation.h:28:
      8/bitcoin/src/txmempool.h:30:34: warning: unknown warning group '-Wenum-constexpr-conversion', ignored [-Wunknown-warning-option]
      9   30 | #pragma clang diagnostic ignored "-Wenum-constexpr-conversion"
     10      |                                  ^
     11In file included from /bitcoin/src/test/validation_chainstatemanager_tests.cpp:8:
     12In file included from /bitcoin/src/node/chainstatemanager_args.h:9:
     13In file included from /bitcoin/src/validation.h:28:
     14In file included from /bitcoin/src/txmempool.h:32:
     15In file included from /usr/include/boost/multi_index/hashed_index.hpp:38:
     16In file included from /usr/include/boost/multi_index/detail/node_handle.hpp:22:
     17In file included from /usr/include/boost/multi_index_container_fwd.hpp:18:
     18In file included from /usr/include/boost/multi_index/indexed_by.hpp:17:
     19In file included from /usr/include/boost/mpl/vector.hpp:36:
     20In file included from /usr/include/boost/mpl/vector/vector20.hpp:18:
     21In file included from /usr/include/boost/mpl/vector/vector10.hpp:18:
     22In file included from /usr/include/boost/mpl/vector/vector0.hpp:24:
     23In file included from /usr/include/boost/mpl/vector/aux_/clear.hpp:18:
     24In file included from /usr/include/boost/mpl/vector/aux_/vector0.hpp:22:
     25In file included from /usr/include/boost/mpl/vector/aux_/iterator.hpp:19:
     26In file included from /usr/include/boost/mpl/plus.hpp:19:
     27In file included from /usr/include/boost/mpl/aux_/arithmetic_op.hpp:17:
     28In file included from /usr/include/boost/mpl/integral_c.hpp:32:
     29/usr/include/boost/mpl/aux_/integral_wrapper.hpp:73:31: error: non-type template argument is not a constant expression
     30   73 |     typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior;
     31      |             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     32/usr/include/boost/mpl/aux_/static_cast.hpp:24:47: note: expanded from macro 'BOOST_MPL_AUX_STATIC_CAST'
     33   24 | #   define BOOST_MPL_AUX_STATIC_CAST(T, expr) static_cast<T>(expr)
     34      |                                               ^
     35/usr/include/boost/mpl/integral_c.hpp:31:54: note: expanded from macro 'AUX_WRAPPER_INST'
     36   31 | #define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< T, value >
     37      |                                                      ^~~~~
     38/usr/include/boost/numeric/conversion/detail/meta.hpp:30:46: note: in instantiation of template class 'mpl_::integral_c<boost::numeric::udt_builtin_mixture_enum, boost::numeric::builtin_to_builtin>' requested here
     39   30 |        enum { x = ( BOOST_MPL_AUX_VALUE_WKND(T1)::value == BOOST_MPL_AUX_VALUE_WKND(T2)::value ) };
     40      |                                              ^
     41/usr/include/boost/mpl/if.hpp:63:68: note: in instantiation of template class 'boost::numeric::convdetail::equal_to<mpl_::integral_c<boost::numeric::udt_builtin_mixture_enum, boost::numeric::builtin_to_builtin>, mpl_::integral_c<boost::numeric::udt_builtin_mixture_enum, boost::numeric::builtin_to_builtin>>' requested here
     42   63 |           BOOST_MPL_AUX_STATIC_CAST(bool, BOOST_MPL_AUX_VALUE_WKND(T1)::value)
     43      |                                                                    ^
     44/usr/include/boost/mpl/eval_if.hpp:37:22: note: in instantiation of template class 'boost::mpl::if_<boost::numeric::convdetail::equal_to<mpl_::integral_c<boost::numeric::udt_builtin_mixture_enum, boost::numeric::builtin_to_builtin>, mpl_::integral_c<boost::numeric::udt_builtin_mixture_enum, boost::numeric::builtin_to_builtin>>, boost::mpl::identity<boost::numeric::convdetail::get_subranged_BuiltIn2BuiltIn<unsigned long, double>>, boost::mpl::eval_if<boost::numeric::convdetail::equal_to<mpl_::integral_c<boost::numeric::udt_builtin_mixture_enum, boost::numeric::builtin_to_builtin>, mpl_::integral_c<boost::numeric::udt_builtin_mixture_enum, boost::numeric::builtin_to_udt>>, boost::mpl::identity<boost::mpl::identity<boost::numeric::convdetail::subranged_BuiltIn2Udt<unsigned long, double>>>, boost::mpl::if_<boost::numeric::convdetail::equal_to<mpl_::integral_c<boost::numeric::udt_builtin_mixture_enum, boost::numeric::builtin_to_builtin>, mpl_::integral_c<boost::numeric::udt_builtin_mixture_enum, boost::numeric::udt_to_builtin>>, boost::mpl::identity<boost::numeric::convdetail::subranged_Udt2BuiltIn<unsigned long, double>>, boost::mpl::identity<boost::numeric::convdetail::subranged_Udt2Udt<unsigned long, double>>>>>' requested here
     45   37 |     typedef typename if_<C,F1,F2>::type f_;
     46      |                      ^
     47/usr/include/boost/numeric/conversion/detail/meta.hpp:81:12: note: in instantiation of template class 'boost::mpl::eval_if<boost::numeric::convdetail::equal_to<mpl_::integral_c<boost::numeric::udt_builtin_mixture_enum, boost::numeric::builtin_to_builtin>, mpl_::integral_c<boost::numeric::udt_builtin_mixture_enum, boost::numeric::builtin_to_builtin>>, boost::mpl::identity<boost::numeric::convdetail::get_subranged_BuiltIn2BuiltIn<unsigned long, double>>, boost::mpl::eval_if<boost::numeric::convdetail::equal_to<mpl_::integral_c<boost::numeric::udt_builtin_mixture_enum, boost::numeric::builtin_to_builtin>, mpl_::integral_c<boost::numeric::udt_builtin_mixture_enum, boost::numeric::builtin_to_udt>>, boost::mpl::identity<boost::mpl::identity<boost::numeric::convdetail::subranged_BuiltIn2Udt<unsigned long, double>>>, boost::mpl::if_<boost::numeric::convdetail::equal_to<mpl_::integral_c<boost::numeric::udt_builtin_mixture_enum, boost::numeric::builtin_to_builtin>, mpl_::integral_c<boost::numeric::udt_builtin_mixture_enum, boost::numeric::udt_to_builtin>>, boost::mpl::identity<boost::numeric::convdetail::subranged_Udt2BuiltIn<unsigned long, double>>, boost::mpl::identity<boost::numeric::convdetail::subranged_Udt2Udt<unsigned long, double>>>>>' requested here
     48   81 |       mpl::eval_if<is_case0,Case0TypeQ,choose_1_2_3Q>::type
     49      |            ^
     50/usr/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp:41:7: note: in instantiation of template class 'boost::numeric::convdetail::ct_switch4<mpl_::integral_c<boost::numeric::udt_builtin_mixture_enum, boost::numeric::builtin_to_builtin>, mpl_::integral_c<boost::numeric::udt_builtin_mixture_enum, boost::numeric::builtin_to_builtin>, mpl_::integral_c<boost::numeric::udt_builtin_mixture_enum, boost::numeric::builtin_to_udt>, mpl_::integral_c<boost::numeric::udt_builtin_mixture_enum, boost::numeric::udt_to_builtin>, boost::numeric::convdetail::get_subranged_BuiltIn2BuiltIn<unsigned long, double>, boost::mpl::identity<boost::numeric::convdetail::subranged_BuiltIn2Udt<unsigned long, double>>, boost::mpl::identity<boost::numeric::convdetail::subranged_Udt2BuiltIn<unsigned long, double>>, boost::mpl::identity<boost::numeric::convdetail::subranged_Udt2Udt<unsigned long, double>>>' requested here
     51   41 |       ct_switch4<UdtMixture
     52      |       ^
     53/usr/include/boost/numeric/conversion/detail/is_subranged.hpp:205:9: note: (skipping 3 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
     54  205 |         for_udt_builtin_mixture<udt_builtin_mixture, BuiltIn2BuiltInQ, BuiltIn2UdtQ, Udt2BuiltInQ, Udt2UdtQ>::type
     55      |         ^
     56/usr/include/boost/numeric/conversion/conversion_traits.hpp:22:7: note: in instantiation of template class 'boost::numeric::convdetail::non_trivial_traits_impl<unsigned long, double>' requested here
     57   22 |     : convdetail::get_conversion_traits<T,S>::type 
     58      |       ^
     59/usr/include/boost/test/tools/old/impl.hpp:284:31: note: in instantiation of template class 'boost::numeric::conversion_traits<unsigned long, double>' requested here
     60  284 |     typedef typename numeric::conversion_traits<FPT1,FPT2>::supertype type;
     61      |                               ^
     62/usr/include/boost/test/tools/old/impl.hpp:304:53: note: in instantiation of template class 'boost::test_tools::tt_detail::comp_supertype<unsigned long, double>' requested here
     63  304 |         fpc::close_at_tolerance<typename tt_detail::comp_supertype<FPT1,FPT2>::type> pred( tolerance, fpc::FPC_STRONG );
     64      |                                                     ^
     65/usr/include/boost/test/tools/old/impl.hpp:92:50: note: in instantiation of function template specialization 'boost::test_tools::check_is_close_t::operator()<unsigned long, double, boost::math::fpc::percent_tolerance_t<int>>' requested here
     66   92 | BOOST_PP_REPEAT( BOOST_TEST_MAX_PREDICATE_ARITY, IMPL_FRWD, _ )
     67      |                                                  ^
     68/usr/include/boost/preprocessor/repetition/repeat.hpp:29:26: note: expanded from macro 'BOOST_PP_REPEAT'
     69   29 | # define BOOST_PP_REPEAT BOOST_PP_CAT(BOOST_PP_REPEAT_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4))
     70      |                          ^
     71/usr/include/boost/preprocessor/cat.hpp:22:32: note: expanded from macro 'BOOST_PP_CAT'
     72   22 | #    define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b)
     73      |                                ^
     74/usr/include/boost/preprocessor/cat.hpp:29:34: note: expanded from macro 'BOOST_PP_CAT_I'
     75   29 | #    define BOOST_PP_CAT_I(a, b) a ## b
     76      |                                  ^
     77<scratch space>:160:1: note: expanded from here
     78  160 | BOOST_PP_REPEAT_1
     79      | ^
     80/bitcoin/src/test/validation_chainstatemanager_tests.cpp:158:5: note: in instantiation of function template specialization 'boost::test_tools::tt_detail::check_frwd<boost::test_tools::check_is_close_t, unsigned long, double, boost::math::fpc::percent_tolerance_t<int>>' requested here
     81  158 |     BOOST_CHECK_CLOSE(c1.m_coinstip_cache_size_bytes, max_cache * 0.05, 1);
     82      |     ^
     83/usr/include/boost/test/tools/old/interface.hpp:208:45: note: expanded from macro 'BOOST_CHECK_CLOSE'
     84  208 | #define BOOST_CHECK_CLOSE( L, R, T )        BOOST_TEST_TOOL_IMPL( 0, \
     85      |                                             ^
     86/usr/include/boost/test/tools/old/interface.hpp:67:47: note: expanded from macro 'BOOST_TEST_TOOL_IMPL'
     87   67 |     BOOST_PP_IF( frwd_type, report_assertion, check_frwd ) (                    \
     88      |                                               ^
     89/usr/include/boost/mpl/aux_/integral_wrapper.hpp:73:31: note: integer value -1 is outside the valid range of values [0, 3] for the enumeration type 'udt_builtin_mixture_enum'
     90   73 |     typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior;
     91      |                               ^
     92/usr/include/boost/mpl/aux_/static_cast.hpp:24:47: note: expanded from macro 'BOOST_MPL_AUX_STATIC_CAST'
     93   24 | #   define BOOST_MPL_AUX_STATIC_CAST(T, expr) static_cast<T>(expr)
     94      |                                               ^
     95In file included from /bitcoin/src/test/validation_chainstatemanager_tests.cpp:29:
     96In file included from /usr/include/boost/test/unit_test.hpp:18:
     97In file included from /usr/include/boost/test/test_tools.hpp:46:
     98/usr/include/boost/test/tools/old/impl.hpp:285:30: error: static assertion failed due to requirement '!is_integral<unsigned long>::value': Only floating-point types can be compared!
     99  285 |     BOOST_STATIC_ASSERT_MSG( !is_integral<type>::value, "Only floating-point types can be compared!");
    100      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~
    101/usr/include/boost/static_assert.hpp:31:59: note: expanded from macro 'BOOST_STATIC_ASSERT_MSG'
    102   31 | #     define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__)
    103      |                                                           ^~~~~~~~~~~
    104/usr/include/boost/test/tools/old/impl.hpp:304:53: note: in instantiation of template class 'boost::test_tools::tt_detail::comp_supertype<unsigned long, double>' requested here
    105  304 |         fpc::close_at_tolerance<typename tt_detail::comp_supertype<FPT1,FPT2>::type> pred( tolerance, fpc::FPC_STRONG );
    106      |                                                     ^
    107/usr/include/boost/test/tools/old/impl.hpp:92:50: note: in instantiation of function template specialization 'boost::test_tools::check_is_close_t::operator()<unsigned long, double, boost::math::fpc::percent_tolerance_t<int>>' requested here
    108   92 | BOOST_PP_REPEAT( BOOST_TEST_MAX_PREDICATE_ARITY, IMPL_FRWD, _ )
    109      |                                                  ^
    110/usr/include/boost/preprocessor/repetition/repeat.hpp:29:26: note: expanded from macro 'BOOST_PP_REPEAT'
    111   29 | # define BOOST_PP_REPEAT BOOST_PP_CAT(BOOST_PP_REPEAT_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4))
    112      |                          ^
    113/usr/include/boost/preprocessor/cat.hpp:22:32: note: expanded from macro 'BOOST_PP_CAT'
    114   22 | #    define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b)
    115      |                                ^
    116/usr/include/boost/preprocessor/cat.hpp:29:34: note: expanded from macro 'BOOST_PP_CAT_I'
    117   29 | #    define BOOST_PP_CAT_I(a, b) a ## b
    118      |                                  ^
    119<scratch space>:160:1: note: expanded from here
    120  160 | BOOST_PP_REPEAT_1
    121      | ^
    122/bitcoin/src/test/validation_chainstatemanager_tests.cpp:158:5: note: in instantiation of function template specialization 'boost::test_tools::tt_detail::check_frwd<boost::test_tools::check_is_close_t, unsigned long, double, boost::math::fpc::percent_tolerance_t<int>>' requested here
    123  158 |     BOOST_CHECK_CLOSE(c1.m_coinstip_cache_size_bytes, max_cache * 0.05, 1);
    124      |     ^
    125/usr/include/boost/test/tools/old/interface.hpp:208:45: note: expanded from macro 'BOOST_CHECK_CLOSE'
    126  208 | #define BOOST_CHECK_CLOSE( L, R, T )        BOOST_TEST_TOOL_IMPL( 0, \
    127      |                                             ^
    128/usr/include/boost/test/tools/old/interface.hpp:67:47: note: expanded from macro 'BOOST_TEST_TOOL_IMPL'
    129   67 |     BOOST_PP_IF( frwd_type, report_assertion, check_frwd ) (                    \
    130      |                                               ^
    1311 warning and 2 errors generated.
    132gmake[2]: *** [src/test/CMakeFiles/test_bitcoin.dir/build.make:1638: src/test/CMakeFiles/test_bitcoin.dir/validation_chainstatemanager_tests.cpp.o] Error 1
    133gmake[2]: Leaving directory '/bitcoin/build'
    134gmake[1]: *** [CMakeFiles/Makefile2:2143: src/test/CMakeFiles/test_bitcoin.dir/all] Error 2
    135gmake[1]: Leaving directory '/bitcoin/build'
    136gmake: *** [Makefile:146: all] Error 2
    
  20. maflcko commented at 1:22 pm on September 6, 2024: member
    Ok, I may have only compiled bitcoind. If the error is only in the tests, I wonder if the tests can simply be rewritten. I’ll take another look later.
  21. maflcko commented at 1:59 pm on September 6, 2024: member
    I still haven’t tested this, but the draft at #30834 may or may not work around the test compilation error.
  22. maflcko removed the label Needs backport (28.x) on Sep 9, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-22 09:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me