Fix compilation errors on macOS 15 by adding explicit constructors #35134

pull arik-so wants to merge 2 commits into bitcoin:master from arik-so:mempool-entry-explicit-constructor changing 2 files +4 −0
  1. arik-so commented at 6:04 PM on April 21, 2026: none

    On macOS 15, with clang version 15.0.0, compilation was failing at mempool.cpp and validation.cpp. Adding explicit constructors to the ConnectedBlock and Entry structs appears to have remedied that.

  2. Add explicit constructor for Entry
    The compilation of mempool.cpp was failing on macOS, and
    the explicit constructor should remedy that.
    f3d260b1e4
  3. Add explicit constructor for ConnectedBlock
    The compilation of validation.cpp was failing on macOS, and
    the explicit constructor should remedy that.
    2147a3b556
  4. DrahtBot commented at 6:04 PM on April 21, 2026: 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. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. arik-so commented at 6:17 PM on April 21, 2026: none

    I am not 100% sure how to test this specific change. Do you think testing against clang 15 in the CI matrix would do the trick, @fanquake?

  6. maflcko commented at 7:27 PM on April 21, 2026: member

    You'll have to upgrade your XCode, See: https://developer.apple.com/documentation/xcode-release-notes/xcode-16_2-release-notes

    E.g.

              sudo xcode-select --switch /Applications/Xcode_16.2.app
          
    
  7. arik-so commented at 7:31 PM on April 21, 2026: none

    I will certainly be upgrading my Xcode. In the interim, I take it I should abandon this fix for version 15?

  8. maflcko commented at 7:42 PM on April 21, 2026: member

    Yes, I think you are better off with a more recent version of XCode, than trying to modify the source code to work with older XCode versions that aren't tested by anyone (not even the CI).

    If upgrading your XCode works, then I think this can be closed.

  9. arik-so commented at 8:02 PM on April 21, 2026: none

    I will report back once I have the upgraded command line tools installed and tested the build.

  10. arik-so commented at 9:54 PM on April 21, 2026: none

    Xcode 16.4 with clang 17.0.0 works.

  11. arik-so closed this on Apr 21, 2026

  12. vasild commented at 8:38 AM on April 22, 2026: contributor

    @arik-so, would be cool if you can test #34580 and post your feedback there.

  13. arik-so commented at 1:34 AM on April 25, 2026: none

    Hi @vasild, I switched back to the old clang version and gave it a try, with the following output:

    -- Checking for required C++ features CMake Error at cmake/module/CheckCXXFeatures.cmake:32 (message): Compiler lacks Class Template Argument Deduction (CTAD) for aggregates.

    This C++ feature is required for src/util/overloaded.h.

    You are probably using an old compiler version

    The recommended compiler versions can be checked in:

    - GCC -> doc/dependencies.md#compiler
    - Clang -> doc/dependencies.md#compiler
    - MSVC -> doc/build-windows-msvc.md

    Call Stack (most recent call first): CMakeLists.txt:198 (check_cxx_features)

    -- Configuring incomplete, errors occurred! -- Checking for required C++ features CMake Error at cmake/module/CheckCXXFeatures.cmake:32 (message): Compiler lacks Class Template Argument Deduction (CTAD) for aggregates.

    This C++ feature is required for src/util/overloaded.h.

    You are probably using an old compiler version

    The recommended compiler versions can be checked in:

    - GCC -> doc/dependencies.md#compiler
    - Clang -> doc/dependencies.md#compiler
    - MSVC -> doc/build-windows-msvc.md

    Call Stack (most recent call first): CMakeLists.txt:198 (check_cxx_features)

    -- Configuring incomplete, errors occurred! make: *** [cmake_check_build_system] Error 1

    So looks like the feature checking worked.


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-27 09:12 UTC

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