f862f4a74ec6d95a40bb86c5e6597739b23db932 build: add *_STANDARD vars to depends gen_id (fanquake) Pull request description: Followup to #22380 😅. We need to have these in `gen_id` so that we rebuild if we change / unset a *_STANDARD. Guix Build (x86_64): ```bash afc2a24bae06f87b7f14f0958b2ca497c050f6069e68958e45120215bab4507e guix-build-f862f4a74ec6/output/aarch64-linux-gnu/SHA256SUMS.part 547266e64002dc1124adedc1679f4c526088212b6ba31fb3457523adeb80be50 guix-build-f862f4a74ec6/output/aarch64-linux-gnu/bitcoin-f862f4a74ec6-aarch64-linux-gnu-debug.tar.gz af73193740f93d9ff13ed4eb459aabaf942e7075ac53967f5505bbebfea1eb9f guix-build-f862f4a74ec6/output/aarch64-linux-gnu/bitcoin-f862f4a74ec6-aarch64-linux-gnu.tar.gz b36f58a4e37ed30ac8463716b5ed715f427e419d80d7e90381341fcab2712427 guix-build-f862f4a74ec6/output/arm-linux-gnueabihf/SHA256SUMS.part 1ed49ea3efd7d9f5eba53d8e73356e82dfb5da2050f91a284dd38f157fa790b4 guix-build-f862f4a74ec6/output/arm-linux-gnueabihf/bitcoin-f862f4a74ec6-arm-linux-gnueabihf-debug.tar.gz dfaf6359511fa82a36448e16722179bd49d1d04e366cf140aaa0dfaa1be75b12 guix-build-f862f4a74ec6/output/arm-linux-gnueabihf/bitcoin-f862f4a74ec6-arm-linux-gnueabihf.tar.gz 41dbc79a8372c2dd2eccc1af282e160f749faacd51c5d2594e8d48afaa6df5bc guix-build-f862f4a74ec6/output/arm64-apple-darwin/SHA256SUMS.part abe6a3506441faeebdc08682c92d51ba3a0e5fc6af3a2b28f054d0ea1f2b5781 guix-build-f862f4a74ec6/output/arm64-apple-darwin/bitcoin-f862f4a74ec6-arm64-apple-darwin-unsigned.dmg 01be81fd0c99a384afd06806441fb1775fc4a875153a3e699417a2c74547ad3a guix-build-f862f4a74ec6/output/arm64-apple-darwin/bitcoin-f862f4a74ec6-arm64-apple-darwin-unsigned.tar.gz 7e1b5547d5deb5944b6b3552634e3dd737da144c87ce75a5e9029e4edfe126a4 guix-build-f862f4a74ec6/output/arm64-apple-darwin/bitcoin-f862f4a74ec6-arm64-apple-darwin.tar.gz c4387c1d98f7146aa8926d827129063d502cd9b098a2674c487e550036df36fb guix-build-f862f4a74ec6/output/dist-archive/bitcoin-f862f4a74ec6.tar.gz 084912a415d3c8eedf47a60684abc7c753977ecf8990bd72c67158371cf39e2c guix-build-f862f4a74ec6/output/powerpc64-linux-gnu/SHA256SUMS.part 17f3aba98063f51af29b8b3ad2d9edd9a34b39aee09c82d28e8f49e765395de8 guix-build-f862f4a74ec6/output/powerpc64-linux-gnu/bitcoin-f862f4a74ec6-powerpc64-linux-gnu-debug.tar.gz 12ebd244f31597a54c0b93d23dc6d2a7b375d47edf9576e205d23c7ca7c2cac8 guix-build-f862f4a74ec6/output/powerpc64-linux-gnu/bitcoin-f862f4a74ec6-powerpc64-linux-gnu.tar.gz c28467af85a6a043cc5c80234680eabc3cbb2857b778b412a128c039c85c419a guix-build-f862f4a74ec6/output/powerpc64le-linux-gnu/SHA256SUMS.part 69ae9c40f0d413e0cfdff58dab0e6938c58a72f8cf3c7b6259e2da67dae61b1a guix-build-f862f4a74ec6/output/powerpc64le-linux-gnu/bitcoin-f862f4a74ec6-powerpc64le-linux-gnu-debug.tar.gz c75065dcab7260d6072dcb753cf43976a7ad6b0c2be1ab2f96d65b99083c0628 guix-build-f862f4a74ec6/output/powerpc64le-linux-gnu/bitcoin-f862f4a74ec6-powerpc64le-linux-gnu.tar.gz 63fdefb6c04fc61fc4354d4f6bc1b1530595e21ecbd9e8dfc7a459e9daaaad32 guix-build-f862f4a74ec6/output/riscv64-linux-gnu/SHA256SUMS.part 9e5c7a8d459befce46742c254f74771c95d91496a350f396878c204003375f28 guix-build-f862f4a74ec6/output/riscv64-linux-gnu/bitcoin-f862f4a74ec6-riscv64-linux-gnu-debug.tar.gz 884a789984eda3e3c68f69e975cf664a2bb4e6986b649ab6f09f529995c84702 guix-build-f862f4a74ec6/output/riscv64-linux-gnu/bitcoin-f862f4a74ec6-riscv64-linux-gnu.tar.gz 59821609cd76efdc8efb1deacaf9f1bc6af754a764ebfbdad47df392152e19ac guix-build-f862f4a74ec6/output/x86_64-apple-darwin/SHA256SUMS.part 5f48f56c2efe5ccf9bb22c6ba78af6c019f2df86eacada8241a7a351e0b81f83 guix-build-f862f4a74ec6/output/x86_64-apple-darwin/bitcoin-f862f4a74ec6-x86_64-apple-darwin-unsigned.dmg 73d0885ac4208345ff8a762a8a421e4812af621b441cfb6ddf4430a0ce657620 guix-build-f862f4a74ec6/output/x86_64-apple-darwin/bitcoin-f862f4a74ec6-x86_64-apple-darwin-unsigned.tar.gz 9b001f66b969e80c3d22d0eadceaa53d16440e2c1550d181e4e63747de8779f5 guix-build-f862f4a74ec6/output/x86_64-apple-darwin/bitcoin-f862f4a74ec6-x86_64-apple-darwin.tar.gz 0ace0d29576c6bf110ad7a067399eca649960a7dd6a33b03e82a4eadcfec0fa1 guix-build-f862f4a74ec6/output/x86_64-linux-gnu/SHA256SUMS.part 3efea8a971c36d642cbfa7fd5d95044f895c81e4729281588726689c4cc4688e guix-build-f862f4a74ec6/output/x86_64-linux-gnu/bitcoin-f862f4a74ec6-x86_64-linux-gnu-debug.tar.gz afa95414ab703a0cdb632b963ef28ba93bb8f136590c5169c90b3906858282d5 guix-build-f862f4a74ec6/output/x86_64-linux-gnu/bitcoin-f862f4a74ec6-x86_64-linux-gnu.tar.gz 7993b7ed1592f440c498f7643c2a8cc36d0e4c887b77d6fc7e5bef2cc85afb7a guix-build-f862f4a74ec6/output/x86_64-w64-mingw32/SHA256SUMS.part 54ab6be514f0f865858d278997c409d96572a1f33aa85fd819f395d57aa4a388 guix-build-f862f4a74ec6/output/x86_64-w64-mingw32/bitcoin-f862f4a74ec6-win64-debug.zip 90a04f298826699c808519846cb1cec50047ff2959471a684b26c20a2e504c47 guix-build-f862f4a74ec6/output/x86_64-w64-mingw32/bitcoin-f862f4a74ec6-win64-setup-unsigned.exe f487dd6a8d1eb7566df85c1b2fe536352e4e0c3e50c911766f1daccdbdf5706d guix-build-f862f4a74ec6/output/x86_64-w64-mingw32/bitcoin-f862f4a74ec6-win64-unsigned.tar.gz 82be7831089e8245c17ed3d61cd56606b36554c15978c1a64181df02df918a14 guix-build-f862f4a74ec6/output/x86_64-w64-mingw32/bitcoin-f862f4a74ec6-win64.zip ``` Guix Build (arm64): ```bash b465ed412b625a0980473d359e0b34ec646d90d844d1055ad61f99d5a4e08e47 guix-build-f862f4a74ec6/output/arm-linux-gnueabihf/SHA256SUMS.part 0391c59642724c205f466844995c8dc702a581278295189c4ef39c1dd53c915a guix-build-f862f4a74ec6/output/arm-linux-gnueabihf/bitcoin-f862f4a74ec6-arm-linux-gnueabihf-debug.tar.gz 42ff69794e2c61b205e6f9e8060aa4b5c382c6ba53c1a91dfd46069619ac589a guix-build-f862f4a74ec6/output/arm-linux-gnueabihf/bitcoin-f862f4a74ec6-arm-linux-gnueabihf.tar.gz b26d85b2beb0e8812d71833f493d623ac9419d2f791f34d3726bff387541d096 guix-build-f862f4a74ec6/output/arm64-apple-darwin/SHA256SUMS.part 0e2a81f2a4ea64b2a7407b52499af41e9a8448d56ebcc65befda42bac964f94e guix-build-f862f4a74ec6/output/arm64-apple-darwin/bitcoin-f862f4a74ec6-arm64-apple-darwin-unsigned.dmg f896df86baab84c737a5e2082b184e77a6b983a1a8dfbc1282ed22d7cea5aa0b guix-build-f862f4a74ec6/output/arm64-apple-darwin/bitcoin-f862f4a74ec6-arm64-apple-darwin-unsigned.tar.gz 3c3be5e7fc97950c612c00f36970e498f356147fee4c0f590298f5ad94fbc7a6 guix-build-f862f4a74ec6/output/arm64-apple-darwin/bitcoin-f862f4a74ec6-arm64-apple-darwin.tar.gz c4387c1d98f7146aa8926d827129063d502cd9b098a2674c487e550036df36fb guix-build-f862f4a74ec6/output/dist-archive/bitcoin-f862f4a74ec6.tar.gz 792e2ae8c991203765aaa080c58111c57bd59cf217cbf0b461e50cde10754d5b guix-build-f862f4a74ec6/output/powerpc64-linux-gnu/SHA256SUMS.part ff68b5693861bc5d9e016ea23e976367f8d4b7655bdbe16c71a02704dc7f602c guix-build-f862f4a74ec6/output/powerpc64-linux-gnu/bitcoin-f862f4a74ec6-powerpc64-linux-gnu-debug.tar.gz d6385cfce11872d7008e345cfe6396e24dc37b2367139ce95841a16a91853c0b guix-build-f862f4a74ec6/output/powerpc64-linux-gnu/bitcoin-f862f4a74ec6-powerpc64-linux-gnu.tar.gz 9c14549a899c7ac550d4d6e51ebd0416bb62ad31351bc18dac9eada5a2b41d1b guix-build-f862f4a74ec6/output/powerpc64le-linux-gnu/SHA256SUMS.part e7557409ee809483be422c1f046f3de4994538e3dc840f9683dc341f35897006 guix-build-f862f4a74ec6/output/powerpc64le-linux-gnu/bitcoin-f862f4a74ec6-powerpc64le-linux-gnu-debug.tar.gz a2b9e75edccfadb7b54b7e01cd3ea602aa1d6907037bf8c1517637558e08beb6 guix-build-f862f4a74ec6/output/powerpc64le-linux-gnu/bitcoin-f862f4a74ec6-powerpc64le-linux-gnu.tar.gz 099b822c656c738b2f4119dffc9630af7c398acd9039d65520653158c05eaff9 guix-build-f862f4a74ec6/output/riscv64-linux-gnu/SHA256SUMS.part 6bcff8b4b4d68e18fd19d7407be3ba2768894a46e53a10e7a1ea5e730bddf216 guix-build-f862f4a74ec6/output/riscv64-linux-gnu/bitcoin-f862f4a74ec6-riscv64-linux-gnu-debug.tar.gz 58c3e536e0f199f85d3a71aa5ae41bcebc4bba94fe8b93062a01952f80e3fd49 guix-build-f862f4a74ec6/output/riscv64-linux-gnu/bitcoin-f862f4a74ec6-riscv64-linux-gnu.tar.gz 59821609cd76efdc8efb1deacaf9f1bc6af754a764ebfbdad47df392152e19ac guix-build-f862f4a74ec6/output/x86_64-apple-darwin/SHA256SUMS.part 5f48f56c2efe5ccf9bb22c6ba78af6c019f2df86eacada8241a7a351e0b81f83 guix-build-f862f4a74ec6/output/x86_64-apple-darwin/bitcoin-f862f4a74ec6-x86_64-apple-darwin-unsigned.dmg 73d0885ac4208345ff8a762a8a421e4812af621b441cfb6ddf4430a0ce657620 guix-build-f862f4a74ec6/output/x86_64-apple-darwin/bitcoin-f862f4a74ec6-x86_64-apple-darwin-unsigned.tar.gz 9b001f66b969e80c3d22d0eadceaa53d16440e2c1550d181e4e63747de8779f5 guix-build-f862f4a74ec6/output/x86_64-apple-darwin/bitcoin-f862f4a74ec6-x86_64-apple-darwin.tar.gz 6181e4941f836084d33eec2131b88fa793da168f79a887a7688ded690a3172db guix-build-f862f4a74ec6/output/x86_64-linux-gnu/SHA256SUMS.part c561ac1f2466fc4a685a23a89b325cf76e200b2016daa2692950af7901995149 guix-build-f862f4a74ec6/output/x86_64-linux-gnu/bitcoin-f862f4a74ec6-x86_64-linux-gnu-debug.tar.gz c89c49ff45ab9a71c2b3f0e656fdca18be815f2474beb1c4dd663d466e077e8a guix-build-f862f4a74ec6/output/x86_64-linux-gnu/bitcoin-f862f4a74ec6-x86_64-linux-gnu.tar.gz 461d8a96c28854eb131544205978849a192ef7a1db14f85f1ae4791a90da96c5 guix-build-f862f4a74ec6/output/x86_64-w64-mingw32/SHA256SUMS.part 9e77f1aa937c3d690160ad362eac92ffc20e5a8d2272243ba10099239521aa70 guix-build-f862f4a74ec6/output/x86_64-w64-mingw32/bitcoin-f862f4a74ec6-win64-debug.zip 90a04f298826699c808519846cb1cec50047ff2959471a684b26c20a2e504c47 guix-build-f862f4a74ec6/output/x86_64-w64-mingw32/bitcoin-f862f4a74ec6-win64-setup-unsigned.exe f487dd6a8d1eb7566df85c1b2fe536352e4e0c3e50c911766f1daccdbdf5706d guix-build-f862f4a74ec6/output/x86_64-w64-mingw32/bitcoin-f862f4a74ec6-win64-unsigned.tar.gz 5f120f1af427ee1c7bd3129a67297b6bc34693e963e90004aee2558c9c5622d5 guix-build-f862f4a74ec6/output/x86_64-w64-mingw32/bitcoin-f862f4a74ec6-win64.zip ``` ACKs for top commit: laanwj: Code review ACK f862f4a74ec6d95a40bb86c5e6597739b23db932 Tree-SHA512: df52d0165eb1ca1db1c50bfc06e0f647ef976bd133daf2fd310f25455ee6b69b26a1e5cb48f2d8873aac78660465bfedcd2acdec67e67bf76bb44257d28912a3
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
Bitcoin 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 cmake 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
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 upC_STANDARD
: Set the C standard version used. Defaults toc11
.CXX_STANDARD
: Set the C++ standard version used. Defaults toc++17
.NO_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 UPnPNO_NATPMP
: Don't download/build/cache packages needed for enabling NAT-PMPALLOW_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) versionsMULTIPROCESS
: 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 requiredLOG
: Use file-based logging for individual packages. During a package build its log file resides in thedepends
directory, and the log file is printed out automatically in case of build error. After successful build log files are moved along with package archivesLTO
: Use LTO when building packages.
If some packages are not built, for example make NO_WALLET=1
, the appropriate
options will be passed to bitcoin'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
Other documentation
- description.md: General description of the depends system
- packages.md: Steps for adding packages