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.
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-
arik-so commented at 6:04 PM on April 21, 2026: none
-
f3d260b1e4
Add explicit constructor for Entry
The compilation of mempool.cpp was failing on macOS, and the explicit constructor should remedy that.
-
2147a3b556
Add explicit constructor for ConnectedBlock
The compilation of validation.cpp was failing on macOS, and the explicit constructor should remedy that.
-
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-->
-
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 -
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?
-
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.
-
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.
-
arik-so commented at 9:54 PM on April 21, 2026: none
Xcode 16.4 with clang 17.0.0 works.
- arik-so closed this on Apr 21, 2026
-
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.mdCall 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.mdCall 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.