aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-11-17 08:06:30 +0800
committerfanquake <fanquake@gmail.com>2021-11-17 08:06:38 +0800
commit6bde42e29e9bf903e3392503050466ad3100cada (patch)
treea9269c2f5f01dad5c40731bb4da16e2e479e108b
parent4a7f6e0d0cdc8e8c7d68d58a14fc978f592ca05c (diff)
parent5b93e65f6abfd174a56cf50c952ca5d5c3833859 (diff)
downloadbitcoin-6bde42e29e9bf903e3392503050466ad3100cada.tar.xz
Merge bitcoin/bitcoin#23511: release: require glibc 2.18+
5b93e65f6abfd174a56cf50c952ca5d5c3833859 build: remove D__STDC_FORMAT_MACROS from CPPFLAGS (fanquake) dbfca4a815d2dbef69f3b634c24b875bc1d22afc build: require glibc 2.18+ for release builds (fanquake) Pull request description: This increases our runtime glibc requirement from 2.17 to 2.18. From what I can see the only platform this drops release support for is CentOS 7, which reached the end of it's "full update" support at the [end of 2020](https://wiki.centos.org/About/Product). It does receive maintenance updates until 2024, however I don't think supporting glibc 2.17 until 2024 is realistic. It was mentioned in #22405 that our 2.17 requirement could be a bit excessive, and I tend to agree, however without a good reason to require an even newer version, I think a move from 2.17 -> 2.18 is sufficient for now. That means we get a glibc with "proper" support for `thread_local` (see below), as well as avoid having to patch dependencies to retain glibc compatibility (see #23489). Note that anyone wanting to self-compile and target a glibc 2.17 runtime could currently build with `--disable-threadlocal`. However we wouldn't make any guarantees on how long that workaround might exist for. glibc 2.18 was released in August 2013: https://sourceware.org/legacy-ml/libc-alpha/2013-08/msg00160.html. > Add support for calling C++11 thread_local object destructors on thread and program exit. This needs compiler support for offloading C++11 destructor calls to glibc. The last time we increased our runtime glibc requirement for release builds was in #17538 (0.20 release), where we moved from a 2.11 requirement to 2.17. Guix builds: ```bash bash-5.1# find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum d21c7429dbaca3a5260ec424036e19e287c553adb2229894e59eb9b60bc2eba5 guix-build-5b93e65f6abf/output/aarch64-linux-gnu/SHA256SUMS.part 5d8e7d8b5016b694cb23bcee202819a7db63ea033e5a21c99895981f7b508184 guix-build-5b93e65f6abf/output/aarch64-linux-gnu/bitcoin-5b93e65f6abf-aarch64-linux-gnu-debug.tar.gz db4e7b6af7d4dfa246e604f5548fd31e1ad51b810b24789f42362cd7be41cad3 guix-build-5b93e65f6abf/output/aarch64-linux-gnu/bitcoin-5b93e65f6abf-aarch64-linux-gnu.tar.gz db97badc0ad969bcb13620fc7f087d78622f3217ee792fc28406cc083a25bcbe guix-build-5b93e65f6abf/output/arm-linux-gnueabihf/SHA256SUMS.part 58a6910362ffacd1c7df27033c25cb25f24a317f3ca909f39bb20ac552b021db guix-build-5b93e65f6abf/output/arm-linux-gnueabihf/bitcoin-5b93e65f6abf-arm-linux-gnueabihf-debug.tar.gz 9d99fd89de4798116bfe83ff1e17e10c019b3e30d2d39fd70a5bef7c937bf6d5 guix-build-5b93e65f6abf/output/arm-linux-gnueabihf/bitcoin-5b93e65f6abf-arm-linux-gnueabihf.tar.gz 254e9149d00b0e50af1c80697326ac69ab823b4e845c19f059cc229f724fbb07 guix-build-5b93e65f6abf/output/dist-archive/bitcoin-5b93e65f6abf.tar.gz cc39947931b65960f1d32c3d53d623108a78af4bf2b3ac34b65a4c30de5feb08 guix-build-5b93e65f6abf/output/powerpc64-linux-gnu/SHA256SUMS.part 8763efeaaeea17bc526bccb050bd9da1ad2f22c7d8ec912ec0db68f4de7d4b88 guix-build-5b93e65f6abf/output/powerpc64-linux-gnu/bitcoin-5b93e65f6abf-powerpc64-linux-gnu-debug.tar.gz de8984c519c6afc7d43e28c11f7a38b0c5c2eec676bf566448cfd0e4f6accac8 guix-build-5b93e65f6abf/output/powerpc64-linux-gnu/bitcoin-5b93e65f6abf-powerpc64-linux-gnu.tar.gz ba73422ca3da7670435018b515bb2f8917dd23d47adb7989643b324bb47bcbf4 guix-build-5b93e65f6abf/output/powerpc64le-linux-gnu/SHA256SUMS.part 65a66250139f2379e8ff79abab0448c2a395b77bbb9f18f9ba51d2c83c598ce4 guix-build-5b93e65f6abf/output/powerpc64le-linux-gnu/bitcoin-5b93e65f6abf-powerpc64le-linux-gnu-debug.tar.gz 40e8de24f4e18af0473886cdedbc7aed2797264f8f4ed871547dd7d6e678efac guix-build-5b93e65f6abf/output/powerpc64le-linux-gnu/bitcoin-5b93e65f6abf-powerpc64le-linux-gnu.tar.gz a42d20fd81325171f19b11f2cdf76da1d129146dfbda744125f579bb6f11a632 guix-build-5b93e65f6abf/output/riscv64-linux-gnu/SHA256SUMS.part 581379b13295665ea709f8bda7ff606a4a1d4d536f6578a22ea2c64aeea62d62 guix-build-5b93e65f6abf/output/riscv64-linux-gnu/bitcoin-5b93e65f6abf-riscv64-linux-gnu-debug.tar.gz 6dc6c6ac6116fda4596c6f577b6ecef65c552467222072e629562892a0363431 guix-build-5b93e65f6abf/output/riscv64-linux-gnu/bitcoin-5b93e65f6abf-riscv64-linux-gnu.tar.gz ef4ee73071bd1a4d610281781eb2409dd8fe5c976ba347914e97b5cb49292db4 guix-build-5b93e65f6abf/output/x86_64-apple-darwin19/SHA256SUMS.part c4ea3b83c7debaf2d5a5cced6408445c2cb22177b0b368df74a72612a9105600 guix-build-5b93e65f6abf/output/x86_64-apple-darwin19/bitcoin-5b93e65f6abf-osx-unsigned.dmg e9c53a43f7f1c105f5aa8d0f8163a773a5b4a16c420ffdb2e3d0a5aab89a275f guix-build-5b93e65f6abf/output/x86_64-apple-darwin19/bitcoin-5b93e65f6abf-osx-unsigned.tar.gz f6e67def9519895ce2bf0893dbc4279e77e61d242b64ffd7423f46439baa9642 guix-build-5b93e65f6abf/output/x86_64-apple-darwin19/bitcoin-5b93e65f6abf-osx64.tar.gz 2dac0468cda5ddd5e2aaf632228bbbde1fe98f6119c1cc0e91ab36bb7924b587 guix-build-5b93e65f6abf/output/x86_64-linux-gnu/SHA256SUMS.part 5fbb6cd4a951dc8f7d9d3ec80b8dcbce4d6cd74a4a8c532ac30a2646ca4337a5 guix-build-5b93e65f6abf/output/x86_64-linux-gnu/bitcoin-5b93e65f6abf-x86_64-linux-gnu-debug.tar.gz 2942ef6a2e67508a87566ebbea0bbbe922962fbc90df9a73d4a328953171c633 guix-build-5b93e65f6abf/output/x86_64-linux-gnu/bitcoin-5b93e65f6abf-x86_64-linux-gnu.tar.gz 0d4c30d286d040126b8418a7c7e16d94cf8fe4397f4b71250a8502bf0aa65637 guix-build-5b93e65f6abf/output/x86_64-w64-mingw32/SHA256SUMS.part 53b7f7b4243f5b9f02f91407569392ea672bb585227696cc0b63b5bc10866d8d guix-build-5b93e65f6abf/output/x86_64-w64-mingw32/bitcoin-5b93e65f6abf-win-unsigned.tar.gz 7e7c252dcfe406f47caa9593b4009d969447859f4a665a02ef4718edaf170311 guix-build-5b93e65f6abf/output/x86_64-w64-mingw32/bitcoin-5b93e65f6abf-win64-debug.zip 9cbc0780d42d6b4779ad989670757323a37151c03b4797e520a74b642b53e3dd guix-build-5b93e65f6abf/output/x86_64-w64-mingw32/bitcoin-5b93e65f6abf-win64-setup-unsigned.exe a302b35629ac3bb21ae86905dfe521cdccd98a7e35868e12a081152adcf89bf5 guix-build-5b93e65f6abf/output/x86_64-w64-mingw32/bitcoin-5b93e65f6abf-win64.zip ``` ACKs for top commit: laanwj: ACK ACK ACK ACK ACK 5b93e65f6abfd174a56cf50c952ca5d5c3833859 hebasto: re-ACK 5b93e65f6abfd174a56cf50c952ca5d5c3833859, only suggested changes since my [previous](https://github.com/bitcoin/bitcoin/pull/23511#pullrequestreview-806276081) review. Tree-SHA512: e9c57b11881204ee7c4e3d474d64722bc1bd4409cf8511f2914360205158946a327aa7234bbcbae40c43c0373954d0571c28583d90c280dca53614372891ddde
-rw-r--r--configure.ac5
-rwxr-xr-xcontrib/devtools/symbol-check.py36
-rwxr-xr-xcontrib/devtools/test-symbol-check.py2
-rwxr-xr-xcontrib/guix/libexec/build.sh5
-rw-r--r--doc/dependencies.md2
5 files changed, 20 insertions, 30 deletions
diff --git a/configure.ac b/configure.ac
index 2c6e762d6d..0443dd9d5c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -581,7 +581,7 @@ CXXFLAGS="$TEMP_CXXFLAGS"
fi
-CPPFLAGS="$CPPFLAGS -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS"
+CPPFLAGS="$CPPFLAGS -DHAVE_BUILD_INFO"
AC_ARG_WITH([utils],
[AS_HELP_STRING([--with-utils],
@@ -1044,9 +1044,6 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
[AC_MSG_RESULT([no])]
)
-dnl thread_local is currently disabled when building with glibc back compat.
-dnl Our minimum supported glibc is 2.17, however support for thread_local
-dnl did not arrive in glibc until 2.18.
if test "x$use_thread_local" = xyes || test "x$use_thread_local" = xauto; then
TEMP_LDFLAGS="$LDFLAGS"
LDFLAGS="$TEMP_LDFLAGS $PTHREAD_CFLAGS"
diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py
index 136a9b70c1..15d4e729ac 100755
--- a/contrib/devtools/symbol-check.py
+++ b/contrib/devtools/symbol-check.py
@@ -19,35 +19,31 @@ import lief #type:ignore
# https://github.com/lief-project/LIEF/pull/562
LIEF_ELF_ARCH_RISCV = lief.ELF.ARCH(243)
-# Debian 8 (Jessie) EOL: 2020. https://wiki.debian.org/DebianReleases#Production_Releases
+# Debian 9 (Stretch) EOL: 2022. https://wiki.debian.org/DebianReleases#Production_Releases
#
-# - g++ version 4.9.2 (https://packages.debian.org/search?suite=jessie&arch=any&searchon=names&keywords=g%2B%2B)
-# - libc version 2.19 (https://packages.debian.org/search?suite=jessie&arch=any&searchon=names&keywords=libc6)
+# - g++ version 6.3.0 (https://packages.debian.org/search?suite=stretch&arch=any&searchon=names&keywords=g%2B%2B)
+# - libc version 2.24 (https://packages.debian.org/search?suite=stretch&arch=any&searchon=names&keywords=libc6)
#
-# Ubuntu 16.04 (Xenial) EOL: 2024. https://wiki.ubuntu.com/Releases
+# Ubuntu 16.04 (Xenial) EOL: 2026. https://wiki.ubuntu.com/Releases
#
-# - g++ version 5.3.1 (https://packages.ubuntu.com/search?keywords=g%2B%2B&searchon=names&suite=xenial&section=all)
-# - libc version 2.23.0 (https://packages.ubuntu.com/search?keywords=libc6&searchon=names&suite=xenial&section=all)
+# - g++ version 5.3.1
+# - libc version 2.23
#
-# CentOS 7 EOL: 2024. https://wiki.centos.org/FAQ/General
+# CentOS Stream 8 EOL: 2024. https://wiki.centos.org/About/Product
#
-# - g++ version 4.8.5 (http://mirror.centos.org/centos/7/os/x86_64/Packages/)
-# - libc version 2.17 (http://mirror.centos.org/centos/7/os/x86_64/Packages/)
-#
-# Taking the minimum of these as our target.
-#
-# According to GNU ABI document (https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html) this corresponds to:
-# GCC 4.8.5: GCC_4.8.0
-# (glibc) GLIBC_2_17
+# - g++ version 8.5.0 (http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/)
+# - libc version 2.28 (http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/)
#
+# See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html for more info.
+
MAX_VERSIONS = {
'GCC': (4,8,0),
'GLIBC': {
- lief.ELF.ARCH.i386: (2,17),
- lief.ELF.ARCH.x86_64: (2,17),
- lief.ELF.ARCH.ARM: (2,17),
- lief.ELF.ARCH.AARCH64:(2,17),
- lief.ELF.ARCH.PPC64: (2,17),
+ lief.ELF.ARCH.i386: (2,18),
+ lief.ELF.ARCH.x86_64: (2,18),
+ lief.ELF.ARCH.ARM: (2,18),
+ lief.ELF.ARCH.AARCH64:(2,18),
+ lief.ELF.ARCH.PPC64: (2,18),
LIEF_ELF_ARCH_RISCV: (2,27),
},
'LIBATOMIC': (1,0),
diff --git a/contrib/devtools/test-symbol-check.py b/contrib/devtools/test-symbol-check.py
index 5246375fe3..d699e85026 100755
--- a/contrib/devtools/test-symbol-check.py
+++ b/contrib/devtools/test-symbol-check.py
@@ -44,7 +44,7 @@ class TestSymbolChecks(unittest.TestCase):
self.skipTest("test not available for RISC-V")
# nextup was introduced in GLIBC 2.24, so is newer than our supported
- # glibc (2.17), and available in our release build environment (2.24).
+ # glibc (2.18), and available in our release build environment (2.24).
with open(source, 'w', encoding="utf8") as f:
f.write('''
#define _GNU_SOURCE
diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh
index e009f97c60..596d0ca1fb 100755
--- a/contrib/guix/libexec/build.sh
+++ b/contrib/guix/libexec/build.sh
@@ -238,9 +238,6 @@ mkdir -p "$OUTDIR"
# CONFIGFLAGS
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests --disable-fuzz-binary"
-case "$HOST" in
- *linux*) CONFIGFLAGS+=" --disable-threadlocal" ;;
-esac
# CFLAGS
HOST_CFLAGS="-O2 -g"
@@ -263,7 +260,7 @@ case "$HOST" in
*mingw*) HOST_LDFLAGS="-Wl,--no-insert-timestamp" ;;
esac
-# Using --no-tls-get-addr-optimize retains compatibility with glibc 2.17, by
+# Using --no-tls-get-addr-optimize retains compatibility with glibc 2.18, by
# avoiding a PowerPC64 optimisation available in glibc 2.22 and later.
# https://sourceware.org/binutils/docs-2.35/ld/PowerPC64-ELF64.html
case "$HOST" in
diff --git a/doc/dependencies.md b/doc/dependencies.md
index 0c1fd6ba98..6ccb53f6b3 100644
--- a/doc/dependencies.md
+++ b/doc/dependencies.md
@@ -12,7 +12,7 @@ These are the dependencies currently used by Bitcoin Core. You can find instruct
| fontconfig | [2.12.1](https://www.freedesktop.org/software/fontconfig/release/) | | No | Yes | |
| FreeType | [2.7.1](https://download.savannah.gnu.org/releases/freetype) | | No | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) (Android only) |
| GCC | | [8.1](https://gcc.gnu.org/) (C++17 & std::filesystem support) | | | |
-| glibc | | [2.17](https://www.gnu.org/software/libc/) | | | | |
+| glibc | | [2.18](https://www.gnu.org/software/libc/) | | | | |
| HarfBuzz-NG | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) |
| libevent | [2.1.12-stable](https://github.com/libevent/libevent/releases) | [2.0.21](https://github.com/bitcoin/bitcoin/pull/18676) | No | | |
| libnatpmp | git commit [4536032...](https://github.com/miniupnp/libnatpmp/tree/4536032ae32268a45c073a4d5e91bbab4534773a) | | No | | |