Skip to content

Commit 6bde42e

Browse files
committed
Merge bitcoin/bitcoin#23511: release: require glibc 2.18+
5b93e65 build: remove D__STDC_FORMAT_MACROS from CPPFLAGS (fanquake) dbfca4a 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 5b93e65 hebasto: re-ACK 5b93e65, only suggested changes since my [previous](bitcoin/bitcoin#23511 (review)) review. Tree-SHA512: e9c57b11881204ee7c4e3d474d64722bc1bd4409cf8511f2914360205158946a327aa7234bbcbae40c43c0373954d0571c28583d90c280dca53614372891ddde
2 parents 4a7f6e0 + 5b93e65 commit 6bde42e

File tree

5 files changed

+20
-30
lines changed

5 files changed

+20
-30
lines changed

configure.ac

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ CXXFLAGS="$TEMP_CXXFLAGS"
581581

582582
fi
583583

584-
CPPFLAGS="$CPPFLAGS -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS"
584+
CPPFLAGS="$CPPFLAGS -DHAVE_BUILD_INFO"
585585

586586
AC_ARG_WITH([utils],
587587
[AS_HELP_STRING([--with-utils],
@@ -1044,9 +1044,6 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
10441044
[AC_MSG_RESULT([no])]
10451045
)
10461046

1047-
dnl thread_local is currently disabled when building with glibc back compat.
1048-
dnl Our minimum supported glibc is 2.17, however support for thread_local
1049-
dnl did not arrive in glibc until 2.18.
10501047
if test "x$use_thread_local" = xyes || test "x$use_thread_local" = xauto; then
10511048
TEMP_LDFLAGS="$LDFLAGS"
10521049
LDFLAGS="$TEMP_LDFLAGS $PTHREAD_CFLAGS"

contrib/devtools/symbol-check.py

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,31 @@
1919
# https://github.com/lief-project/LIEF/pull/562
2020
LIEF_ELF_ARCH_RISCV = lief.ELF.ARCH(243)
2121

22-
# Debian 8 (Jessie) EOL: 2020. https://wiki.debian.org/DebianReleases#Production_Releases
22+
# Debian 9 (Stretch) EOL: 2022. https://wiki.debian.org/DebianReleases#Production_Releases
2323
#
24-
# - g++ version 4.9.2 (https://packages.debian.org/search?suite=jessie&arch=any&searchon=names&keywords=g%2B%2B)
25-
# - libc version 2.19 (https://packages.debian.org/search?suite=jessie&arch=any&searchon=names&keywords=libc6)
24+
# - g++ version 6.3.0 (https://packages.debian.org/search?suite=stretch&arch=any&searchon=names&keywords=g%2B%2B)
25+
# - libc version 2.24 (https://packages.debian.org/search?suite=stretch&arch=any&searchon=names&keywords=libc6)
2626
#
27-
# Ubuntu 16.04 (Xenial) EOL: 2024. https://wiki.ubuntu.com/Releases
27+
# Ubuntu 16.04 (Xenial) EOL: 2026. https://wiki.ubuntu.com/Releases
2828
#
29-
# - g++ version 5.3.1 (https://packages.ubuntu.com/search?keywords=g%2B%2B&searchon=names&suite=xenial&section=all)
30-
# - libc version 2.23.0 (https://packages.ubuntu.com/search?keywords=libc6&searchon=names&suite=xenial&section=all)
29+
# - g++ version 5.3.1
30+
# - libc version 2.23
3131
#
32-
# CentOS 7 EOL: 2024. https://wiki.centos.org/FAQ/General
32+
# CentOS Stream 8 EOL: 2024. https://wiki.centos.org/About/Product
3333
#
34-
# - g++ version 4.8.5 (http://mirror.centos.org/centos/7/os/x86_64/Packages/)
35-
# - libc version 2.17 (http://mirror.centos.org/centos/7/os/x86_64/Packages/)
36-
#
37-
# Taking the minimum of these as our target.
38-
#
39-
# According to GNU ABI document (https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html) this corresponds to:
40-
# GCC 4.8.5: GCC_4.8.0
41-
# (glibc) GLIBC_2_17
34+
# - g++ version 8.5.0 (http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/)
35+
# - libc version 2.28 (http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/)
4236
#
37+
# See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html for more info.
38+
4339
MAX_VERSIONS = {
4440
'GCC': (4,8,0),
4541
'GLIBC': {
46-
lief.ELF.ARCH.i386: (2,17),
47-
lief.ELF.ARCH.x86_64: (2,17),
48-
lief.ELF.ARCH.ARM: (2,17),
49-
lief.ELF.ARCH.AARCH64:(2,17),
50-
lief.ELF.ARCH.PPC64: (2,17),
42+
lief.ELF.ARCH.i386: (2,18),
43+
lief.ELF.ARCH.x86_64: (2,18),
44+
lief.ELF.ARCH.ARM: (2,18),
45+
lief.ELF.ARCH.AARCH64:(2,18),
46+
lief.ELF.ARCH.PPC64: (2,18),
5147
LIEF_ELF_ARCH_RISCV: (2,27),
5248
},
5349
'LIBATOMIC': (1,0),

contrib/devtools/test-symbol-check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def test_ELF(self):
4444
self.skipTest("test not available for RISC-V")
4545

4646
# nextup was introduced in GLIBC 2.24, so is newer than our supported
47-
# glibc (2.17), and available in our release build environment (2.24).
47+
# glibc (2.18), and available in our release build environment (2.24).
4848
with open(source, 'w', encoding="utf8") as f:
4949
f.write('''
5050
#define _GNU_SOURCE

contrib/guix/libexec/build.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,6 @@ mkdir -p "$OUTDIR"
238238

239239
# CONFIGFLAGS
240240
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests --disable-fuzz-binary"
241-
case "$HOST" in
242-
*linux*) CONFIGFLAGS+=" --disable-threadlocal" ;;
243-
esac
244241

245242
# CFLAGS
246243
HOST_CFLAGS="-O2 -g"
@@ -263,7 +260,7 @@ case "$HOST" in
263260
*mingw*) HOST_LDFLAGS="-Wl,--no-insert-timestamp" ;;
264261
esac
265262

266-
# Using --no-tls-get-addr-optimize retains compatibility with glibc 2.17, by
263+
# Using --no-tls-get-addr-optimize retains compatibility with glibc 2.18, by
267264
# avoiding a PowerPC64 optimisation available in glibc 2.22 and later.
268265
# https://sourceware.org/binutils/docs-2.35/ld/PowerPC64-ELF64.html
269266
case "$HOST" in

doc/dependencies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ These are the dependencies currently used by Bitcoin Core. You can find instruct
1212
| fontconfig | [2.12.1](https://www.freedesktop.org/software/fontconfig/release/) | | No | Yes | |
1313
| 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) |
1414
| GCC | | [8.1](https://gcc.gnu.org/) (C++17 & std::filesystem support) | | | |
15-
| glibc | | [2.17](https://www.gnu.org/software/libc/) | | | | |
15+
| glibc | | [2.18](https://www.gnu.org/software/libc/) | | | | |
1616
| HarfBuzz-NG | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) |
1717
| libevent | [2.1.12-stable](https://github.com/libevent/libevent/releases) | [2.0.21](https://github.com/bitcoin/bitcoin/pull/18676) | No | | |
1818
| libnatpmp | git commit [4536032...](https://github.com/miniupnp/libnatpmp/tree/4536032ae32268a45c073a4d5e91bbab4534773a) | | No | | |

0 commit comments

Comments
 (0)