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/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/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index e5fc7cb275..2618bfe226 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 @@ -324,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 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/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 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 47df202771..6d792db711 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 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 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..cc261965b8 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -1862,12 +1862,8 @@ 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); + // 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()) { LogPrintf("No static plugins.\n"); 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); 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 {