Summary
CMake-3.31.8-GCCcore-14.3.0.eb (and 4.0.3-GCCcore-14.3.0, likely the same root
cause) fails to bootstrap on Intel CPUs where -march=native enables -mavx10.1
(Granite Rapids, future Sapphire Rapids etc.). Bootstrap dies with:
CMake Error at CMakeLists.txt:93 (message):
The C++ compiler does not support C++11 (e.g. std::unique_ptr).
— even though the compiler does support C++11 and the test programs compile +
link + run by hand.
Affected configuration
- CMake version: 3.31.8 (3.31.3 works); 4.0.3 presumed affected (same
empty-install symptom, not yet confirmed)
- Toolchain: GCCcore-14.3.0 (foss-2025b)
- Host CPU: Intel Granite Rapids (Xeon 6760P) — any Intel chip where
-march=native enables -mavx10.1
- EB: 5.2.1 (also reproduces with 5.1.x, 5.3.0)
- AMD Zen4 / Zen5: unaffected (the trigger warning never appears)
Root cause
Source/Checks/cm_cxx_features.cmake applies a chain of string(REGEX REPLACE
...) filters to strip known warning lines from check output (ninja, ld,
MSBuild, distcc, …), then runs a catch-all:
If using the feature causes warnings, treat it as broken/unavailable.
if(check_output MATCHES "(^|[ :])[Ww][Aa][Rr][Nn][Ii][Nn][Gg]")
set(CMake_HAVE_CXX_${FEATURE} OFF CACHE INTERNAL "TRY_COMPILE" FORCE)
endif()
The filter list does not strip cc1plus: warning: from GCC. On Granite Rapids,
GCC 14.3 emits on every compile:
cc1plus: warning: '-mavx10.1' is aliased to 512 bit since GCC14.3
…because -march=native enables -mavx10.1. The line passes every filter and
triggers the catch-all, marking make_unique, unique_ptr, and filesystem all as
"broken" — bootstrap aborts at CMakeLists.txt:93.
Reproducer
On a Granite Rapids host (or any Intel CPU that enables -mavx10.1 via
-march=native):
module load EasyBuild/5.2.1
eb CMake-3.31.8-GCCcore-14.3.0.eb
Watch CMakeFiles/CMakeError.log under the build dir:
each cm_cxx_*.cxx try_compile transcript contains
"cc1plus: warning: '-mavx10.1' is aliased to 512 bit since GCC14.3"
and CMake declares the feature broken.
Compile + link + execute of the same Source/Checks/cm_cxx_make_unique.cxx by
hand exits 0. A try_compile() of the same source from a custom CMakeLists.txt
(which bypasses cm_check_cxx_feature) also succeeds — even with the half-built
Bootstrap.cmk/cmake (3.31.8's own check binary) as the driver. So the failure
is specifically in cm_check_cxx_feature's warning-filter logic, not the
compiler chain.
Suggested fix (verified locally)
Add one filter line to the chain in Source/Checks/cm_cxx_features.cmake:
# Filter out distcc.
string(REGEX REPLACE "[^\n]*distcc\\[[0-9]+\\][^\n]*[Ww]arning:[^\n]*" ""
check_output "${check_output}")
-
Filter out GCC's benign "-mavx10.x is aliased to N bit" cc1/cc1plus
warnings.
- string(REGEX REPLACE "[^\n]cc1[a-z]: warning: '-mavx10\.[0-9]+' is
aliased to[^\n]*" "" check_output "${check_output}")
If using the feature causes warnings, treat it as broken/unavailable.
if(check_output MATCHES "(^|[ :])[Ww][Aa][Rr][Nn][Ii][Nn][Gg]")
End-to-end verified: with this patch in place,
cm_check_cxx_feature(make_unique) and (filesystem) return yes, and Configuring
done. Build proceeds normally.
Upstream
The bug is in CMake itself — the filter list is missing cc1plus:. Worth filing
at Kitware/CMake too. For EB users, a downstream patch in the EB recipes
seems like the right interim fix until upstream addresses it.
Workarounds without patching
- Use CMake-3.31.3-GCCcore-14.3.0 (predates whatever filter-list change
introduced the regression; works fine on Granite Rapids).
- Override optarch for the CMake build so -mavx10.1 is never enabled
(toolchainopts = {'optarch': '-march=x86-64-v3'} or similar). Loses Granite
Rapids tuning of the CMake binary, which is fine — CMake is a build tool.
Summary
CMake-3.31.8-GCCcore-14.3.0.eb (and 4.0.3-GCCcore-14.3.0, likely the same root
cause) fails to bootstrap on Intel CPUs where -march=native enables -mavx10.1
(Granite Rapids, future Sapphire Rapids etc.). Bootstrap dies with:
CMake Error at CMakeLists.txt:93 (message):
The C++ compiler does not support C++11 (e.g. std::unique_ptr).
— even though the compiler does support C++11 and the test programs compile +
link + run by hand.
Affected configuration
empty-install symptom, not yet confirmed)
-march=native enables -mavx10.1
Root cause
Source/Checks/cm_cxx_features.cmake applies a chain of string(REGEX REPLACE
...) filters to strip known warning lines from check output (ninja, ld,
MSBuild, distcc, …), then runs a catch-all:
If using the feature causes warnings, treat it as broken/unavailable.
if(check_output MATCHES "(^|[ :])[Ww][Aa][Rr][Nn][Ii][Nn][Gg]")
set(CMake_HAVE_CXX_${FEATURE} OFF CACHE INTERNAL "TRY_COMPILE" FORCE)
endif()
The filter list does not strip cc1plus: warning: from GCC. On Granite Rapids,
GCC 14.3 emits on every compile:
cc1plus: warning: '-mavx10.1' is aliased to 512 bit since GCC14.3
…because -march=native enables -mavx10.1. The line passes every filter and
triggers the catch-all, marking make_unique, unique_ptr, and filesystem all as
"broken" — bootstrap aborts at CMakeLists.txt:93.
Reproducer
On a Granite Rapids host (or any Intel CPU that enables -mavx10.1 via
-march=native):
module load EasyBuild/5.2.1
eb CMake-3.31.8-GCCcore-14.3.0.eb
Watch CMakeFiles/CMakeError.log under the build dir:
each cm_cxx_*.cxx try_compile transcript contains
"cc1plus: warning: '-mavx10.1' is aliased to 512 bit since GCC14.3"
and CMake declares the feature broken.
Compile + link + execute of the same Source/Checks/cm_cxx_make_unique.cxx by
hand exits 0. A try_compile() of the same source from a custom CMakeLists.txt
(which bypasses cm_check_cxx_feature) also succeeds — even with the half-built
Bootstrap.cmk/cmake (3.31.8's own check binary) as the driver. So the failure
is specifically in cm_check_cxx_feature's warning-filter logic, not the
compiler chain.
Suggested fix (verified locally)
Add one filter line to the chain in Source/Checks/cm_cxx_features.cmake:
check_output "${check_output}")
Filter out GCC's benign "-mavx10.x is aliased to N bit" cc1/cc1plus
warnings.
aliased to[^\n]*" "" check_output "${check_output}")
If using the feature causes warnings, treat it as broken/unavailable.
if(check_output MATCHES "(^|[ :])[Ww][Aa][Rr][Nn][Ii][Nn][Gg]")End-to-end verified: with this patch in place,
cm_check_cxx_feature(make_unique) and (filesystem) return yes, and Configuring
done. Build proceeds normally.
Upstream
The bug is in CMake itself — the filter list is missing cc1plus:. Worth filing
at Kitware/CMake too. For EB users, a downstream patch in the EB recipes
seems like the right interim fix until upstream addresses it.
Workarounds without patching
introduced the regression; works fine on Granite Rapids).
(toolchainopts = {'optarch': '-march=x86-64-v3'} or similar). Loses Granite
Rapids tuning of the CMake binary, which is fine — CMake is a build tool.