build: Avoid `BOOST_NO_CXX98_FUNCTION_BASE` macro redefinition #26952

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:230123-boost changing 1 files +5 −3
  1. hebasto commented at 1:59 PM on January 23, 2023: member

    With GCC 12 and Boost 1.81 (from depends) having multiple warnings:

    In file included from /home/hebasto/bitcoin/depends/x86_64-pc-linux-gnu/include/boost/config.hpp:48:
    /home/hebasto/bitcoin/depends/x86_64-pc-linux-gnu/include/boost/config/stdlib/libstdcpp3.hpp:397:9: warning: 'BOOST_NO_CXX98_FUNCTION_BASE' macro redefined [-Wmacro-redefined]
    #define BOOST_NO_CXX98_FUNCTION_BASE
            ^
    <command line>:8:9: note: previous definition is here
    #define BOOST_NO_CXX98_FUNCTION_BASE 1
            ^
    1 warning generated.
    

    This PR fixes those warnings.

    Defining of the BOOST_NO_CXX98_FUNCTION_BASE macro was introduced in #25436, but since https://github.com/boostorg/config/pull/430, it is required to check it before adding.

  2. DrahtBot commented at 1:59 PM on January 23, 2023: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK fanquake

    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 Jan 23, 2023
  4. in configure.ac:1485 in 387a99ddb2 outdated
    1483 | -  dnl See: https://github.com/boostorg/container_hash/issues/22.
    1484 | -  BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_CXX98_FUNCTION_BASE"
    1485 | +  dnl and will generate warnings with newer compilers for Boost
    1486 | +  dnl older then 1.80.
    1487 | +  dnl See:
    1488 | +  dnl   - https://github.com/boostorg/container_hash/issues/22
    


    fanquake commented at 11:20 AM on January 24, 2023:

    We only need to link to a single upstream issue, probably https://github.com/boostorg/config/pull/430.


    hebasto commented at 11:47 AM on January 24, 2023:

    Thanks! Updated.

  5. hebasto force-pushed on Jan 24, 2023
  6. hebasto commented at 11:47 AM on January 24, 2023: member

    Updated 387a99ddb2fd2da4e37a99b370eea5ae6df64c68 -> bb76ac411c45991ace51e14f2c685d138ca146bf (pr26952.01 -> pr26952.02, diff):

  7. fanquake commented at 4:40 PM on January 28, 2023: member

    I don't think this works? BOOST_NO_CXX98_FUNCTION_BASE is still set when using Boost 1.81.0 and GCC 12. So you still get the warnings. i.e with this branch (rebased on master):

    # gcc-12 (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0
    make -C depends/ CC=gcc-12 CXX=g++-12
    ./autogen.sh
    CONFIG_SITE=/home/ubuntu/bitcoin/depends/x86_64-pc-linux-gnu/share/config.site ./configure
    checking whether BOOST_NO_CXX98_FUNCTION_BASE macro definition is needed... yes
    make -j9
    ...
    In file included from /home/ubuntu/bitcoin/depends/x86_64-pc-linux-gnu/include/boost/config.hpp:48,
                     from /home/ubuntu/bitcoin/depends/x86_64-pc-linux-gnu/include/boost/multi_index/hashed_index.hpp:16,
                     from ./txmempool.h:35,
                     from blockencodings.cpp:13:
    /home/ubuntu/bitcoin/depends/x86_64-pc-linux-gnu/include/boost/config/stdlib/libstdcpp3.hpp:397: warning: "BOOST_NO_CXX98_FUNCTION_BASE" redefined
      397 | #define BOOST_NO_CXX98_FUNCTION_BASE
          | 
    
  8. build: Avoid `BOOST_NO_CXX98_FUNCTION_BASE` macro redefinition d4c59da8d6
  9. hebasto force-pushed on Jan 28, 2023
  10. hebasto commented at 5:09 PM on January 28, 2023: member

    I don't think this works?

    Thanks! Should be fixed now.

  11. fanquake approved
  12. fanquake commented at 2:53 PM on January 31, 2023: member

    ACK d4c59da8d6e3aac14306249aa12332fed55efebd - it works now.

  13. fanquake merged this on Jan 31, 2023
  14. fanquake closed this on Jan 31, 2023

  15. hebasto deleted the branch on Jan 31, 2023
  16. sidhujag referenced this in commit 38923405aa on Jan 31, 2023
  17. bitcoin locked this on Jan 31, 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: 2026-04-24 21:13 UTC

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