Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu24.04 is released #1060

Merged
merged 11 commits into from
May 28, 2024
22 changes: 20 additions & 2 deletions .github/build-mariadb-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
shogo82148 marked this conversation as resolved.
Show resolved Hide resolved
echo "gcc-11 is available"
export CC=gcc-11
elif command -v gcc-10 > /dev/null 2>&1; then
Expand All @@ -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
Expand Down
47 changes: 30 additions & 17 deletions .github/build-mysql-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 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
Expand All @@ -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
Expand All @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-24.04
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[actionlint] reported by reviewdog 🐶
label "ubuntu-24.04" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2022", "windows-2019", "windows-2016", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-14.0", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "macos-13.0", "macos-12-xl", "macos-12-xlarge", "macos-12-large", "macos-12", "macos-12.0", "macos-11", "macos-11.0", "macos-10.15", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file [runner-label]

- ubuntu-22.04
- ubuntu-20.04
- macos-14
Expand Down
26 changes: 26 additions & 0 deletions patches/mariadb/10.2.44/rocksdb-does-not-compile-with-gcc13.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
commit cf4a16b5557be5fb3568c1de0d6cc0a18291afc9
Author: Sergei Golubchik <serg@mariadb.org>
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 <cstdint> 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")
26 changes: 26 additions & 0 deletions patches/mariadb/10.3.39/rocksdb-does-not-compile-with-gcc13.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
commit cf4a16b5557be5fb3568c1de0d6cc0a18291afc9
Author: Sergei Golubchik <serg@mariadb.org>
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 <cstdint> 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)
Comment on lines +19 to +22
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using standard integer types for better portability.

While the current changes address the compilation issue, using standard integer types (<cstdint>) would enhance the portability and maintainability of the code. If possible, consider updating the submodule or applying a patch that includes the necessary headers.

+
# 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")
26 changes: 26 additions & 0 deletions patches/mariadb/10.7.8/rocksdb-does-not-compile-with-gcc13.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
commit cf4a16b5557be5fb3568c1de0d6cc0a18291afc9
Author: Sergei Golubchik <serg@mariadb.org>
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 <cstdint> 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)
Comment on lines +19 to +22
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using standard integer types for better portability.

As with the previous patch, using standard integer types (<cstdint>) would enhance the portability and maintainability of the code. If possible, consider updating the submodule or applying a patch that includes the necessary headers.

+
# 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")
31 changes: 31 additions & 0 deletions patches/mysql/8.1.0/fix-broken-build-without-test.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
commit a1c2be2bfd08d639bb14f90540daff107848a26d
Author: Tor Didriksen <tor.didriksen@oracle.com>
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)
Loading