Build: configure stops with a clear message on GCC older than 11
GCC 8 (the RHEL/Rocky 8 system compiler) configured but failed minutes into the build with "CUB requires at least C++17". The configure now refuses it and names gcc-toolset-13. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HVeDQsU5a8AJUdJPgWevAK
This commit is contained in:
1 parent
e34e9e775f
commit
ec36cb8d3d
2 files changed
+9
-1
No files matched your search
@@ -21,6 +21,14 @@ INCLUDE(GNUInstallDirs)
|
||||
SET(CMAKE_CXX_STANDARD 20)
|
||||
SET(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
|
||||
# GCC older than 11 accepts the configure but fails deep in the build (CUB, the C++20 headers), e.g.
|
||||
# the system GCC 8 of RHEL/Rocky 8; stop here instead and say which compiler to use.
|
||||
IF (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11)
|
||||
MESSAGE(FATAL_ERROR "GCC ${CMAKE_CXX_COMPILER_VERSION} is too old: GCC 11 or newer is required. "
|
||||
"On RHEL/Rocky 8 install gcc-toolset-13 and run 'source /opt/rh/gcc-toolset-13/enable' "
|
||||
"before cmake, in a fresh build directory.")
|
||||
ENDIF()
|
||||
|
||||
# The Metal Bragg integration engine (image_analysis/bragg_integration) is Objective-C++. Enabled here,
|
||||
# above every target that links it, as enable_language asks.
|
||||
IF (APPLE)
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ CUDA requirements of each released package.
|
||||
|
||||
## Software dependencies
|
||||
Required:
|
||||
* C++20 compiler and C++20 standard library; recommended GCC 11+ or clang 14+ (Intel OneAPI and AMD AOCC also work)
|
||||
* C++20 compiler and C++20 standard library: GCC 11 or newer (checked at configure time; on RHEL/Rocky 8 use gcc-toolset-13), or clang 14+ (Intel OneAPI and AMD AOCC also work)
|
||||
* CMake version 3.26 or newer + a build tool (GNU make or Ninja)
|
||||
|
||||
HDF5, libtiff, zlib and Eigen used to be required system packages; they are now
|
||||
|
||||
Reference in new issue
Block a user