45e0f6e56d
b46c6ec52e1501b8c4337cead0301ef2c3777dd6 bdb: disable Werror for format-security (fanquake) Pull request description: This is causing build failures in some build environments, like NixOS. I don't think we are going to patch bdb at this point, and this warning has existed for as long as we've used bdb. Fixes #25211. Tested (in Docker) with: ```bash docker run -it nixos/nix nix-shell -p gitMinimal gcc12 libtool pkg-config curl gnumake patch autoconf automake git clone https://github.com/bitcoin/bitcoin make -C bitcoin/depends bdb ``` Co-authored-by: Ryan Ofsky <ryan@ofsky.org> Guix Build (x86_64): ```bash 25981417fe09fa9e6f7b30875dac709a1de1146d77ec3c04bbf18eace16932b7 guix-build-b46c6ec52e15/output/aarch64-linux-gnu/SHA256SUMS.part 9edc248dad9508ff7ec1ddc121caa606a2da27f5b36f664cb54b17bcdcfa407e guix-build-b46c6ec52e15/output/aarch64-linux-gnu/bitcoin-b46c6ec52e15-aarch64-linux-gnu-debug.tar.gz e3bac816e7b1ef69927a818e6d882af0bf2dae69930181d4a144bfe309078391 guix-build-b46c6ec52e15/output/aarch64-linux-gnu/bitcoin-b46c6ec52e15-aarch64-linux-gnu.tar.gz d15461bb5fb5abafb3a515fa37e2f6b49a352e22b22d5d93aa4ecf7705781e72 guix-build-b46c6ec52e15/output/arm-linux-gnueabihf/SHA256SUMS.part f3d215bcee1e695a83092841544f00f34cbe65d6d5374673ef3b9a686caaaf85 guix-build-b46c6ec52e15/output/arm-linux-gnueabihf/bitcoin-b46c6ec52e15-arm-linux-gnueabihf-debug.tar.gz e9eb5bca37dfeac5207ec427bbe590528841cb9fb7d4a1e28646ebb00386a72d guix-build-b46c6ec52e15/output/arm-linux-gnueabihf/bitcoin-b46c6ec52e15-arm-linux-gnueabihf.tar.gz d2b13313b5e638d54c77026c8e383c93e32c677fe9b48c457b16d872bf034219 guix-build-b46c6ec52e15/output/arm64-apple-darwin/SHA256SUMS.part 21dc8ac4f0a1535c9459e9be43d65151e4affd7cdd0a65d2e95f6f8fb0960a71 guix-build-b46c6ec52e15/output/arm64-apple-darwin/bitcoin-b46c6ec52e15-arm64-apple-darwin-unsigned.dmg 2dfb444497b71a546e56e0dbc1dc560860006489edfe0cf2e418378ac36c5780 guix-build-b46c6ec52e15/output/arm64-apple-darwin/bitcoin-b46c6ec52e15-arm64-apple-darwin-unsigned.tar.gz 22ebb15f5bec1f5d610dc4706ebbb0977ed013209d73077a3c601e27db6bc37c guix-build-b46c6ec52e15/output/arm64-apple-darwin/bitcoin-b46c6ec52e15-arm64-apple-darwin.tar.gz 320d12f518f899fa1b31ca89553362f8e2855a4ae50e9756e8c12cdfbc4c5392 guix-build-b46c6ec52e15/output/dist-archive/bitcoin-b46c6ec52e15.tar.gz 0c6773c8960746c837e2bd929057dab08f0d2963ef42f0ac071bfcb0fbc57e44 guix-build-b46c6ec52e15/output/powerpc64-linux-gnu/SHA256SUMS.part 2c77c8213fa52bb0395a57d128b179e5615c463e4a4a582b111bf13bb907c293 guix-build-b46c6ec52e15/output/powerpc64-linux-gnu/bitcoin-b46c6ec52e15-powerpc64-linux-gnu-debug.tar.gz 74023867ae64c3b32fccead48b3dcb81c55299a61bd921d22bc3a7c937c253fb guix-build-b46c6ec52e15/output/powerpc64-linux-gnu/bitcoin-b46c6ec52e15-powerpc64-linux-gnu.tar.gz f3fff570610cf13ab77e8ce9b97700b82cf9d3f2ab61662ca49b2c99be824ae2 guix-build-b46c6ec52e15/output/powerpc64le-linux-gnu/SHA256SUMS.part a638b18d3281253ad20d54e1dfd83157d6d38c6bd90a30f724de1d29d416aff5 guix-build-b46c6ec52e15/output/powerpc64le-linux-gnu/bitcoin-b46c6ec52e15-powerpc64le-linux-gnu-debug.tar.gz 340f56a514437cf25e75c14d3c90084f67b7c9cd0b304739033db17c9978c754 guix-build-b46c6ec52e15/output/powerpc64le-linux-gnu/bitcoin-b46c6ec52e15-powerpc64le-linux-gnu.tar.gz 35c06a9e06fded9bdaff53c2f142c03e5dc255c3fdfa8bad0af068a29b488471 guix-build-b46c6ec52e15/output/riscv64-linux-gnu/SHA256SUMS.part 049d06931661ab0f1cbcb37217083c35b809187a6bc51d7173c54c237ee1160d guix-build-b46c6ec52e15/output/riscv64-linux-gnu/bitcoin-b46c6ec52e15-riscv64-linux-gnu-debug.tar.gz a128abdd8898a7fb75f1b293141ec64ef70129576f61415025187d3cb9f2ecc6 guix-build-b46c6ec52e15/output/riscv64-linux-gnu/bitcoin-b46c6ec52e15-riscv64-linux-gnu.tar.gz 184be693f9633b0642bd75065d7bdf964cec9485af167504eea32d2d8aff8075 guix-build-b46c6ec52e15/output/x86_64-apple-darwin/SHA256SUMS.part 53ab2fb050533dc9a0f7b301b53d47ca65484f4e4eeea3b1259c353dd2cde4f2 guix-build-b46c6ec52e15/output/x86_64-apple-darwin/bitcoin-b46c6ec52e15-x86_64-apple-darwin-unsigned.dmg 5d92fcb539b41fb3b41bd1878025ecbb958521caf7eae8c3ae796aa4f235a982 guix-build-b46c6ec52e15/output/x86_64-apple-darwin/bitcoin-b46c6ec52e15-x86_64-apple-darwin-unsigned.tar.gz be71b8da7fa0ac39a3f8191293326b300b93b8fe4efba732a78366aebbb971b9 guix-build-b46c6ec52e15/output/x86_64-apple-darwin/bitcoin-b46c6ec52e15-x86_64-apple-darwin.tar.gz 07c195ad1ad1b00f5062d405913169367b73363a0418330c6add394c9df6e30b guix-build-b46c6ec52e15/output/x86_64-linux-gnu/SHA256SUMS.part 4c11ba2d5a38921511b0fc88b1aca0e30f939291176d2c1f93b211d63b04fd45 guix-build-b46c6ec52e15/output/x86_64-linux-gnu/bitcoin-b46c6ec52e15-x86_64-linux-gnu-debug.tar.gz 694d21edd3f462163ecf5821dae74b39c9ee4fc4f5697fe5865a71a7e3dc24dc guix-build-b46c6ec52e15/output/x86_64-linux-gnu/bitcoin-b46c6ec52e15-x86_64-linux-gnu.tar.gz 9b66a629a38e37b2746f237289bf4287184605876583ce24a073e42136e840af guix-build-b46c6ec52e15/output/x86_64-w64-mingw32/SHA256SUMS.part 7a8d633ac6f2c4a4955fb6dcc64b7560d96bfa74516ab2799ea7fc1b90c58b2f guix-build-b46c6ec52e15/output/x86_64-w64-mingw32/bitcoin-b46c6ec52e15-win64-debug.zip 81169a19c0a954949293fee2c8825a86bfb36a3a34c4c0271d926982cad626e2 guix-build-b46c6ec52e15/output/x86_64-w64-mingw32/bitcoin-b46c6ec52e15-win64-setup-unsigned.exe 58be54d27b308f07609447ae6fca8a91e76630d7753adb54e200c576fee8e6c0 guix-build-b46c6ec52e15/output/x86_64-w64-mingw32/bitcoin-b46c6ec52e15-win64-unsigned.tar.gz f13243cb6527bf7e9182673d32ccee32cb160d404271a0057e092a1cb571cc29 guix-build-b46c6ec52e15/output/x86_64-w64-mingw32/bitcoin-b46c6ec52e15-win64.zip ``` Guix Build (arm64): ```bash d15461bb5fb5abafb3a515fa37e2f6b49a352e22b22d5d93aa4ecf7705781e72 guix-build-b46c6ec52e15/output/arm-linux-gnueabihf/SHA256SUMS.part f3d215bcee1e695a83092841544f00f34cbe65d6d5374673ef3b9a686caaaf85 guix-build-b46c6ec52e15/output/arm-linux-gnueabihf/bitcoin-b46c6ec52e15-arm-linux-gnueabihf-debug.tar.gz e9eb5bca37dfeac5207ec427bbe590528841cb9fb7d4a1e28646ebb00386a72d guix-build-b46c6ec52e15/output/arm-linux-gnueabihf/bitcoin-b46c6ec52e15-arm-linux-gnueabihf.tar.gz f699f38a59bc888d5b728c934d1bf2a30dc46e6e0dfe4f6109c90c1e557b6334 guix-build-b46c6ec52e15/output/arm64-apple-darwin/SHA256SUMS.part e60d6ea30c18bfc948e146f6e8a6d9d53c84500c2117472999bc60e1bfa2dc4a guix-build-b46c6ec52e15/output/arm64-apple-darwin/bitcoin-b46c6ec52e15-arm64-apple-darwin-unsigned.dmg 8f5693a12671ea789e885b40dfeefdf076dd6f9856bfa867f33b7e1005779dd4 guix-build-b46c6ec52e15/output/arm64-apple-darwin/bitcoin-b46c6ec52e15-arm64-apple-darwin-unsigned.tar.gz a56b01ad6bf161f4cd7e3f89faea5b464460093131400df8f89c3b78839a72a9 guix-build-b46c6ec52e15/output/arm64-apple-darwin/bitcoin-b46c6ec52e15-arm64-apple-darwin.tar.gz 320d12f518f899fa1b31ca89553362f8e2855a4ae50e9756e8c12cdfbc4c5392 guix-build-b46c6ec52e15/output/dist-archive/bitcoin-b46c6ec52e15.tar.gz 0c6773c8960746c837e2bd929057dab08f0d2963ef42f0ac071bfcb0fbc57e44 guix-build-b46c6ec52e15/output/powerpc64-linux-gnu/SHA256SUMS.part 2c77c8213fa52bb0395a57d128b179e5615c463e4a4a582b111bf13bb907c293 guix-build-b46c6ec52e15/output/powerpc64-linux-gnu/bitcoin-b46c6ec52e15-powerpc64-linux-gnu-debug.tar.gz 74023867ae64c3b32fccead48b3dcb81c55299a61bd921d22bc3a7c937c253fb guix-build-b46c6ec52e15/output/powerpc64-linux-gnu/bitcoin-b46c6ec52e15-powerpc64-linux-gnu.tar.gz f3fff570610cf13ab77e8ce9b97700b82cf9d3f2ab61662ca49b2c99be824ae2 guix-build-b46c6ec52e15/output/powerpc64le-linux-gnu/SHA256SUMS.part a638b18d3281253ad20d54e1dfd83157d6d38c6bd90a30f724de1d29d416aff5 guix-build-b46c6ec52e15/output/powerpc64le-linux-gnu/bitcoin-b46c6ec52e15-powerpc64le-linux-gnu-debug.tar.gz 340f56a514437cf25e75c14d3c90084f67b7c9cd0b304739033db17c9978c754 guix-build-b46c6ec52e15/output/powerpc64le-linux-gnu/bitcoin-b46c6ec52e15-powerpc64le-linux-gnu.tar.gz 35c06a9e06fded9bdaff53c2f142c03e5dc255c3fdfa8bad0af068a29b488471 guix-build-b46c6ec52e15/output/riscv64-linux-gnu/SHA256SUMS.part 049d06931661ab0f1cbcb37217083c35b809187a6bc51d7173c54c237ee1160d guix-build-b46c6ec52e15/output/riscv64-linux-gnu/bitcoin-b46c6ec52e15-riscv64-linux-gnu-debug.tar.gz a128abdd8898a7fb75f1b293141ec64ef70129576f61415025187d3cb9f2ecc6 guix-build-b46c6ec52e15/output/riscv64-linux-gnu/bitcoin-b46c6ec52e15-riscv64-linux-gnu.tar.gz 184be693f9633b0642bd75065d7bdf964cec9485af167504eea32d2d8aff8075 guix-build-b46c6ec52e15/output/x86_64-apple-darwin/SHA256SUMS.part 53ab2fb050533dc9a0f7b301b53d47ca65484f4e4eeea3b1259c353dd2cde4f2 guix-build-b46c6ec52e15/output/x86_64-apple-darwin/bitcoin-b46c6ec52e15-x86_64-apple-darwin-unsigned.dmg 5d92fcb539b41fb3b41bd1878025ecbb958521caf7eae8c3ae796aa4f235a982 guix-build-b46c6ec52e15/output/x86_64-apple-darwin/bitcoin-b46c6ec52e15-x86_64-apple-darwin-unsigned.tar.gz be71b8da7fa0ac39a3f8191293326b300b93b8fe4efba732a78366aebbb971b9 guix-build-b46c6ec52e15/output/x86_64-apple-darwin/bitcoin-b46c6ec52e15-x86_64-apple-darwin.tar.gz 07c195ad1ad1b00f5062d405913169367b73363a0418330c6add394c9df6e30b guix-build-b46c6ec52e15/output/x86_64-linux-gnu/SHA256SUMS.part 4c11ba2d5a38921511b0fc88b1aca0e30f939291176d2c1f93b211d63b04fd45 guix-build-b46c6ec52e15/output/x86_64-linux-gnu/bitcoin-b46c6ec52e15-x86_64-linux-gnu-debug.tar.gz 694d21edd3f462163ecf5821dae74b39c9ee4fc4f5697fe5865a71a7e3dc24dc guix-build-b46c6ec52e15/output/x86_64-linux-gnu/bitcoin-b46c6ec52e15-x86_64-linux-gnu.tar.gz 9b66a629a38e37b2746f237289bf4287184605876583ce24a073e42136e840af guix-build-b46c6ec52e15/output/x86_64-w64-mingw32/SHA256SUMS.part 7a8d633ac6f2c4a4955fb6dcc64b7560d96bfa74516ab2799ea7fc1b90c58b2f guix-build-b46c6ec52e15/output/x86_64-w64-mingw32/bitcoin-b46c6ec52e15-win64-debug.zip 81169a19c0a954949293fee2c8825a86bfb36a3a34c4c0271d926982cad626e2 guix-build-b46c6ec52e15/output/x86_64-w64-mingw32/bitcoin-b46c6ec52e15-win64-setup-unsigned.exe 58be54d27b308f07609447ae6fca8a91e76630d7753adb54e200c576fee8e6c0 guix-build-b46c6ec52e15/output/x86_64-w64-mingw32/bitcoin-b46c6ec52e15-win64-unsigned.tar.gz f13243cb6527bf7e9182673d32ccee32cb160d404271a0057e092a1cb571cc29 guix-build-b46c6ec52e15/output/x86_64-w64-mingw32/bitcoin-b46c6ec52e15-win64.zip ``` ACKs for top commit: ryanofsky: Code review ACK b46c6ec52e1501b8c4337cead0301ef2c3777dd6. Thanks for addressing build issue. Probably there is no real security issue, but could look into that jarolrod: Code Review ACK b46c6ec52e1501b8c4337cead0301ef2c3777dd6 Tree-SHA512: 4b6b98e225e9b98fe1426a6402dae28e30327c932268d9bec31bf84aee12ec609ce97bd89a592a1f2cfd4d031ba520130bfef95006f7e09c0692af233f9614bb |
||
---|---|---|
.. | ||
builders | ||
hosts | ||
packages | ||
patches | ||
.gitignore | ||
config.guess | ||
config.site.in | ||
config.sub | ||
description.md | ||
funcs.mk | ||
gen_id | ||
Makefile | ||
packages.md | ||
README.md |
Usage
To build dependencies for the current arch+OS:
make
To build for another arch/OS:
make HOST=host-platform-triplet
For example:
make HOST=x86_64-w64-mingw32 -j4
Dash Core's configure
script by default will ignore the depends output. In
order for it to pick up libraries, tools, and settings from the depends build,
you must set the CONFIG_SITE
environment variable to point to a config.site
settings file.
In the above example, a file named depends/x86_64-w64-mingw32/share/config.site
will be
created. To use it during compilation:
CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure
The default install prefix when using config.site
is --prefix=depends/<host-platform-triplet>
,
so depends build outputs will be installed in that location.
Common host-platform-triplet
s for cross compilation are:
i686-pc-linux-gnu
for Linux 32 bitx86_64-pc-linux-gnu
for x86 Linuxx86_64-w64-mingw32
for Win64x86_64-apple-darwin
for macOSarm64-apple-darwin
for ARM macOSarm-linux-gnueabihf
for Linux ARM 32 bitaarch64-linux-gnu
for Linux ARM 64 bitpowerpc64-linux-gnu
for Linux POWER 64-bit (big endian)powerpc64le-linux-gnu
for Linux POWER 64-bit (little endian)riscv32-linux-gnu
for Linux RISC-V 32 bitriscv64-linux-gnu
for Linux RISC-V 64 bits390x-linux-gnu
for Linux S390Xarmv7a-linux-android
for Android ARM 32 bitaarch64-linux-android
for Android ARM 64 bitx86_64-linux-android
for Android x86 64 bit
The paths are automatically configured and no other options are needed unless targeting Android.
Install the required dependencies: Ubuntu & Debian
For macOS cross compilation
sudo apt-get install curl bsdmainutils cmake libz-dev python3-setuptools libtinfo5 xorriso
Note: You must obtain the macOS SDK before proceeding with a cross-compile.
Under the depends directory, create a subdirectory named SDKs
.
Then, place the extracted SDK under this new directory.
For more information, see SDK Extraction.
For Win64 cross compilation
- see build-windows.md
For linux (including i386, ARM) cross compilation
Common linux dependencies:
sudo apt-get install make automake curl g++-multilib libtool binutils-gold bsdmainutils pkg-config python3 patch bison
For linux ARM cross compilation:
sudo apt-get install g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf
For linux AARCH64 cross compilation:
sudo apt-get install g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
For linux POWER 64-bit cross compilation (there are no packages for 32-bit):
sudo apt-get install g++-powerpc64-linux-gnu binutils-powerpc64-linux-gnu g++-powerpc64le-linux-gnu binutils-powerpc64le-linux-gnu
For linux RISC-V 64-bit cross compilation (there are no packages for 32-bit):
sudo apt-get install g++-riscv64-linux-gnu binutils-riscv64-linux-gnu
RISC-V known issue: gcc-7.3.0 and gcc-7.3.1 result in a broken test_dash
executable (see https://github.com/bitcoin/bitcoin/pull/13543),
this is apparently fixed in gcc-8.1.0.
For linux S390X cross compilation:
sudo apt-get install g++-s390x-linux-gnu binutils-s390x-linux-gnu
Install the required dependencies: OpenBSD
pkg_add bash gtar
Dependency Options
The following can be set when running make: make FOO=bar
SOURCES_PATH
: Downloaded sources will be placed hereBASE_CACHE
: Built packages will be placed hereSDK_PATH
: Path where SDKs can be found (used by macOS)FALLBACK_DOWNLOAD_PATH
: If a source file can't be fetched, try here before giving upNO_QT
: Don't download/build/cache Qt and its dependenciesNO_QR
: Don't download/build/cache packages needed for enabling qrencodeNO_ZMQ
: Don't download/build/cache packages needed for enabling ZeroMQNO_WALLET
: Don't download/build/cache libs needed to enable the walletNO_BDB
: Don't download/build/cache BerkeleyDBNO_SQLITE
: Don't download/build/cache SQLiteNO_UPNP
: Don't download/build/cache packages needed for enabling UPnPALLOW_HOST_PACKAGES
: Packages that are missed in dependencies (due toNO_*
option or build script logic) are searched for among the host system packages usingpkg-config
. It allows building with packages of other (newer) versionsNO_NATPMP
: Don't download/build/cache packages needed for enabling NAT-PMPMULTIPROCESS
: build libmultiprocess (experimental, requires cmake)DEBUG
: Disable some optimizations and enable more runtime checkingHOST_ID_SALT
: Optional salt to use when generating host package idsBUILD_ID_SALT
: Optional salt to use when generating build package idsFORCE_USE_SYSTEM_CLANG
: (EXPERTS ONLY) When cross-compiling for macOS, use Clang found in the system's$PATH
rather than the default prebuilt release of Clang from llvm.org. Clang 8 or later is required.
If some packages are not built, for example make NO_WALLET=1
, the appropriate
options will be passed to Dash Core's configure. In this case, --disable-wallet
.
Additional targets
download: run 'make download' to fetch all sources without building them
download-osx: run 'make download-osx' to fetch all sources needed for macOS builds
download-win: run 'make download-win' to fetch all sources needed for win builds
download-linux: run 'make download-linux' to fetch all sources needed for linux builds
Android
Before proceeding with an Android build one needs to get the Android SDK and use the "SDK Manager" tool to download the NDK and one or more "Platform packages" (these are Android versions and have a corresponding API level).
In order to build ANDROID_API_LEVEL
(API level corresponding to the Android version targeted, e.g. Android 9.0 Pie is 28 and its "Platform package" needs to be available) and ANDROID_TOOLCHAIN_BIN
(path to toolchain binaries depending on the platform the build is being performed on) need to be set.
API levels from 24 to 29 have been tested to work.
If the build includes Qt, environment variables ANDROID_SDK
and ANDROID_NDK
need to be set as well but can otherwise be omitted.
This is an example command for a default build with no disabled dependencies:
ANDROID_SDK=/home/user/Android/Sdk ANDROID_NDK=/home/user/Android/Sdk/ndk-bundle make HOST=aarch64-linux-android ANDROID_API_LEVEL=28 ANDROID_TOOLCHAIN_BIN=/home/user/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin
Other documentation
- description.md: General description of the depends system
- packages.md: Steps for adding packages