diff --git a/docker/dockerfiles/dev-env/dev-env.Dockerfile b/docker/dockerfiles/dev-env/dev-env.Dockerfile index 742b361bb9fdc..ac8d1585bf161 100644 --- a/docker/dockerfiles/dev-env/dev-env.Dockerfile +++ b/docker/dockerfiles/dev-env/dev-env.Dockerfile @@ -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 / diff --git a/thirdparty/build-thirdparty.sh b/thirdparty/build-thirdparty.sh index 6be4239a44990..e94c226baeb40 100755 --- a/thirdparty/build-thirdparty.sh +++ b/thirdparty/build-thirdparty.sh @@ -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 diff --git a/thirdparty/download-thirdparty.sh b/thirdparty/download-thirdparty.sh index 6b7d0193c9ac7..93a4a11f5f1bc 100755 --- a/thirdparty/download-thirdparty.sh +++ b/thirdparty/download-thirdparty.sh @@ -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 - diff --git a/thirdparty/patches/breakpad-2022.07.02.patch b/thirdparty/patches/breakpad-2022.07.12.patch similarity index 100% rename from thirdparty/patches/breakpad-2022.07.02.patch rename to thirdparty/patches/breakpad-2022.07.12.patch diff --git a/thirdparty/patches/clucene-gcc14.patch b/thirdparty/patches/clucene-gcc14.patch new file mode 100644 index 0000000000000..2fbad14855a5f --- /dev/null +++ b/thirdparty/patches/clucene-gcc14.patch @@ -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 + + CL_NS_USE(util) + CL_NS_DEF(document) diff --git a/thirdparty/patches/mariadb-connector-c-3.1.4-gcc14.patch b/thirdparty/patches/mariadb-connector-c-3.1.14-gcc14.patch similarity index 100% rename from thirdparty/patches/mariadb-connector-c-3.1.4-gcc14.patch rename to thirdparty/patches/mariadb-connector-c-3.1.14-gcc14.patch diff --git a/thirdparty/patches/rapidjson-gcc14.patch b/thirdparty/patches/rapidjson-gcc14.patch new file mode 100644 index 0000000000000..49552de61714e --- /dev/null +++ b/thirdparty/patches/rapidjson-gcc14.patch @@ -0,0 +1,45 @@ +From 3b2441b87f99ab65f37b141a7b548ebadb607b96 Mon Sep 17 00:00:00 2001 +From: Janusz Chorko +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 +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 + 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