diff --git a/.github/build-mariadb-linux.sh b/.github/build-mariadb-linux.sh index 39ac476f..62e2fd7f 100755 --- a/.github/build-mariadb-linux.sh +++ b/.github/build-mariadb-linux.sh @@ -25,7 +25,16 @@ PREFIX=$RUNNER_TOOL_CACHE/mariadb/$MARIADB_VERSION/$MARIADB_ARCH export LDFLAGS=-Wl,-rpath,$PREFIX/lib # use latest version of gcc installed -if command -v gcc-11 > /dev/null 2>&1; then +if command -v gcc-14 > /dev/null 2>&1; then + echo "gcc-14 is available" + export CC=gcc-14 +elif command -v gcc-13 > /dev/null 2>&1; then + echo "gcc-13 is available" + export CC=gcc-13 +elif command -v gcc-12 > /dev/null 2>&1; then + echo "gcc-12 is available" + export CC=gcc-12 +elif command -v gcc-11 > /dev/null 2>&1; then echo "gcc-11 is available" export CC=gcc-11 elif command -v gcc-10 > /dev/null 2>&1; then @@ -36,7 +45,16 @@ elif command -v gcc-9 > /dev/null 2>&1; then export CC=gcc-9 fi -if command -v g++-11 > /dev/null 2>&1; then +if command -v g++-14 > /dev/null 2>&1; then + echo "g++-14 is available" + export CXX=g++-14 +elif command -v g++-13 > /dev/null 2>&1; then + echo "g++-13 is available" + export CXX=g++-13 +elif command -v g++-12 > /dev/null 2>&1; then + echo "g++-12 is available" + export CXX=g++-12 +elif command -v g++-11 > /dev/null 2>&1; then echo "g++-11 is available" export CXX=g++-11 elif command -v g++-10 > /dev/null 2>&1; then diff --git a/.github/build-mysql-linux.sh b/.github/build-mysql-linux.sh index 6d61a972..4e06149f 100755 --- a/.github/build-mysql-linux.sh +++ b/.github/build-mysql-linux.sh @@ -27,23 +27,20 @@ export LDFLAGS=-Wl,-rpath,$PREFIX/lib # use latest version of gcc installed if [[ "$MYSQL_VERSION" =~ ^5[.]6[.] ]]; then # I don't know why, but MySQL 5.6.x is not compiled by gcc-11 - if command -v gcc-10 > /dev/null 2>&1; then - echo "gcc-10 is available" - export CC=gcc-10 - elif command -v gcc-9 > /dev/null 2>&1; then - echo "gcc-9 is available" - export CC=gcc-9 - fi - - if command -v g++-10 > /dev/null 2>&1; then - echo "g++-10 is available" - export CXX=g++-10 - elif command -v g++-9 > /dev/null 2>&1; then - echo "g++-9 is available" - export CXX=g++-9 - fi + sudo apt-get install gcc-10 g++-10 + export CC=gcc-10 + export CXX=g++-10 else - if command -v gcc-11 > /dev/null 2>&1; then + if command -v gcc-14 > /dev/null 2>&1; then + echo "gcc-14 is available" + export CC=gcc-14 + elif command -v gcc-13 > /dev/null 2>&1; then + echo "gcc-13 is available" + export CC=gcc-13 + elif command -v gcc-12 > /dev/null 2>&1; then + echo "gcc-12 is available" + export CC=gcc-12 + elif command -v gcc-11 > /dev/null 2>&1; then echo "gcc-11 is available" export CC=gcc-11 elif command -v gcc-10 > /dev/null 2>&1; then @@ -54,7 +51,16 @@ else export CC=gcc-9 fi - if command -v g++-11 > /dev/null 2>&1; then + if command -v g++-14 > /dev/null 2>&1; then + echo "g++-14 is available" + export CXX=g++-14 + elif command -v g++-13 > /dev/null 2>&1; then + echo "g++-13 is available" + export CXX=g++-13 + elif command -v g++-12 > /dev/null 2>&1; then + echo "g++-12 is available" + export CXX=g++-12 + elif command -v g++-11 > /dev/null 2>&1; then echo "g++-11 is available" export CXX=g++-11 elif command -v g++-10 > /dev/null 2>&1; then @@ -66,6 +72,13 @@ else fi fi +echo "::group::install dependencies" +( + set -eux + sudo apt-get install -y libtirpc-dev libudev-dev +) +echo "::endgroup::" + # detect the number of CPU Core JOBS=$(nproc) diff --git a/.github/workflows/build-mariadb.yml b/.github/workflows/build-mariadb.yml index 206b3ee5..75b3fcfc 100644 --- a/.github/workflows/build-mariadb.yml +++ b/.github/workflows/build-mariadb.yml @@ -25,7 +25,7 @@ jobs: export MARIADB_VERSIONS fi { - echo "matrix-linux=$(printenv MARIADB_VERSIONS | jq -c '{mariadb: . , os: ["ubuntu-20.04", "ubuntu-22.04"]}')" + echo "matrix-linux=$(printenv MARIADB_VERSIONS | jq -c '{mariadb: . , os: ["ubuntu-20.04", "ubuntu-22.04", "ubuntu-24.04"]}')" echo "matrix-darwin=$(printenv MARIADB_VERSIONS | jq -c '{mariadb: .}')" echo "matrix-windows=$(printenv MARIADB_VERSIONS | jq -c '{mariadb: .}')" } >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/build-mysql.yml b/.github/workflows/build-mysql.yml index cf3dde07..0d08f30b 100644 --- a/.github/workflows/build-mysql.yml +++ b/.github/workflows/build-mysql.yml @@ -25,7 +25,7 @@ jobs: export MYSQL_VERSIONS fi { - echo "matrix-linux=$(printenv MYSQL_VERSIONS | jq -c '{mysql: . , os: ["ubuntu-20.04", "ubuntu-22.04"]}')" + echo "matrix-linux=$(printenv MYSQL_VERSIONS | jq -c '{mysql: . , os: ["ubuntu-20.04", "ubuntu-22.04", "ubuntu-24.04"]}')" echo "matrix-darwin=$(printenv MYSQL_VERSIONS | jq -c '{mysql: .}')" echo "matrix-windows=$(printenv MYSQL_VERSIONS | jq -c '{mysql: .}')" } >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7e5cd097..765e5030 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,6 +34,7 @@ jobs: fail-fast: false matrix: os: + - ubuntu-24.04 - ubuntu-22.04 - ubuntu-20.04 - macos-14 diff --git a/patches/mariadb/10.2.44/rocksdb-does-not-compile-with-gcc13.patch b/patches/mariadb/10.2.44/rocksdb-does-not-compile-with-gcc13.patch new file mode 100644 index 00000000..524da07a --- /dev/null +++ b/patches/mariadb/10.2.44/rocksdb-does-not-compile-with-gcc13.patch @@ -0,0 +1,26 @@ +commit cf4a16b5557be5fb3568c1de0d6cc0a18291afc9 +Author: Sergei Golubchik +Date: Thu May 4 16:05:08 2023 +0200 + + MDEV-31057 rocksdb does not compile with gcc-13 + + RocksDB (in a submodule) has to include to use uint64_t + but it doesn't. Until the submodule is upgraded, let's replace + problematic types with something that's available + +diff --git a/storage/rocksdb/CMakeLists.txt b/storage/rocksdb/CMakeLists.txt +index 15fc4dc735a..71259703e5a 100644 +--- a/storage/rocksdb/CMakeLists.txt ++++ b/storage/rocksdb/CMakeLists.txt +@@ -30,6 +30,11 @@ IF(WITH_VALGRIND) + ADD_DEFINITIONS(-DROCKSDB_VALGRIND_RUN=1) + ENDIF() + ++ADD_DEFINITIONS(-Duint64_t=u_int64_t) ++ADD_DEFINITIONS(-Duint32_t=u_int32_t) ++ADD_DEFINITIONS(-Duint16_t=u_int16_t) ++ADD_DEFINITIONS(-Duint8_t=u_int8_t) ++ + # We've had our builders hang during the build process. This prevents MariaRocks + # to be built on 32 bit intel OS kernels. + IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i[36]86") diff --git a/patches/mariadb/10.3.39/rocksdb-does-not-compile-with-gcc13.patch b/patches/mariadb/10.3.39/rocksdb-does-not-compile-with-gcc13.patch new file mode 100644 index 00000000..524da07a --- /dev/null +++ b/patches/mariadb/10.3.39/rocksdb-does-not-compile-with-gcc13.patch @@ -0,0 +1,26 @@ +commit cf4a16b5557be5fb3568c1de0d6cc0a18291afc9 +Author: Sergei Golubchik +Date: Thu May 4 16:05:08 2023 +0200 + + MDEV-31057 rocksdb does not compile with gcc-13 + + RocksDB (in a submodule) has to include to use uint64_t + but it doesn't. Until the submodule is upgraded, let's replace + problematic types with something that's available + +diff --git a/storage/rocksdb/CMakeLists.txt b/storage/rocksdb/CMakeLists.txt +index 15fc4dc735a..71259703e5a 100644 +--- a/storage/rocksdb/CMakeLists.txt ++++ b/storage/rocksdb/CMakeLists.txt +@@ -30,6 +30,11 @@ IF(WITH_VALGRIND) + ADD_DEFINITIONS(-DROCKSDB_VALGRIND_RUN=1) + ENDIF() + ++ADD_DEFINITIONS(-Duint64_t=u_int64_t) ++ADD_DEFINITIONS(-Duint32_t=u_int32_t) ++ADD_DEFINITIONS(-Duint16_t=u_int16_t) ++ADD_DEFINITIONS(-Duint8_t=u_int8_t) ++ + # We've had our builders hang during the build process. This prevents MariaRocks + # to be built on 32 bit intel OS kernels. + IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i[36]86") diff --git a/patches/mariadb/10.7.8/rocksdb-does-not-compile-with-gcc13.patch b/patches/mariadb/10.7.8/rocksdb-does-not-compile-with-gcc13.patch new file mode 100644 index 00000000..524da07a --- /dev/null +++ b/patches/mariadb/10.7.8/rocksdb-does-not-compile-with-gcc13.patch @@ -0,0 +1,26 @@ +commit cf4a16b5557be5fb3568c1de0d6cc0a18291afc9 +Author: Sergei Golubchik +Date: Thu May 4 16:05:08 2023 +0200 + + MDEV-31057 rocksdb does not compile with gcc-13 + + RocksDB (in a submodule) has to include to use uint64_t + but it doesn't. Until the submodule is upgraded, let's replace + problematic types with something that's available + +diff --git a/storage/rocksdb/CMakeLists.txt b/storage/rocksdb/CMakeLists.txt +index 15fc4dc735a..71259703e5a 100644 +--- a/storage/rocksdb/CMakeLists.txt ++++ b/storage/rocksdb/CMakeLists.txt +@@ -30,6 +30,11 @@ IF(WITH_VALGRIND) + ADD_DEFINITIONS(-DROCKSDB_VALGRIND_RUN=1) + ENDIF() + ++ADD_DEFINITIONS(-Duint64_t=u_int64_t) ++ADD_DEFINITIONS(-Duint32_t=u_int32_t) ++ADD_DEFINITIONS(-Duint16_t=u_int16_t) ++ADD_DEFINITIONS(-Duint8_t=u_int8_t) ++ + # We've had our builders hang during the build process. This prevents MariaRocks + # to be built on 32 bit intel OS kernels. + IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i[36]86") diff --git a/patches/mysql/8.1.0/fix-broken-build-without-test.patch b/patches/mysql/8.1.0/fix-broken-build-without-test.patch new file mode 100644 index 00000000..0b2f0b91 --- /dev/null +++ b/patches/mysql/8.1.0/fix-broken-build-without-test.patch @@ -0,0 +1,31 @@ +commit a1c2be2bfd08d639bb14f90540daff107848a26d +Author: Tor Didriksen +Date: Tue Jul 25 14:30:28 2023 +0200 + + Bug #34278103 Compile MySQL with GCC 13 [noclose] + + Downgrade -Werror=suggest-attribute=format to -Wno-error + + Post-push fix: broken build for cmake . -DWITH_UNIT_TESTS=0 + + Change-Id: I1edfff557741c353c56a3312a291df7e9b5297fa + +diff --git a/storage/ndb/src/common/util/CMakeLists.txt b/storage/ndb/src/common/util/CMakeLists.txt +index b9b308f9d61..a68d64218aa 100644 +--- a/storage/ndb/src/common/util/CMakeLists.txt ++++ b/storage/ndb/src/common/util/CMakeLists.txt +@@ -86,9 +86,11 @@ ENDFOREACH(tests) + + # This looks like a gcc bug, there *are* ATTRIBUTE_FORMAT annotations for + # cstrbuf::appendf() +-IF(MY_COMPILER_IS_GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 13) +- TARGET_COMPILE_OPTIONS(cstrbuf-t PRIVATE +- "-Wno-error=suggest-attribute=format") ++IF(WITH_UNIT_TESTS) ++ IF(MY_COMPILER_IS_GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 13) ++ TARGET_COMPILE_OPTIONS(cstrbuf-t PRIVATE ++ "-Wno-error=suggest-attribute=format") ++ ENDIF() + ENDIF() + + NDB_ADD_TEST(ndb_version-t version.cpp LIBS ndbgeneral)