From 648a5fbf72868b2464a094ab91b14323e3d0f048 Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Wed, 29 Jan 2025 18:23:38 +0100 Subject: [PATCH 1/6] build: add bitcoin-{node,gui} to Maintenance.cmake --- cmake/module/Maintenance.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/module/Maintenance.cmake b/cmake/module/Maintenance.cmake index 4103c9b6383..01a99ec0138 100644 --- a/cmake/module/Maintenance.cmake +++ b/cmake/module/Maintenance.cmake @@ -23,7 +23,7 @@ function(add_maintenance_targets) return() endif() - foreach(target IN ITEMS bitcoind bitcoin-qt bitcoin-cli bitcoin-tx bitcoin-util bitcoin-wallet test_bitcoin bench_bitcoin) + foreach(target IN ITEMS bitcoind bitcoin-node bitcoin-qt bitcoin-gui bitcoin-cli bitcoin-tx bitcoin-util bitcoin-wallet test_bitcoin bench_bitcoin) if(TARGET ${target}) list(APPEND executables $) endif() From 818fdadd09f8f419f045cca1be6b0c04549bc08a Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Thu, 17 Apr 2025 14:40:29 +0200 Subject: [PATCH 2/6] build: depends makes libmultiprocess by default This causes IPC binaries (bitcoin-node, bitcoin-gui) to be included in releases. The effect on CI is that this causes more depends builds to build IPC binaries, but still the only build running functional tests with them is the i686_multiprocess one. Except for Windows and OpenBSD. --- ci/test/00_setup_env_i686_multiprocess.sh | 2 +- depends/Makefile | 11 +++++++---- depends/README.md | 2 +- depends/toolchain.cmake.in | 7 ++++--- doc/multiprocess.md | 6 +++--- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/ci/test/00_setup_env_i686_multiprocess.sh b/ci/test/00_setup_env_i686_multiprocess.sh index d7c8e3ef1b9..74f9f15f826 100755 --- a/ci/test/00_setup_env_i686_multiprocess.sh +++ b/ci/test/00_setup_env_i686_multiprocess.sh @@ -11,7 +11,7 @@ export CONTAINER_NAME=ci_i686_multiprocess export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" export CI_IMAGE_PLATFORM="linux/amd64" export PACKAGES="llvm clang g++-multilib" -export DEP_OPTS="DEBUG=1 MULTIPROCESS=1" +export DEP_OPTS="DEBUG=1" export GOAL="install" export TEST_RUNNER_EXTRA="--v2transport" export BITCOIN_CONFIG="\ diff --git a/depends/Makefile b/depends/Makefile index 9eb00a425a5..d56698f6d96 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -40,7 +40,10 @@ NO_BDB ?= NO_WALLET ?= NO_ZMQ ?= NO_USDT ?= -MULTIPROCESS ?= +# Default NO_IPC value is 1 on unsupported host platforms: +# - Windows +# - OpenBSD: https://github.com/capnproto/capnproto/pull/1907 +NO_IPC ?= $(if $(findstring mingw32,$(HOST))$(findstring openbsd,$(HOST)),1,) LTO ?= FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources @@ -163,7 +166,7 @@ bdb_packages_$(NO_BDB) = $(bdb_packages) wallet_packages_$(NO_WALLET) = $(bdb_packages_) $(sqlite_packages) zmq_packages_$(NO_ZMQ) = $(zmq_packages) -multiprocess_packages_$(MULTIPROCESS) = $(multiprocess_packages) +multiprocess_packages_$(NO_IPC) = $(multiprocess_packages) usdt_packages_$(NO_USDT) = $(usdt_$(host_os)_packages) packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(boost_packages_) $(libevent_packages_) $(qt_packages_) $(wallet_packages_) $(usdt_packages_) @@ -173,7 +176,7 @@ ifneq ($(zmq_packages_),) packages += $(zmq_packages) endif -ifeq ($(multiprocess_packages_),) +ifneq ($(multiprocess_packages_),) packages += $(multiprocess_packages) native_packages += $(multiprocess_native_packages) endif @@ -234,7 +237,7 @@ $(host_prefix)/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_$(fina -e 's|@wallet_packages@|$(wallet_packages_)|' \ -e 's|@bdb_packages@|$(bdb_packages_)|' \ -e 's|@usdt_packages@|$(usdt_packages_)|' \ - -e 's|@multiprocess@|$(MULTIPROCESS)|' \ + -e 's|@multiprocess_packages@|$(multiprocess_packages_)|' \ $< > $@ touch $@ diff --git a/depends/README.md b/depends/README.md index ab1df59a884..61cf436b0b8 100644 --- a/depends/README.md +++ b/depends/README.md @@ -118,7 +118,7 @@ The following can be set when running make: `make FOO=bar` - `NO_WALLET`: Don't download/build/cache libs needed to enable the wallet (SQLite) - `NO_BDB`: Don't download/build/cache BerkeleyDB - `NO_USDT`: Don't download/build/cache packages needed for enabling USDT tracepoints -- `MULTIPROCESS`: Build libmultiprocess (experimental) +- `NO_IPC`: Don't build Cap’n Proto and libmultiprocess packages, and disable building IPC binaries (bitcoin-node, bitcoin-gui). Default on Windows and OpenBSD. - `DEBUG`: Disable some optimizations and enable more runtime checking - `HOST_ID_SALT`: Optional salt to use when generating host package ids - `BUILD_ID_SALT`: Optional salt to use when generating build package ids diff --git a/depends/toolchain.cmake.in b/depends/toolchain.cmake.in index d247a80c9cc..ed6a812bcf4 100644 --- a/depends/toolchain.cmake.in +++ b/depends/toolchain.cmake.in @@ -158,11 +158,12 @@ else() set(WITH_USDT ON CACHE BOOL "") endif() -if("@multiprocess@" STREQUAL "1") +set(multiprocess_packages @multiprocess_packages@) +if("${multiprocess_packages}" STREQUAL "") + set(ENABLE_IPC OFF CACHE BOOL "") +else() set(ENABLE_IPC ON CACHE BOOL "") set(MPGEN_EXECUTABLE "${CMAKE_CURRENT_LIST_DIR}/native/bin/mpgen" CACHE FILEPATH "") set(CAPNP_EXECUTABLE "${CMAKE_CURRENT_LIST_DIR}/native/bin/capnp" CACHE FILEPATH "") set(CAPNPC_CXX_EXECUTABLE "${CMAKE_CURRENT_LIST_DIR}/native/bin/capnpc-c++" CACHE FILEPATH "") -else() - set(ENABLE_IPC OFF CACHE BOOL "") endif() diff --git a/doc/multiprocess.md b/doc/multiprocess.md index 33c5a44aa82..5886b00f24b 100644 --- a/doc/multiprocess.md +++ b/doc/multiprocess.md @@ -16,11 +16,11 @@ Specifying `-DENABLE_IPC=ON` requires [Cap'n Proto](https://capnproto.org/) to b ### Depends installation -Alternately the [depends system](../depends) can be used to avoid need to install local dependencies. A simple way to get started is to pass the `MULTIPROCESS=1` [dependency option](../depends#dependency-options) to make: +Alternatively the [depends system](../depends) can be used to avoid needing to install local dependencies: ``` cd -make -C depends NO_QT=1 MULTIPROCESS=1 +make -C depends NO_QT=1 # Set host platform to output of gcc -dumpmachine or clang -dumpmachine or check the depends/ directory for the generated subdirectory name HOST_PLATFORM="x86_64-pc-linux-gnu" cmake -B build --toolchain=depends/$HOST_PLATFORM/toolchain.cmake @@ -29,7 +29,7 @@ build/bin/bitcoin-node -regtest -printtoconsole -debug=ipc BITCOIND=$(pwd)/build/bin/bitcoin-node build/test/functional/test_runner.py ``` -The `cmake` build will pick up settings and library locations from the depends directory, so there is no need to pass `-DENABLE_IPC=ON` as a separate flag when using the depends system (it's controlled by the `MULTIPROCESS=1` option). +The `cmake` build will pick up settings and library locations from the depends directory, so there is no need to pass `-DENABLE_IPC=ON` as a separate flag when using the depends system (it's controlled by the `NO_IPC=1` option). ### Cross-compiling From 792f847a06f570e1b02e6129ac2b3d4bf3373f0d Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Wed, 29 Jan 2025 18:19:22 +0100 Subject: [PATCH 3/6] ci: build one depends job without multiprocess --- .cirrus.yml | 4 ++-- ..._multiprocess.sh => 00_setup_env_i686_no_multiprocess.sh} | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) rename ci/test/{00_setup_env_i686_multiprocess.sh => 00_setup_env_i686_no_multiprocess.sh} (83%) diff --git a/.cirrus.yml b/.cirrus.yml index c047bacd88f..640de20b51c 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -172,13 +172,13 @@ task: FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh" task: - name: 'multiprocess, i686, DEBUG' + name: 'no multiprocess, i686, DEBUG' << : *GLOBAL_TASK_TEMPLATE persistent_worker: labels: type: medium env: - FILE_ENV: "./ci/test/00_setup_env_i686_multiprocess.sh" + FILE_ENV: "./ci/test/00_setup_env_i686_no_multiprocess.sh" task: name: 'no wallet, libbitcoinkernel' diff --git a/ci/test/00_setup_env_i686_multiprocess.sh b/ci/test/00_setup_env_i686_no_multiprocess.sh similarity index 83% rename from ci/test/00_setup_env_i686_multiprocess.sh rename to ci/test/00_setup_env_i686_no_multiprocess.sh index 74f9f15f826..35100b2e435 100755 --- a/ci/test/00_setup_env_i686_multiprocess.sh +++ b/ci/test/00_setup_env_i686_no_multiprocess.sh @@ -7,11 +7,11 @@ export LC_ALL=C.UTF-8 export HOST=i686-pc-linux-gnu -export CONTAINER_NAME=ci_i686_multiprocess +export CONTAINER_NAME=ci_i686_no_multiprocess export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" export CI_IMAGE_PLATFORM="linux/amd64" export PACKAGES="llvm clang g++-multilib" -export DEP_OPTS="DEBUG=1" +export DEP_OPTS="DEBUG=1 NO_IPC=1" export GOAL="install" export TEST_RUNNER_EXTRA="--v2transport" export BITCOIN_CONFIG="\ @@ -20,4 +20,3 @@ export BITCOIN_CONFIG="\ -DCMAKE_CXX_COMPILER='clang++;-m32' \ -DAPPEND_CPPFLAGS='-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE' \ " -export BITCOIND=bitcoin-node # Used in functional tests From f64082df8faf562f068d9cae4884d13744c4d0a4 Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Fri, 11 Apr 2025 18:06:29 -0400 Subject: [PATCH 4/6] ci: use bitcoin-node for one depends job The bitcoin-node binary is built on all platforms which have multiprocess enabled, but for functional tests it's only used in CentOS native (depends) job. The next commit will also add a non-depends job. --- ci/test/00_setup_env_native_centos.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/test/00_setup_env_native_centos.sh b/ci/test/00_setup_env_native_centos.sh index 4f06a29daf4..b2afe1b0419 100755 --- a/ci/test/00_setup_env_native_centos.sh +++ b/ci/test/00_setup_env_native_centos.sh @@ -13,3 +13,4 @@ export PIP_PACKAGES="pyzmq" export DEP_OPTS="DEBUG=1" # Temporarily enable a DEBUG=1 build to check for GCC-bug-117966 regressions. This can be removed once the minimum GCC version is bumped to 12 in the previous releases task, see https://github.com/bitcoin/bitcoin/issues/31436#issuecomment-2530717875 export GOAL="install" export BITCOIN_CONFIG="-DWITH_ZMQ=ON -DBUILD_GUI=ON -DREDUCE_EXPORTS=ON -DCMAKE_BUILD_TYPE=Debug" +export BITCOIND=bitcoin-node # Used in functional tests From a9478dd814aff068ac60724c58c1d87376ccc4de Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Thu, 17 Apr 2025 15:04:56 +0200 Subject: [PATCH 5/6] cmake: enable ENABLE_IPC option by default Install capnp on non-depends CI jobs. Use the bitcoin-node binary in the macOS native non-depends job. Co-authored-by: Ryan Ofsky --- .github/workflows/ci.yml | 4 ++-- CMakeLists.txt | 2 +- ci/test/00_setup_env_mac_native.sh | 7 ++++++- ci/test/00_setup_env_native_asan.sh | 8 ++++++-- ci/test/00_setup_env_native_fuzz.sh | 2 +- ci/test/00_setup_env_native_fuzz_with_valgrind.sh | 2 +- ci/test/00_setup_env_native_tidy.sh | 9 +++++++-- ci/test/00_setup_env_native_valgrind.sh | 7 +++++-- doc/multiprocess.md | 2 +- 9 files changed, 30 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d8fdb4a16e..3547a48eb1d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,7 +77,7 @@ jobs: git config user.name "CI" - run: | sudo apt-get update - sudo apt-get install clang ccache build-essential cmake ninja-build pkgconf python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libzmq3-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev -y + sudo apt-get install clang ccache build-essential cmake ninja-build pkgconf python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libzmq3-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev libcapnp-dev capnproto -y - name: Compile and run tests run: | # Run tests on commits after the last merge commit and before the PR head commit @@ -133,7 +133,7 @@ jobs: run: | # A workaround for "The `brew link` step did not complete successfully" error. brew install --quiet python@3 || brew link --overwrite python@3 - brew install --quiet coreutils ninja pkgconf gnu-getopt ccache boost libevent zeromq qt@6 qrencode + brew install --quiet coreutils ninja pkgconf gnu-getopt ccache boost libevent zeromq qt@6 qrencode capnp - name: Set Ccache directory run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV" diff --git a/CMakeLists.txt b/CMakeLists.txt index b272658177f..6acd7c06227 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,7 +153,7 @@ endif() cmake_dependent_option(WITH_DBUS "Enable DBus support." ON "CMAKE_SYSTEM_NAME STREQUAL \"Linux\" AND BUILD_GUI" OFF) -option(ENABLE_IPC "Build multiprocess bitcoin-node and bitcoin-gui executables in addition to monolithic bitcoind and bitcoin-qt executables. Requires libmultiprocess library. Experimental." OFF) +cmake_dependent_option(ENABLE_IPC "Build multiprocess bitcoin-node and bitcoin-gui executables in addition to monolithic bitcoind and bitcoin-qt executables." ON "NOT WIN32" OFF) cmake_dependent_option(WITH_EXTERNAL_LIBMULTIPROCESS "Build with external libmultiprocess library instead of with local git subtree when ENABLE_IPC is enabled. This is not normally recommended, but can be useful for developing libmultiprocess itself." OFF "ENABLE_IPC" OFF) if(ENABLE_IPC AND WITH_EXTERNAL_LIBMULTIPROCESS) find_package(Libmultiprocess REQUIRED COMPONENTS Lib) diff --git a/ci/test/00_setup_env_mac_native.sh b/ci/test/00_setup_env_mac_native.sh index e01a56895bf..a218a05f6f9 100755 --- a/ci/test/00_setup_env_mac_native.sh +++ b/ci/test/00_setup_env_mac_native.sh @@ -11,7 +11,12 @@ export LC_ALL=C.UTF-8 export PIP_PACKAGES="--break-system-packages zmq" export GOAL="install" export CMAKE_GENERATOR="Ninja" -export BITCOIN_CONFIG="-DBUILD_GUI=ON -DWITH_ZMQ=ON -DREDUCE_EXPORTS=ON" +export BITCOIN_CONFIG="\ + -DBUILD_GUI=ON \ + -DWITH_ZMQ=ON \ + -DREDUCE_EXPORTS=ON \ +" export CI_OS_NAME="macos" export NO_DEPENDS=1 export OSX_SDK="" +export BITCOIND=bitcoin-node # Used in functional tests diff --git a/ci/test/00_setup_env_native_asan.sh b/ci/test/00_setup_env_native_asan.sh index bd67dba6888..98c4e54442b 100755 --- a/ci/test/00_setup_env_native_asan.sh +++ b/ci/test/00_setup_env_native_asan.sh @@ -20,11 +20,15 @@ fi export CONTAINER_NAME=ci_native_asan export APT_LLVM_V="20" -export PACKAGES="systemtap-sdt-dev clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev python3-zmq qt6-base-dev qt6-tools-dev qt6-l10n-tools libevent-dev libboost-dev libdb5.3++-dev libzmq3-dev libqrencode-dev libsqlite3-dev ${BPFCC_PACKAGE}" +export PACKAGES="systemtap-sdt-dev clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev python3-zmq qt6-base-dev qt6-tools-dev qt6-l10n-tools libevent-dev libboost-dev libdb5.3++-dev libzmq3-dev libqrencode-dev libsqlite3-dev ${BPFCC_PACKAGE} libcapnp-dev capnproto" export NO_DEPENDS=1 export GOAL="install" export BITCOIN_CONFIG="\ - -DWITH_USDT=ON -DWITH_ZMQ=ON -DWITH_BDB=ON -DWARN_INCOMPATIBLE_BDB=OFF -DBUILD_GUI=ON \ + -DWITH_USDT=ON \ + -DWITH_ZMQ=ON \ + -DWITH_BDB=ON \ + -DWARN_INCOMPATIBLE_BDB=OFF \ + -DBUILD_GUI=ON \ -DSANITIZERS=address,float-divide-by-zero,integer,undefined \ -DCMAKE_C_COMPILER=clang-${APT_LLVM_V} \ -DCMAKE_CXX_COMPILER=clang++-${APT_LLVM_V} \ diff --git a/ci/test/00_setup_env_native_fuzz.sh b/ci/test/00_setup_env_native_fuzz.sh index c5220211fc5..8f36ddb9457 100755 --- a/ci/test/00_setup_env_native_fuzz.sh +++ b/ci/test/00_setup_env_native_fuzz.sh @@ -9,7 +9,7 @@ export LC_ALL=C.UTF-8 export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" export CONTAINER_NAME=ci_native_fuzz export APT_LLVM_V="20" -export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev libevent-dev libboost-dev libsqlite3-dev" +export PACKAGES="clang-${APT_LLVM_V} llvm-${APT_LLVM_V} libclang-rt-${APT_LLVM_V}-dev libevent-dev libboost-dev libsqlite3-dev libcapnp-dev capnproto" export NO_DEPENDS=1 export RUN_UNIT_TESTS=false export RUN_FUNCTIONAL_TESTS=false diff --git a/ci/test/00_setup_env_native_fuzz_with_valgrind.sh b/ci/test/00_setup_env_native_fuzz_with_valgrind.sh index b2f3545b370..f1d99f81819 100755 --- a/ci/test/00_setup_env_native_fuzz_with_valgrind.sh +++ b/ci/test/00_setup_env_native_fuzz_with_valgrind.sh @@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8 export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" export CONTAINER_NAME=ci_native_fuzz_valgrind -export PACKAGES="libevent-dev libboost-dev libsqlite3-dev valgrind" +export PACKAGES="libevent-dev libboost-dev libsqlite3-dev valgrind libcapnp-dev capnproto" export NO_DEPENDS=1 export RUN_UNIT_TESTS=false export RUN_FUNCTIONAL_TESTS=false diff --git a/ci/test/00_setup_env_native_tidy.sh b/ci/test/00_setup_env_native_tidy.sh index 08a7cbbf7e4..60865dc0c6c 100755 --- a/ci/test/00_setup_env_native_tidy.sh +++ b/ci/test/00_setup_env_native_tidy.sh @@ -10,7 +10,7 @@ export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" export CONTAINER_NAME=ci_native_tidy export TIDY_LLVM_V="19" export APT_LLVM_V="${TIDY_LLVM_V}" -export PACKAGES="clang-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev libomp-${TIDY_LLVM_V}-dev clang-tidy-${TIDY_LLVM_V} jq libevent-dev libboost-dev libzmq3-dev systemtap-sdt-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev libsqlite3-dev libdb++-dev" +export PACKAGES="clang-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev libomp-${TIDY_LLVM_V}-dev clang-tidy-${TIDY_LLVM_V} jq libevent-dev libboost-dev libzmq3-dev systemtap-sdt-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev libsqlite3-dev libdb++-dev libcapnp-dev capnproto" export NO_DEPENDS=1 export RUN_UNIT_TESTS=false export RUN_FUNCTIONAL_TESTS=false @@ -19,7 +19,12 @@ export RUN_CHECK_DEPS=true export RUN_TIDY=true export GOAL="install" export BITCOIN_CONFIG="\ - -DWITH_ZMQ=ON -DBUILD_GUI=ON -DBUILD_BENCH=ON -DWITH_USDT=ON -DWITH_BDB=ON -DWARN_INCOMPATIBLE_BDB=OFF \ + -DWITH_ZMQ=ON \ + -DBUILD_GUI=ON \ + -DBUILD_BENCH=ON \ + -DWITH_USDT=ON \ + -DWITH_BDB=ON \ + -DWARN_INCOMPATIBLE_BDB=OFF \ -DCMAKE_C_COMPILER=clang-${TIDY_LLVM_V} \ -DCMAKE_CXX_COMPILER=clang++-${TIDY_LLVM_V} \ -DCMAKE_C_FLAGS_RELWITHDEBINFO='-O0 -g0' \ diff --git a/ci/test/00_setup_env_native_valgrind.sh b/ci/test/00_setup_env_native_valgrind.sh index 347a1135056..4d7e4d65250 100755 --- a/ci/test/00_setup_env_native_valgrind.sh +++ b/ci/test/00_setup_env_native_valgrind.sh @@ -8,12 +8,15 @@ export LC_ALL=C.UTF-8 export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" export CONTAINER_NAME=ci_native_valgrind -export PACKAGES="valgrind python3-zmq libevent-dev libboost-dev libdb5.3++-dev libzmq3-dev libsqlite3-dev" +export PACKAGES="valgrind python3-zmq libevent-dev libboost-dev libdb5.3++-dev libzmq3-dev libsqlite3-dev libcapnp-dev capnproto" export USE_VALGRIND=1 export NO_DEPENDS=1 export TEST_RUNNER_EXTRA="--exclude feature_init,rpc_bind,feature_bind_extra" # feature_init excluded for now, see https://github.com/bitcoin/bitcoin/issues/30011 ; bind tests excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547 export GOAL="install" # TODO enable GUI export BITCOIN_CONFIG="\ - -DWITH_ZMQ=ON -DWITH_BDB=ON -DWARN_INCOMPATIBLE_BDB=OFF -DBUILD_GUI=OFF \ + -DWITH_ZMQ=ON + -DWITH_BDB=ON + -DWARN_INCOMPATIBLE_BDB=OFF + -DBUILD_GUI=OFF \ " diff --git a/doc/multiprocess.md b/doc/multiprocess.md index 5886b00f24b..416b1f68832 100644 --- a/doc/multiprocess.md +++ b/doc/multiprocess.md @@ -4,7 +4,7 @@ _This document describes usage of the multiprocess feature. For design informati ## Build Option -On Unix systems, the `-DENABLE_IPC=ON` build option can be passed to build the supplemental `bitcoin-node` and `bitcoin-gui` multiprocess executables. +The `-DENABLE_IPC=ON` build option, supported and enabled by default on Unix systems, can be passed to build the supplemental `bitcoin-node` and `bitcoin-gui` multiprocess executables. ## Debugging From 79fcbf8cba8fc142ad3ea999239de9117b00ca28 Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Wed, 23 Apr 2025 11:59:45 +0200 Subject: [PATCH 6/6] doc: update deps install notes for multiprocess --- doc/build-osx.md | 12 +++++------- doc/build-unix.md | 22 ++++++++++++---------- doc/dependencies.md | 1 + 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/doc/build-osx.md b/doc/build-osx.md index eb0dacb9561..38b30476148 100644 --- a/doc/build-osx.md +++ b/doc/build-osx.md @@ -48,9 +48,11 @@ See [dependencies.md](dependencies.md) for a complete overview. To install, run the following from your terminal: ``` bash -brew install cmake boost pkgconf libevent +brew install cmake boost pkgconf libevent capnp ``` +It's possible to omit `capnp`, see [below](#IPC-dependencies). + ### 4. Clone Bitcoin repository `git` should already be installed by default on your system. @@ -127,12 +129,8 @@ For more information on ZMQ, see: [zmq.md](zmq.md) ### IPC Dependencies -Compiling IPC-enabled binaries with `-DENABLE_IPC=ON` requires the following dependency. -Skip if you do not need IPC functionality. - -```bash -brew install capnp -``` +The dependency on `capnp` can be avoided by compiling without IPC-enabled binaries +using `-DENABLE_IPC=OFF`. For more information on IPC, see: [multiprocess.md](multiprocess.md). diff --git a/doc/build-unix.md b/doc/build-unix.md index c7dfefc2715..24ab008ca2b 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -60,6 +60,12 @@ executables, which are based on BerkeleyDB 4.8. Otherwise, you can build Berkele To build Bitcoin Core without wallet, see [*Disable-wallet mode*](#disable-wallet-mode) +Cap'n Proto is required to build IPC-enabled binaries: + + sudo apt-get install libcapnp-dev capnproto + +Compile with `-DENABLE_IPC=OFF` if you do not need this functionality. + ZMQ dependencies (provides ZMQ API): sudo apt-get install libzmq3-dev @@ -68,11 +74,6 @@ User-Space, Statically Defined Tracing (USDT) dependencies: sudo apt install systemtap-sdt-dev -IPC-enabled binaries are compiled with `-DENABLE_IPC=ON` and require the following dependencies. -Skip if you do not need IPC functionality. - - sudo apt-get install libcapnp-dev capnproto - GUI dependencies: Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compile the GUI, we need to install @@ -115,6 +116,12 @@ are based on Berkeley DB 4.8. Otherwise, you can build Berkeley DB [yourself](#b To build Bitcoin Core without wallet, see [*Disable-wallet mode*](#disable-wallet-mode) +Cap'n Proto is required to build IPC-enabled binaries: + + sudo dnf install capnp + +Compile with `-DENABLE_IPC=OFF` if you do not need this functionality. + ZMQ dependencies (provides ZMQ API): sudo dnf install zeromq-devel @@ -123,11 +130,6 @@ User-Space, Statically Defined Tracing (USDT) dependencies: sudo dnf install systemtap-sdt-devel -IPC-enabled binaries are compiled with `-DENABLE_IPC=ON` and require the following dependency. -Skip if you do not need IPC functionality. - - sudo dnf install capnproto - GUI dependencies: Bitcoin Core includes a GUI built with the cross-platform Qt Framework. To compile the GUI, we need to install diff --git a/doc/dependencies.md b/doc/dependencies.md index 332e6d87003..6206f867612 100644 --- a/doc/dependencies.md +++ b/doc/dependencies.md @@ -36,3 +36,4 @@ Bitcoin Core requires one of the following compilers. | [SQLite](../depends/packages/sqlite.mk) (wallet) | [link](https://sqlite.org) | [3.38.5](https://github.com/bitcoin/bitcoin/pull/25378) | [3.7.17](https://github.com/bitcoin/bitcoin/pull/19077) | No | | Python (scripts, tests) | [link](https://www.python.org) | N/A | [3.10](https://github.com/bitcoin/bitcoin/pull/30527) | No | | [systemtap](../depends/packages/systemtap.mk) ([tracing](tracing.md)) | [link](https://sourceware.org/systemtap/) | [4.8](https://github.com/bitcoin/bitcoin/pull/26945)| N/A | No | +| [Cap'n Proto](../depends/packages/capnp.mk) | [link](https://capnproto.org) | [0.6.1](https://capnproto.org/install.html) | 0.5.3 | No |