From 5ba1309b717716aec389be7d770339466aa2fc11 Mon Sep 17 00:00:00 2001 From: merge-script Date: Fri, 2 Aug 2024 11:31:29 +0100 Subject: [PATCH 01/10] Merge bitcoin/bitcoin#30567: qt, build: Drop `QT_STATICPLUGIN` macro 7231c7630e61c062440459963f7b00ccbec68f0f qt: Replace deprecated LogPrintf with LogInfo in GUIUtil::LogQtInfo() (Hennadii Stepanov) b3d3ae0680e7529853413de045aa9fbd7ac51e5c qt, build: Drop `QT_STATICPLUGIN` macro (Hennadii Stepanov) Pull request description: Broken out of https://github.com/bitcoin/bitcoin/pull/30454. Our `QT_STATICPLUGIN` macro is effectively equivalent to the Qt's `QT_STATIC` macro. It is easy to see in the `_BITCOIN_QT_IS_STATIC` macro implementation: https://github.com/bitcoin/bitcoin/blob/ebd82fa9fae13d5a7a395800295dd7fd34185b58/build-aux/m4/bitcoin_qt.m4#L269-L292 No need to handle both macros. ACKs for top commit: maflcko: re-ACK 7231c7630e61c062440459963f7b00ccbec68f0f TheCharlatan: ACK 7231c7630e61c062440459963f7b00ccbec68f0f Tree-SHA512: abbf21859b7ac2aaf47c5b0e075403e4cc9bc540b1565d23f51650b8932dde314586aca67fd4ed5daadebc89268baf8c18f65348fa2b836078ac24543c14cfd6 --- build-aux/m4/bitcoin_qt.m4 | 1 - src/qt/bitcoin.cpp | 2 +- src/qt/guiutil.cpp | 19 +++++++------------ src/qt/test/test_main.cpp | 2 +- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4 index 186a89721d..89f3e188ee 100644 --- a/build-aux/m4/bitcoin_qt.m4 +++ b/build-aux/m4/bitcoin_qt.m4 @@ -137,7 +137,6 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ fi fi - AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static]) if test "x$TARGET_OS" != xandroid; then _BITCOIN_QT_CHECK_STATIC_PLUGIN([QMinimalIntegrationPlugin], [-lqminimal]) AC_DEFINE(QT_QPA_PLATFORM_MINIMAL, 1, [Define this symbol if the minimal qt platform exists]) diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 52bd0767b3..af50ae0129 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -58,7 +58,7 @@ #include #include -#if defined(QT_STATICPLUGIN) +#if defined(QT_STATIC) #include #if defined(QT_QPA_PLATFORM_XCB) Q_IMPORT_PLUGIN(QXcbIntegrationPlugin); diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 649b009f25..3ce055f7d0 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -1862,29 +1862,24 @@ void LogQtInfo() #else const std::string qt_link{"dynamic"}; #endif -#ifdef QT_STATICPLUGIN - const std::string plugin_link{"static"}; -#else - const std::string plugin_link{"dynamic"}; -#endif - LogPrintf("Qt %s (%s), plugin=%s (%s)\n", qVersion(), qt_link, QGuiApplication::platformName().toStdString(), plugin_link); + LogInfo("Qt %s (%s), plugin=%s\n", qVersion(), qt_link, QGuiApplication::platformName().toStdString()); const auto static_plugins = QPluginLoader::staticPlugins(); if (static_plugins.empty()) { - LogPrintf("No static plugins.\n"); + LogInfo("No static plugins.\n"); } else { - LogPrintf("Static plugins:\n"); + LogInfo("Static plugins:\n"); for (const QStaticPlugin& p : static_plugins) { QJsonObject meta_data = p.metaData(); const std::string plugin_class = meta_data.take(QString("className")).toString().toStdString(); const int plugin_version = meta_data.take(QString("version")).toInt(); - LogPrintf(" %s, version %d\n", plugin_class, plugin_version); + LogInfo(" %s, version %d\n", plugin_class, plugin_version); } } - LogPrintf("Style: %s / %s\n", QApplication::style()->objectName().toStdString(), QApplication::style()->metaObject()->className()); - LogPrintf("System: %s, %s\n", QSysInfo::prettyProductName().toStdString(), QSysInfo::buildAbi().toStdString()); + LogInfo("Style: %s / %s\n", QApplication::style()->objectName().toStdString(), QApplication::style()->metaObject()->className()); + LogInfo("System: %s, %s\n", QSysInfo::prettyProductName().toStdString(), QSysInfo::buildAbi().toStdString()); for (const QScreen* s : QGuiApplication::screens()) { - LogPrintf("Screen: %s %dx%d, pixel ratio=%.1f\n", s->name().toStdString(), s->size().width(), s->size().height(), s->devicePixelRatio()); + LogInfo("Screen: %s %dx%d, pixel ratio=%.1f\n", s->name().toStdString(), s->size().width(), s->size().height(), s->devicePixelRatio()); } } diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp index 34ea983441..4bf49ba8a0 100644 --- a/src/qt/test/test_main.cpp +++ b/src/qt/test/test_main.cpp @@ -25,7 +25,7 @@ #include #include -#if defined(QT_STATICPLUGIN) +#if defined(QT_STATIC) #include #if defined(QT_QPA_PLATFORM_MINIMAL) Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin); From 4f44750f9a1d5315d7340c127091a23490e24d06 Mon Sep 17 00:00:00 2001 From: merge-script Date: Sat, 20 Jul 2024 14:50:09 +0100 Subject: [PATCH 02/10] Merge bitcoin/bitcoin#30491: Fix MSVC warning C4273 "inconsistent dll linkage" 7703884ab19cd7ffddc5c52ba57dec82fbc8dc2b Fix MSVC warning C4273 "inconsistent dll linkage" (Hennadii Stepanov) Pull request description: Broken out of https://github.com/bitcoin/bitcoin/pull/30454. When using CMake, the user can select the MSVC runtime library to be: 1) Statically-linked (with the corresponding `x64-windows-static` vcpkg triplet) or 2) Dynamically-linked (with the corresponding `x64-windows` vcpkg triplet) In the latter case, the compiler emits the [C4273](https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4273) warning. As the "Necessary on some platforms" comment does not apply to MSVC, skip the declaration for MSVC. The MSVC build system in the master branch supports the statically-linked runtime only: https://github.com/bitcoin/bitcoin/blob/ed739d14b58b5e772a65b85bb421703963b06852/build_msvc/common.init.vcxproj.in#L65 ACKs for top commit: sipa: utACK 7703884ab19cd7ffddc5c52ba57dec82fbc8dc2b sipsorcery: utACK 7703884ab19cd7ffddc5c52ba57dec82fbc8dc2b. theuni: utACK 7703884ab19cd7ffddc5c52ba57dec82fbc8dc2b Tree-SHA512: a42e1a0d48973217462e703c418f3e9ef9cb5236267c1bf32912aacaf68976cdd2b9229168523f7c2a99ee3f2fb1bf8add4f342796bdb1e4063ca026b761db51 --- src/randomenv.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/randomenv.cpp b/src/randomenv.cpp index 05aa0c2d2c..ddb8983c6c 100644 --- a/src/randomenv.cpp +++ b/src/randomenv.cpp @@ -57,8 +57,10 @@ #include #endif +#ifndef _MSC_VER //! Necessary on some platforms -extern char** environ; +extern char** environ; // NOLINT(readability-redundant-declaration): Necessary on some platforms +#endif namespace { From 7cdacdc1ad7570a737f8041abbca0314f477f28f Mon Sep 17 00:00:00 2001 From: merge-script Date: Wed, 24 Jul 2024 09:11:00 +0100 Subject: [PATCH 03/10] Merge bitcoin/bitcoin#30513: depends: Bump `libmultiprocess` for CMake fixes ec0e805d11d6a73c542032fc49a58a1d05b62d24 depends: Bump `libmultiprocess` for CMake fixes (Hennadii Stepanov) Pull request description: This PR amends https://github.com/bitcoin/bitcoin/pull/30490 and bumps the upstream branch, which now includes a required CMake [fix](https://github.com/chaincodelabs/libmultiprocess/pull/103). Addresses https://github.com/bitcoin/bitcoin/pull/30490#issuecomment-2241153244. The CI logs are available in https://github.com/bitcoin/bitcoin/pull/29790 where the recent [push](https://github.com/hebasto/bitcoin/tree/pr29790-0723.2.mp) uses this PR implementation. ACKs for top commit: ryanofsky: Code review ACK ec0e805d11d6a73c542032fc49a58a1d05b62d24 theuni: utACK ec0e805d11d6a73c542032fc49a58a1d05b62d24. Tree-SHA512: e300a27bcab80a63a518719e9af8e10a938294fc07289cadbf4a7744627c10b0e9541a36971d08b65152f3f7d0eb434e427274d9c9d9f0bdd216afd914027a0f --- depends/packages/native_libmultiprocess.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/depends/packages/native_libmultiprocess.mk b/depends/packages/native_libmultiprocess.mk index ea08eefea6..2e30be434c 100644 --- a/depends/packages/native_libmultiprocess.mk +++ b/depends/packages/native_libmultiprocess.mk @@ -1,8 +1,8 @@ package=native_libmultiprocess -$(package)_version=8b8a4766ce0a1892b9e8a5eb73dc39821005e520 +$(package)_version=6aca5f389bacf2942394b8738bbe15d6c9edfb9b $(package)_download_path=https://github.com/chaincodelabs/libmultiprocess/archive $(package)_file_name=$($(package)_version).tar.gz -$(package)_sha256_hash=475c0dc2357a2ff30e9a164e4c16dc8a6597a57c9193d646fa9cbf0a55c45d78 +$(package)_sha256_hash=2efeed53542bc1d8af3291f2b6f0e5d430d86a5e04e415ce33c136f2c226a51d $(package)_dependencies=native_capnp define $(package)_config_cmds From a23eee1938927cd652a3f50e7d7655c41f15cd8c Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 30 Jan 2023 14:31:43 +0000 Subject: [PATCH 04/10] partial Merge bitcoin/bitcoin#23619: build: Propagate user-defined flags to host packages a3a2bd9e8ad360a63cc8bdfc365d8bfd25ecc720 ci: Drop no longer needed package-specific flags (Hennadii Stepanov) 071eef1e974f128131afe6c6b5c68a430c64687a build: Propagate user-defined flags to host packages (Hennadii Stepanov) Pull request description: On master (4f8b1f8759301d2553183e14f72444a0f1d80725) `{CPP,C,CXX,LD}FLAGS` that are specified in the command line are not propagated to packages: ``` $ make --no-print-directory -C depends print-libevent_cxxflags CXXFLAGS=-some-fancy-flag libevent_cxxflags=-pipe -O2 ``` This PR: - propagates `{CPP,C,CXX,LD}FLAGS` to host packages: ``` $ make --no-print-directory -C depends print-libevent_cxxflags CXXFLAGS=-some-fancy-flag libevent_cxxflags= -some-fancy-flag ``` - does not propagate `{CPP,C,CXX,LD}FLAGS` to native packages: ``` $ make --no-print-directory -C depends print-native_b2_cxxflags CXXFLAGS=-some-fancy-flag native_b2_cxxflags= ``` - actually addresses the https://github.com/bitcoin/bitcoin/pull/23551#issuecomment-973896518 ACKs for top commit: TheCharlatan: Code review ACK a3a2bd9e8ad360a63cc8bdfc365d8bfd25ecc720 Tree-SHA512: 243d6b1b0e9c5de46debc36de62a77b6b4d6f638940fd530040c219956ec624e321b0c25290fed164e3a8c88befa7b97b20f765d7b9a428c269b3720f21da099 --- depends/hosts/default.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/depends/hosts/default.mk b/depends/hosts/default.mk index 258619a9d0..57e71ad55f 100644 --- a/depends/hosts/default.mk +++ b/depends/hosts/default.mk @@ -29,8 +29,13 @@ host_$1=$$($(host_arch)_$(host_os)_$1) endef define add_host_flags_func +ifeq ($(filter $(origin $1),undefined default),) +$(host_arch)_$(host_os)_$1 = +$(host_arch)_$(host_os)_$(release_type)_$1 = $($1) +else $(host_arch)_$(host_os)_$1 += $($(host_os)_$1) $(host_arch)_$(host_os)_$(release_type)_$1 += $($(host_os)_$(release_type)_$1) +endif host_$1 = $$($(host_arch)_$(host_os)_$1) host_$(release_type)_$1 = $$($(host_arch)_$(host_os)_$(release_type)_$1) endef From 0dea19402619e67e2622129e9b4b914983ee1ec6 Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 5 Dec 2023 13:15:57 +0000 Subject: [PATCH 05/10] Merge bitcoin/bitcoin#28856: depends: Build the `native_capnp` and `capnp` packages with CMake 11d797e3a078b8f5f0039a1073047d3f0a8c6cdc depends: Build `native_capnp` package with CMake (Hennadii Stepanov) 90389c95e9edf3d705fb9376388c83f07d1a570e depends: Build `capnp` package with CMake (Hennadii Stepanov) Pull request description: The first commit fixes two bugs when cross-compiling the `capnp` package on the master branch @ 160d23677ad799cf9b493eaa923b2ac080c3fb8e: - for `x86_64-w64-mingw32` (see https://github.com/bitcoin/bitcoin/pull/28735#issuecomment-1790406668): ``` libtool: link: x86_64-w64-mingw32-g++-posix -shared -nostdlib /usr/lib/gcc/x86_64-w64-mingw32/12-posix/../../../../x86_64-w64-mingw32/lib/dllcrt2.o /usr/lib/gcc/x86_64-w64-mingw32/12-posix/crtbegin.o src/kj/.libs/cidr.o src/kj/.libs/common.o src/kj/.libs/units.o src/kj/.libs/memory.o src/kj/.libs/refcount.o src/kj/.libs/array.o src/kj/.libs/list.o src/kj/.libs/string.o src/kj/.libs/string-tree.o src/kj/.libs/source-location.o src/kj/.libs/hash.o src/kj/.libs/table.o src/kj/.libs/encoding.o src/kj/.libs/exception.o src/kj/.libs/debug.o src/kj/.libs/arena.o src/kj/.libs/io.o src/kj/.libs/mutex.o src/kj/.libs/thread.o src/kj/.libs/time.o src/kj/.libs/filesystem.o src/kj/.libs/filesystem-disk-unix.o src/kj/.libs/filesystem-disk-win32.o src/kj/.libs/test-helpers.o src/kj/.libs/main.o src/kj/parse/.libs/char.o -L/home/hebasto/git/bitcoin/depends/x86_64-w64-mingw32/lib -L/usr/lib/gcc/x86_64-w64-mingw32/12-posix -L/usr/lib/gcc/x86_64-w64-mingw32/12-posix/../../../../x86_64-w64-mingw32/lib -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lkernel32 -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lkernel32 /usr/lib/gcc/x86_64-w64-mingw32/12-posix/crtend.o -mthreads -O2 -mthreads -mthreads -o .libs/libkj-1-0-1.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libkj.dll.a /usr/bin/x86_64-w64-mingw32-ld: src/kj/.libs/cidr.o:cidr.c++:(.text+0x1dc): undefined reference to `__imp_inet_ntop' /usr/bin/x86_64-w64-mingw32-ld: src/kj/.libs/cidr.o:cidr.c++:(.text+0x44b): undefined reference to `__imp_inet_pton' collect2: error: ld returned 1 exit status ``` - for `arm64-apple-darwin`: ``` checking build system type... x86_64-pc-linux-gnu checking host system type... Invalid configuration `arm64-apple-darwin': machine `arm64-apple' not recognized configure: error: /bin/bash build-aux/config.sub arm64-apple-darwin failed ``` The second commit applies the same changes for the `native_capnp` package for [consistency](https://github.com/bitcoin/bitcoin/pull/28856#issuecomment-1807936546). ACKs for top commit: ryanofsky: Code review ACK 11d797e3a078b8f5f0039a1073047d3f0a8c6cdc. Since last review arm64-apple-darwin platform is now mentioned in the commit message, and the change to `depends/packages/libmultiprocess.mk` in d1604d4b1d1ee8df279a1776303e167cc3d06193 which was unrelated (but probably still a good optimization) was reverted. Tree-SHA512: c636e53073ce6fcda9724723bc59f3990fa9629a3b2f73d93dbc102a5a1badfbe8f4c5fef841f03588ebcad5cd4883f3ce32b128afcd75f6bc21eb801796a586 --- depends/packages/capnp.mk | 15 ++++++++------- depends/packages/native_capnp.mk | 10 ++++++++-- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/depends/packages/capnp.mk b/depends/packages/capnp.mk index 47df202771..1c1a77eb16 100644 --- a/depends/packages/capnp.mk +++ b/depends/packages/capnp.mk @@ -4,18 +4,15 @@ $(package)_download_path=$(native_$(package)_download_path) $(package)_download_file=$(native_$(package)_download_file) $(package)_file_name=$(native_$(package)_file_name) $(package)_sha256_hash=$(native_$(package)_sha256_hash) -$(package)_dependencies=native_$(package) define $(package)_set_vars := -$(package)_config_opts := --with-external-capnp -$(package)_config_opts += --without-openssl -$(package)_config_opts += CAPNP="$$(native_capnp_prefixbin)/capnp" -$(package)_config_opts += CAPNP_CXX="$$(native_capnp_prefixbin)/capnp-c++" -$(package)_config_opts_android := --disable-shared +$(package)_config_opts := -DBUILD_TESTING=OFF +$(package)_config_opts += -DWITH_OPENSSL=OFF +$(package)_config_opts += -DWITH_ZLIB=OFF endef define $(package)_config_cmds - $($(package)_autoconf) + $($(package)_cmake) . endef define $(package)_build_cmds @@ -25,3 +22,7 @@ endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef + +define $(package)_postprocess_cmds + rm -rf lib/pkgconfig +endef diff --git a/depends/packages/native_capnp.mk b/depends/packages/native_capnp.mk index ad87eed354..484e78d5d9 100644 --- a/depends/packages/native_capnp.mk +++ b/depends/packages/native_capnp.mk @@ -6,11 +6,13 @@ $(package)_file_name=capnproto-cxx-$($(package)_version).tar.gz $(package)_sha256_hash=0f7f4b8a76a2cdb284fddef20de8306450df6dd031a47a15ac95bc43c3358e09 define $(package)_set_vars - $(package)_config_opts = --without-openssl + $(package)_config_opts := -DBUILD_TESTING=OFF + $(package)_config_opts += -DWITH_OPENSSL=OFF + $(package)_config_opts += -DWITH_ZLIB=OFF endef define $(package)_config_cmds - $($(package)_autoconf) + $($(package)_cmake) . endef define $(package)_build_cmds @@ -20,3 +22,7 @@ endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef + +define $(package)_postprocess_cmds + rm -rf lib/pkgconfig +endef From be07bbe87eacc1ec697231491e4294dd920370c7 Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 13 Dec 2023 10:41:33 +0000 Subject: [PATCH 06/10] Merge bitcoin/bitcoin#28846: depends: fix libmultiprocess build on aarch64 bde8d63b17637c507a543cebe90f2998b5847373 depends: build libmultiprocess with position independant code (fanquake) 506634d79d6427925cd458f67799fe59e0ab14dd depends: always install libmultiprocess to /lib (fanquake) beb309626381bf189cd2ae8bde83078b9de47c6a depends: always install capnp to /lib (fanquake) Pull request description: Change to always install libmultiprocess into `lib/`. On some systems (my Fedora aarch64 box), libmultiprocess was being installed into `lib64/`, and then configure would fail to pick it up, because we only add `lib/` to pkgconfig/ldflags out of depends. Rather than adding lib64 to those, I opted for installing libmultiprocess into lib, with every other dependency we build. This was broken in our build after https://github.com/chaincodelabs/libmultiprocess/pull/79 upstream. ACKs for top commit: ryanofsky: Code review ACK bde8d63b17637c507a543cebe90f2998b5847373. Only changes since last review were reverting the native_capnp change as suggested, and changing the order of the first two commits. Tree-SHA512: ddd547e4ac224f2f199c569efd91104db7f2c243b124f9535aa0d9377315775ac566d699101580ce45ddd6676ad3e0c8cbe256334eeed9548205c2fa04d02102 --- depends/packages/capnp.mk | 11 ++++++++--- depends/packages/libmultiprocess.mk | 6 ++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/depends/packages/capnp.mk b/depends/packages/capnp.mk index 1c1a77eb16..2465c8091b 100644 --- a/depends/packages/capnp.mk +++ b/depends/packages/capnp.mk @@ -5,10 +5,15 @@ $(package)_download_file=$(native_$(package)_download_file) $(package)_file_name=$(native_$(package)_file_name) $(package)_sha256_hash=$(native_$(package)_sha256_hash) +# Hardcode library install path to "lib" to match the PKG_CONFIG_PATH +# setting in depends/config.site.in, which also hardcodes "lib". +# Without this setting, cmake by default would use the OS library +# directory, which might be "lib64" or something else, not "lib", on multiarch systems. define $(package)_set_vars := -$(package)_config_opts := -DBUILD_TESTING=OFF -$(package)_config_opts += -DWITH_OPENSSL=OFF -$(package)_config_opts += -DWITH_ZLIB=OFF + $(package)_config_opts := -DBUILD_TESTING=OFF + $(package)_config_opts += -DWITH_OPENSSL=OFF + $(package)_config_opts += -DWITH_ZLIB=OFF + $(package)_config_opts += -DCMAKE_INSTALL_LIBDIR=lib/ endef define $(package)_config_cmds diff --git a/depends/packages/libmultiprocess.mk b/depends/packages/libmultiprocess.mk index 765d649377..d237f52dbb 100644 --- a/depends/packages/libmultiprocess.mk +++ b/depends/packages/libmultiprocess.mk @@ -8,7 +8,13 @@ ifneq ($(host),$(build)) $(package)_dependencies += native_capnp endif +# Hardcode library install path to "lib" to match the PKG_CONFIG_PATH +# setting in depends/config.site.in, which also hardcodes "lib". +# Without this setting, cmake by default would use the OS library +# directory, which might be "lib64" or something else, not "lib", on multiarch systems. define $(package)_set_vars := +$(package)_config_opts += -DCMAKE_INSTALL_LIBDIR=lib/ +$(package)_config_opts += -DCMAKE_POSITION_INDEPENDENT_CODE=ON ifneq ($(host),$(build)) $(package)_config_opts := -DCAPNP_EXECUTABLE="$$(native_capnp_prefixbin)/capnp" $(package)_config_opts += -DCAPNPC_CXX_EXECUTABLE="$$(native_capnp_prefixbin)/capnpc-c++" From 9f0e4ae82aca83a24db6a5ac5e754e7f40362ed6 Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 25 Mar 2024 16:30:06 +0000 Subject: [PATCH 07/10] Merge bitcoin/bitcoin#29706: depends: set two CMake options globally 76045bb9d6808931cd0f2933203b5b611e032ec8 depends: always set CMAKE_POSITION_INDEPENDENT_CODE=ON (fanquake) d04623678c70ff58a20fb5c35d33cb8f483f1efb depends: always set CMAKE_INSTALL_LIBDIR=lib/ (fanquake) Pull request description: Set `CMAKE_INSTALL_LIBDIR=lib/` and `CMAKE_POSITION_INDEPENDENT_CODE=ON` globally in depends, rather than per-package. `CMAKE_INSTALL_LIBDIR=lib/` is needed to override the annoying [`GNUInstallDirs`](https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html) `lib` vs `lib64` behaviour, and we always want PIC code. The PIC commit is the counterpart to the same Autotools change in #29488. I'm PRing these commits as I have a CMake branch building on top, and want to avoid adding the same workarounds to every package we are going to touch, but these can go in separately as the build should be tested for existing packages (i.e multiprocess). ACKs for top commit: hebasto: re-ACK 76045bb9d6808931cd0f2933203b5b611e032ec8. theuni: utACK 76045bb9d6808931cd0f2933203b5b611e032ec8. Both changes make sense to me, and both can be overridden if needed, though I can't imagine we'd need to. Tree-SHA512: 655a0b6b7ee5a5820f52e8e919ef03fc216d29f13f3904f72b64ce57436510e073c903039488d5740535c56e1f6221267229238c5231de5f8467d238fd562578 --- depends/funcs.mk | 9 ++++++++- depends/packages.md | 2 +- depends/packages/capnp.mk | 5 ----- depends/packages/libmultiprocess.mk | 6 ------ 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/depends/funcs.mk b/depends/funcs.mk index 324475b79c..e76a69ffce 100644 --- a/depends/funcs.mk +++ b/depends/funcs.mk @@ -170,12 +170,19 @@ ifneq ($($(1)_ldflags),) $(1)_autoconf += LDFLAGS="$$($(1)_ldflags)" endif +# We hardcode the library install path to "lib" to match the PKG_CONFIG_PATH +# setting in depends/config.site.in, which also hardcodes "lib". +# Without this setting, CMake by default would use the OS library +# directory, which might be "lib64" or something else, not "lib", on multiarch systems. $(1)_cmake=env CC="$$($(1)_cc)" \ CFLAGS="$$($(1)_cppflags) $$($(1)_cflags)" \ CXX="$$($(1)_cxx)" \ CXXFLAGS="$$($(1)_cppflags) $$($(1)_cxxflags)" \ LDFLAGS="$$($(1)_ldflags)" \ - cmake -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" $$($(1)_config_opts) + cmake -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" \ + -DCMAKE_INSTALL_LIBDIR=lib/ \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + $$($(1)_config_opts) ifeq ($($(1)_type),build) $(1)_cmake += -DCMAKE_INSTALL_RPATH:PATH="$$($($(1)_type)_prefix)/lib" else diff --git a/depends/packages.md b/depends/packages.md index 6d09f8c97b..1300d6de03 100644 --- a/depends/packages.md +++ b/depends/packages.md @@ -164,7 +164,7 @@ From the [Gentoo Wiki entry](https://wiki.gentoo.org/wiki/Project:Quality_Assura > ecosystem, as it leads to a massive number of unnecessary rebuilds. Where possible, packages are built with Position Independant Code. Either using -the autotools `--with-pic` flag, or `DCMAKE_POSITION_INDEPENDENT_CODE` with CMake. +the Autotools `--with-pic` flag, or `CMAKE_POSITION_INDEPENDENT_CODE` with CMake. ## Secondary dependencies: diff --git a/depends/packages/capnp.mk b/depends/packages/capnp.mk index 2465c8091b..6d792db711 100644 --- a/depends/packages/capnp.mk +++ b/depends/packages/capnp.mk @@ -5,15 +5,10 @@ $(package)_download_file=$(native_$(package)_download_file) $(package)_file_name=$(native_$(package)_file_name) $(package)_sha256_hash=$(native_$(package)_sha256_hash) -# Hardcode library install path to "lib" to match the PKG_CONFIG_PATH -# setting in depends/config.site.in, which also hardcodes "lib". -# Without this setting, cmake by default would use the OS library -# directory, which might be "lib64" or something else, not "lib", on multiarch systems. define $(package)_set_vars := $(package)_config_opts := -DBUILD_TESTING=OFF $(package)_config_opts += -DWITH_OPENSSL=OFF $(package)_config_opts += -DWITH_ZLIB=OFF - $(package)_config_opts += -DCMAKE_INSTALL_LIBDIR=lib/ endef define $(package)_config_cmds diff --git a/depends/packages/libmultiprocess.mk b/depends/packages/libmultiprocess.mk index d237f52dbb..765d649377 100644 --- a/depends/packages/libmultiprocess.mk +++ b/depends/packages/libmultiprocess.mk @@ -8,13 +8,7 @@ ifneq ($(host),$(build)) $(package)_dependencies += native_capnp endif -# Hardcode library install path to "lib" to match the PKG_CONFIG_PATH -# setting in depends/config.site.in, which also hardcodes "lib". -# Without this setting, cmake by default would use the OS library -# directory, which might be "lib64" or something else, not "lib", on multiarch systems. define $(package)_set_vars := -$(package)_config_opts += -DCMAKE_INSTALL_LIBDIR=lib/ -$(package)_config_opts += -DCMAKE_POSITION_INDEPENDENT_CODE=ON ifneq ($(host),$(build)) $(package)_config_opts := -DCAPNP_EXECUTABLE="$$(native_capnp_prefixbin)/capnp" $(package)_config_opts += -DCAPNPC_CXX_EXECUTABLE="$$(native_capnp_prefixbin)/capnpc-c++" From 02f81e5e3513b5322530bdcbe2d25e70c3330510 Mon Sep 17 00:00:00 2001 From: pasta Date: Thu, 3 Oct 2024 00:59:07 -0500 Subject: [PATCH 08/10] Merge bitcoin#23511: require glibc 2.18+ follow to 07bd5977e57b7151149438367d150e6abd1f3aa2 --- contrib/guix/libexec/build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index e5fc7cb275..b4192f20c4 100755 --- a/contrib/guix/libexec/build.sh +++ b/contrib/guix/libexec/build.sh @@ -236,7 +236,6 @@ mkdir -p "$OUTDIR" # CONFIGFLAGS CONFIGFLAGS+=" --enable-reduce-exports --disable-bench --disable-gui-tests --disable-fuzz-binary" case "$HOST" in - *linux*) CONFIGFLAGS+=" --disable-threadlocal" ;; *mingw*) CONFIGFLAGS+=" --disable-miner" ;; esac From 142245d29aec5208e9920a8d3e1fdd351b729ced Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 2 Apr 2024 14:53:51 +0100 Subject: [PATCH 09/10] Merge bitcoin/bitcoin#29733: build, macos: Drop unused `osx_volname` target eff19fa1c8d736d30dea937ebce0b372c19b7559 build, macos: Drop unused `osx_volname` target (Hennadii Stepanov) Pull request description: The `osx_volname` makefile target was introduced in https://github.com/bitcoin/bitcoin/pull/7192 and was used to pass the package name to Gitian scripts as a content of the `osx_volname` file. With the current Guix scripts, the `osx_volname` file is never read. Therefore, its creation might be omitted. My Guix builds: ``` x86_64 5e2d254e207d53784621c8df331c9bf4a969da667d185992402f48a5ac49f563 guix-build-eff19fa1c8d7/output/arm64-apple-darwin/SHA256SUMS.part 089dba70685893aca5e7c8ce1d53a07380e87ca50eda8b3a2a75aeaeb1d28e48 guix-build-eff19fa1c8d7/output/arm64-apple-darwin/bitcoin-eff19fa1c8d7-arm64-apple-darwin-unsigned.tar.gz 390c57197c6ab4aefdde1c665d5e4ebdfb4ae5e553f8f93b017f2fad1093d110 guix-build-eff19fa1c8d7/output/arm64-apple-darwin/bitcoin-eff19fa1c8d7-arm64-apple-darwin-unsigned.zip e1edde7ca28bf26aea8d956b1d3c1725a475f2a9c148f5c36b651db4b814091c guix-build-eff19fa1c8d7/output/arm64-apple-darwin/bitcoin-eff19fa1c8d7-arm64-apple-darwin.tar.gz d0096ea73a5f75cc4d3cef4ef1761ae3e48c8a63aff918f07371c5c88896e4e6 guix-build-eff19fa1c8d7/output/dist-archive/bitcoin-eff19fa1c8d7.tar.gz 51b4affb9fd6f8aea05b7d25d29f017d0a0a145395f457caa14b9af9646b035b guix-build-eff19fa1c8d7/output/x86_64-apple-darwin/SHA256SUMS.part b1df081ecf636a92754e673e5388d1d988653d4646f0b0446a4c9f14d865a265 guix-build-eff19fa1c8d7/output/x86_64-apple-darwin/bitcoin-eff19fa1c8d7-x86_64-apple-darwin-unsigned.tar.gz 62e09926029d176da950d3e3db7ff8ae6cbe4c0b2ea17b084fc1d28565f91475 guix-build-eff19fa1c8d7/output/x86_64-apple-darwin/bitcoin-eff19fa1c8d7-x86_64-apple-darwin-unsigned.zip 477dcb2382cbd447bd88a3b644b4bd736f5b67d66d42cb73fe31ffc153d3e181 guix-build-eff19fa1c8d7/output/x86_64-apple-darwin/bitcoin-eff19fa1c8d7-x86_64-apple-darwin.tar.gz ``` ACKs for top commit: Empact: ACK https://github.com/bitcoin/bitcoin/pull/29733/commits/eff19fa1c8d736d30dea937ebce0b372c19b7559 Sjors: tACK eff19fa1c8d736d30dea937ebce0b372c19b7559 TheCharlatan: ACK eff19fa1c8d736d30dea937ebce0b372c19b7559 Tree-SHA512: 29714be5c58caa07b3eb99846d71bb83366dade769af022059bb3c499878adcd34cdf03b006c5da561291f373ccc59abdb83c925057ec0049465eaa8dd6ef4e1 --- .gitignore | 1 - Makefile.am | 5 +---- contrib/guix/libexec/build.sh | 2 -- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index e5b3265f88..949403cc23 100644 --- a/.gitignore +++ b/.gitignore @@ -161,7 +161,6 @@ cmake-build-debug # clang-check *.plist -osx_volname dist/ /guix-build-* diff --git a/Makefile.am b/Makefile.am index 887f9ad4ec..5c628914ed 100644 --- a/Makefile.am +++ b/Makefile.am @@ -119,9 +119,6 @@ OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lp $(OSX_APP)/Contents/Resources/dash.icns $(OSX_APP)/Contents/Info.plist \ $(OSX_APP)/Contents/MacOS/Dash-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings -osx_volname: - echo $(OSX_VOLNAME) >$@ - if BUILD_DARWIN $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR) -dmg @@ -323,7 +320,7 @@ clean-docs: clean-local: clean-docs rm -rf coverage_percent.txt test_dash.coverage/ total.coverage/ fuzz.coverage/ test/tmp/ cache/ $(OSX_APP) rm -rf test/functional/__pycache__ test/functional/test_framework/__pycache__ test/cache share/rpcauth/__pycache__ - rm -rf osx_volname dist/ + rm -rf dist/ test-security-check: if TARGET_DARWIN diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index b4192f20c4..2618bfe226 100755 --- a/contrib/guix/libexec/build.sh +++ b/contrib/guix/libexec/build.sh @@ -323,11 +323,9 @@ mkdir -p "$DISTSRC" case "$HOST" in *darwin*) - make osx_volname ${V:+V=1} make deploydir ${V:+V=1} mkdir -p "unsigned-app-${HOST}" cp --target-directory="unsigned-app-${HOST}" \ - osx_volname \ contrib/macdeploy/detached-sig-create.sh \ "${BASEPREFIX}/${HOST}"/native/bin/dmg mv --target-directory="unsigned-app-${HOST}" dist From 2f751ed127e47c5690c02ced2b2288bed3d32ac3 Mon Sep 17 00:00:00 2001 From: pasta Date: Thu, 3 Oct 2024 10:45:54 -0500 Subject: [PATCH 10/10] fixup! Merge bitcoin/bitcoin#30567: qt, build: Drop `QT_STATICPLUGIN` macro continue using logprintf --- src/qt/guiutil.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 3ce055f7d0..cc261965b8 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -1862,24 +1862,25 @@ void LogQtInfo() #else const std::string qt_link{"dynamic"}; #endif - LogInfo("Qt %s (%s), plugin=%s\n", qVersion(), qt_link, QGuiApplication::platformName().toStdString()); + // TODO replace instances of LogPrintf with LogInfo once 28318 is merged + LogPrintf("Qt %s (%s), plugin=%s\n", qVersion(), qt_link, QGuiApplication::platformName().toStdString()); const auto static_plugins = QPluginLoader::staticPlugins(); if (static_plugins.empty()) { - LogInfo("No static plugins.\n"); + LogPrintf("No static plugins.\n"); } else { - LogInfo("Static plugins:\n"); + LogPrintf("Static plugins:\n"); for (const QStaticPlugin& p : static_plugins) { QJsonObject meta_data = p.metaData(); const std::string plugin_class = meta_data.take(QString("className")).toString().toStdString(); const int plugin_version = meta_data.take(QString("version")).toInt(); - LogInfo(" %s, version %d\n", plugin_class, plugin_version); + LogPrintf(" %s, version %d\n", plugin_class, plugin_version); } } - LogInfo("Style: %s / %s\n", QApplication::style()->objectName().toStdString(), QApplication::style()->metaObject()->className()); - LogInfo("System: %s, %s\n", QSysInfo::prettyProductName().toStdString(), QSysInfo::buildAbi().toStdString()); + LogPrintf("Style: %s / %s\n", QApplication::style()->objectName().toStdString(), QApplication::style()->metaObject()->className()); + LogPrintf("System: %s, %s\n", QSysInfo::prettyProductName().toStdString(), QSysInfo::buildAbi().toStdString()); for (const QScreen* s : QGuiApplication::screens()) { - LogInfo("Screen: %s %dx%d, pixel ratio=%.1f\n", s->name().toStdString(), s->size().width(), s->size().height(), s->devicePixelRatio()); + LogPrintf("Screen: %s %dx%d, pixel ratio=%.1f\n", s->name().toStdString(), s->size().width(), s->size().height(), s->devicePixelRatio()); } }