@@ -113,49 +113,6 @@ ensure_source_directory() {
113113 tar xf " ${ARCHIVE_BASE_NAME} " .tar.gz
114114}
115115
116- check_compiler () {
117- echo " --- Verifying Build Environment ---"
118-
119- # Check for minimum CMake version (e.g., 3.25)
120- MIN_CMAKE_VERSION=" 3.25"
121- CMAKE_VERSION=$( cmake --version | head -n1 | grep -oE ' [0-9]+\.[0-9]+\.[0-9]+' )
122- echo " Found CMake version: $CMAKE_VERSION "
123- if [ " $( printf ' %s\n' " ${MIN_CMAKE_VERSION} " " ${CMAKE_VERSION} " | sort -V | head -n1) " != " ${MIN_CMAKE_VERSION} " ]; then
124- echo " ERROR: CMake ${MIN_CMAKE_VERSION} or higher is required, but found ${CMAKE_VERSION} ."
125- exit 1
126- fi
127-
128- # Check for C++23 compliant compiler
129- local compiler_ok=0
130- if command -v g++ > /dev/null 2>&1 ; then
131- # Get major version: g++ (Debian 13.2.0-4) 13.2.0 -> 13
132- GCC_MAJOR_VERSION=$( g++ -dumpversion | cut -d. -f1)
133- echo " Found GCC version: $( g++ --version | head -n1) "
134- # GCC 13 is the first version with full C++23 support
135- if [ " ${GCC_MAJOR_VERSION} " -ge 13 ]; then
136- echo " GCC version is sufficient for C++23."
137- compiler_ok=1
138- fi
139- fi
140-
141- if [ " ${compiler_ok} " -eq 0 ] && command -v clang++ > /dev/null 2>&1 ; then
142- CLANG_MAJOR_VERSION=$( clang++ --version | head -n1 | grep -oE ' [0-9]+' | head -n1)
143- echo " Found Clang version: $( clang++ --version | head -n1) "
144- # Clang 16 is the first version with full C++23 support
145- if [ " ${CLANG_MAJOR_VERSION} " -ge 16 ]; then
146- echo " Clang version is sufficient for C++23."
147- compiler_ok=1
148- fi
149- fi
150-
151- if [ " ${compiler_ok} " -eq 0 ]; then
152- echo " ERROR: No C++23 compliant compiler found (GCC 13+ or Clang 16+ required)."
153- exit 1
154- fi
155-
156- echo " --- Environment check passed ---"
157- }
158-
159116test_source_distribution () {
160117 echo " Building and testing Apache Iceberg C++..."
161118
@@ -185,7 +142,6 @@ cd "${VERIFY_TMPDIR}"
185142import_gpg_keys
186143fetch_archive
187144ensure_source_directory
188- check_compiler
189145pushd " ${ARCHIVE_BASE_NAME} "
190146test_source_distribution
191147popd
0 commit comments