[Tool] update toolchain to 20240831 (#50517)

Signed-off-by: Kevin Xiaohua Cai <caixiaohua@starrocks.com>
Signed-off-by: stdpain <drfeng08@gmail.com>
Co-authored-by: stdpain <drfeng08@gmail.com>
This commit is contained in:
Kevin Cai 2024-09-09 20:49:20 +08:00 committed by GitHub
parent 2b36290ab4
commit 5db79c8c68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 88 additions and 10 deletions

View File

@ -30,7 +30,7 @@ ARG GITHUB_TOKEN
# the root directory to build the project
ARG BUILD_ROOT=/build
FROM starrocks/toolchains-${distro}:main-20231123 as base
FROM starrocks/toolchains-${distro}:main-20240831 as base
ENV STARROCKS_THIRDPARTY=/var/local/thirdparty
WORKDIR /

View File

@ -83,7 +83,7 @@ check_prerequest() {
# echo if gcc version is greater than 14.0.0
# else echo ""
echo_gt_gcc14() {
local version=$($CC -dumpfullversion | grep -oP '(?<=\s)\d+\.\d+\.\d+' | head -1)
local version=$($CC --version | grep -oP '(?<=\s)\d+\.\d+\.\d+' | head -1)
if [[ $(echo -e "14.0.0\n$version" | sort -V | tail -1) == "14.0.0" ]]; then
echo ""
else
@ -600,7 +600,7 @@ build_rocksdb() {
CFLAGS= \
EXTRA_CFLAGS="-I ${TP_INCLUDE_DIR} -I ${TP_INCLUDE_DIR}/snappy -I ${TP_INCLUDE_DIR}/lz4 -L${TP_LIB_DIR} ${FILE_PREFIX_MAP_OPTION}" \
EXTRA_CXXFLAGS=$(echo_opts_gcc14 -Wno-error=redundant-move)" -fPIC -Wno-deprecated-copy -Wno-stringop-truncation -Wno-pessimizing-move -I ${TP_INCLUDE_DIR} -I ${TP_INCLUDE_DIR}/snappy ${FILE_PREFIX_MAP_OPTION}" \
EXTRA_CXXFLAGS=$(echo_gt_gcc14 -Wno-error=redundant-move)" -fPIC -Wno-deprecated-copy -Wno-stringop-truncation -Wno-pessimizing-move -I ${TP_INCLUDE_DIR} -I ${TP_INCLUDE_DIR}/snappy ${FILE_PREFIX_MAP_OPTION}" \
EXTRA_LDFLAGS="-static-libstdc++ -static-libgcc" \
PORTABLE=1 make USE_RTTI=1 -j$PARALLEL static_lib
@ -665,8 +665,8 @@ build_flatbuffers() {
cd $BUILD_DIR
rm -rf CMakeCache.txt CMakeFiles/
export CXXFLAGS="-O3 -fno-omit-frame-pointer -fPIC -g " $(echo_opts_gcc14 "-Wno-error=stringop-overread")
export CPPFLAGS="-O3 -fno-omit-frame-pointer -fPIC -g " $(echo_opts_gcc14 "-Wno-error=stringop-overread")
export CXXFLAGS="-O3 -fno-omit-frame-pointer -fPIC -g "$(echo_gt_gcc14 "-Wno-error=stringop-overread")
export CPPFLAGS="-O3 -fno-omit-frame-pointer -fPIC -g "$(echo_gt_gcc14 "-Wno-error=stringop-overread")
LDFLAGS="-static-libstdc++ -static-libgcc" \
${CMAKE_CMD} .. -G "${CMAKE_GENERATOR}" -DFLATBUFFERS_BUILD_TESTS=OFF

View File

@ -409,8 +409,8 @@ if [ ! -f $PATCHED_MARK ] && [ $MARIADB_SOURCE = "mariadb-connector-c-3.2.5" ];
touch $PATCHED_MARK
echo "Finished patching $MARIADB_SOURCE"
fi
if [ ! -f $PATCHED_MARK ] && [ $MARIADB_SOURCE = "mariadb-connector-c-3.1.4" ]; then
patch -p0 < $TP_PATCH_DIR/mariadb-connector-c-3.1.4-gcc14.patch
if [ ! -f $PATCHED_MARK ] && [ $MARIADB_SOURCE = "mariadb-connector-c-3.1.14" ]; then
patch -p1 < $TP_PATCH_DIR/mariadb-connector-c-3.1.14-gcc14.patch
touch $PATCHED_MARK
echo "Finished patching $MARIADB_SOURCE"
fi
@ -463,9 +463,11 @@ cd -
echo "Finished patching $VPACK_SOURCE"
# patch avro-c
cd $TP_SOURCE_DIR/$AVRO_SOURCE/lang/c
if [ ! -f $PATCHED_MARK ] && [ $AVRO_SOURCE = "avro-release-1.10.2" ]; then
touch $PATCHED_MARK
cd $TP_SOURCE_DIR/$AVRO_SOURCE/lang/c
patch -p0 < $TP_PATCH_DIR/avro-1.10.2.c.patch
cd $TP_SOURCE_DIR/$AVRO_SOURCE
cp $TP_PATCH_DIR/avro-1.10.2.c.findjansson.patch $TP_SOURCE_DIR/$AVRO_SOURCE/lang/c/Findjansson.cmake
patch -p1 < $TP_PATCH_DIR/avro-1.10.2.c.gcc14.patch
touch $PATCHED_MARK
@ -492,6 +494,14 @@ fi
echo "Finished patching $SASL_SOURCE"
cd -
cd $TP_SOURCE_DIR/$RAPIDJSON_SOURCE
if [ ! -f $PATCHED_MARK ] && [ $RAPIDJSON_SOURCE = "rapidjson-1.1.0" ]; then
patch -p1 < $TP_PATCH_DIR/rapidjson-gcc14.patch
touch $PATCHED_MARK
fi
echo "Finished patching $RAPIDJSON_SOURCE"
cd -
# patch arrow
if [[ -d $TP_SOURCE_DIR/$ARROW_SOURCE ]] ; then
cd $TP_SOURCE_DIR/$ARROW_SOURCE
@ -534,6 +544,17 @@ if [[ -d $TP_SOURCE_DIR/$BITSHUFFLE_SOURCE ]] ; then
echo "Finished patching $BITSHUFFLE_SOURCE"
fi
#patch clucene
if [[ -d $TP_SOURCE_DIR/$CLUCENE_SOURCE ]] ; then
cd $TP_SOURCE_DIR/$CLUCENE_SOURCE
if [ ! -f "$PATCHED_MARK" ] ; then
patch -p1 < "$TP_PATCH_DIR/clucene-gcc14.patch"
touch "$PATCHED_MARK"
fi
cd -
echo "Finished patching $CLUCENE_SOURCE"
fi
#patch poco
if [[ -d $TP_SOURCE_DIR/$POCO_SOURCE ]] ; then
cd $TP_SOURCE_DIR/$POCO_SOURCE
@ -550,8 +571,8 @@ fi
if [[ -d $TP_SOURCE_DIR/$BREAK_PAD_SOURCE ]] ; then
cd $TP_SOURCE_DIR/$BREAK_PAD_SOURCE
if [ ! -f "$PATCHED_MARK" ] && [[ $BREAK_PAD_SOURCE == "breakpad-2022.07.02" ]] ; then
patch -p1 < "$TP_PATCH_DIR/breakpad-2022.07.02.patch"
if [ ! -f "$PATCHED_MARK" ] && [[ $BREAK_PAD_SOURCE == "breakpad-2022.07.12" ]] ; then
patch -p1 < "$TP_PATCH_DIR/breakpad-2022.07.12.patch"
touch "$PATCHED_MARK"
fi
cd -

12
thirdparty/patches/clucene-gcc14.patch vendored Normal file
View File

@ -0,0 +1,12 @@
diff --git a/src/core/CLucene/document/DateTools.cpp b/src/core/CLucene/document/DateTools.cpp
index f99ab25..72cb74f 100644
--- a/src/core/CLucene/document/DateTools.cpp
+++ b/src/core/CLucene/document/DateTools.cpp
@@ -8,6 +8,7 @@
#include "DateTools.h"
#include "CLucene/util/Misc.h"
+#include <ctime>
CL_NS_USE(util)
CL_NS_DEF(document)

View File

@ -0,0 +1,45 @@
From 3b2441b87f99ab65f37b141a7b548ebadb607b96 Mon Sep 17 00:00:00 2001
From: Janusz Chorko <janusz.chorko@apdu.pl>
Date: Fri, 26 Aug 2016 21:17:38 +0200
Subject: [PATCH 1/2] Removed non-compiling assignment operator. Fixed #718
---
include/rapidjson/document.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h
index e3e20dfbd..b0f1f70be 100644
--- a/include/rapidjson/document.h
+++ b/include/rapidjson/document.h
@@ -316,8 +316,6 @@ struct GenericStringRef {
GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {}
- GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
-
//! implicit conversion to plain CharType pointer
operator const Ch *() const { return s; }
From 862c39be371278a45a88d4d1d75164be57bb7e2d Mon Sep 17 00:00:00 2001
From: Janusz Chorko <janusz.chorko@apdu.pl>
Date: Fri, 26 Aug 2016 21:26:50 +0200
Subject: [PATCH 2/2] Explicitly disable copy assignment operator
---
include/rapidjson/document.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h
index b0f1f70be..19f5a6a5f 100644
--- a/include/rapidjson/document.h
+++ b/include/rapidjson/document.h
@@ -326,6 +326,8 @@ struct GenericStringRef {
//! Disallow construction from non-const array
template<SizeType N>
GenericStringRef(CharType (&str)[N]) /* = delete */;
+ //! Copy assignment operator not permitted - immutable type
+ GenericStringRef& operator=(const GenericStringRef& rhs) /* = delete */;
};
//! Mark a character pointer as constant string