65471008e0a4d65e301a5b934928d38c80a21f2c depends: libnatpmp 07004b97cf691774efebe70404cf22201e4d330d (fanquake) Pull request description: This pulls in two changes I've upstreamed: Support for pkg-config: https://github.com/miniupnp/libnatpmp/pull/19 Suppressing a deprecation warning: https://github.com/miniupnp/libnatpmp/pull/28 and other upstream bug fixes. Somewhat related to #22644. Guix Build (arm64): ```bash 4a4b8e1cb5070482e53b3b869c5f6e19b892619184cf58315a3af368e13a52a2 guix-build-65471008e0a4/output/arm-linux-gnueabihf/SHA256SUMS.part 88b51f0f261f84b58da60a5c8df251b551379b811a255df9982ff496c70fc8b7 guix-build-65471008e0a4/output/arm-linux-gnueabihf/bitcoin-65471008e0a4-arm-linux-gnueabihf-debug.tar.gz 33a564914be6f4134d8e8a5f31a2bb97798a79bae8f75151b35564238d6f288e guix-build-65471008e0a4/output/arm-linux-gnueabihf/bitcoin-65471008e0a4-arm-linux-gnueabihf.tar.gz ea429260a2b5ac333f70b2b8b8697a4f76eee79cf6998d18c7de7b60818d8fe5 guix-build-65471008e0a4/output/arm64-apple-darwin/SHA256SUMS.part 304677e040592a0aee947c733657ea6c4dd8613f7c3a9834314a68e5f7a53325 guix-build-65471008e0a4/output/arm64-apple-darwin/bitcoin-65471008e0a4-arm64-apple-darwin-unsigned.dmg da171a60370ad1da6cfc1566fc4e16d09f6e896002b0ac9758fb4044eb1033c1 guix-build-65471008e0a4/output/arm64-apple-darwin/bitcoin-65471008e0a4-arm64-apple-darwin-unsigned.tar.gz 45c439319a9e2c07de8796dcfd182cdeb5600ad31f8f6b6dc383cc2914f49ab8 guix-build-65471008e0a4/output/arm64-apple-darwin/bitcoin-65471008e0a4-arm64-apple-darwin.tar.gz 120311e7c807b2641b5e7024e1b85fac0800680bccd924016f417b026aa90d25 guix-build-65471008e0a4/output/dist-archive/bitcoin-65471008e0a4.tar.gz 5272264317c93359c158c688cf0d0b6e70a6d9ec4b2e447b9fb9fcaf1950f6bc guix-build-65471008e0a4/output/powerpc64-linux-gnu/SHA256SUMS.part 98a0d14b8d05974d70f0d5243bfc2fec6aea30b9d8375f950f42a21d5e034065 guix-build-65471008e0a4/output/powerpc64-linux-gnu/bitcoin-65471008e0a4-powerpc64-linux-gnu-debug.tar.gz 8e07410ad2e7e204c5e84a81894c5398b34f36cc9e1ba386bf0963f09755818b guix-build-65471008e0a4/output/powerpc64-linux-gnu/bitcoin-65471008e0a4-powerpc64-linux-gnu.tar.gz 47ae8b948127f03e43a4c7e83a3611b650e26da50936ea9ce0247e01b29463f3 guix-build-65471008e0a4/output/powerpc64le-linux-gnu/SHA256SUMS.part 04e92527df8c7bb9f78c29b152d920830be0ef26d01e0ee1b32d52bb68fc9717 guix-build-65471008e0a4/output/powerpc64le-linux-gnu/bitcoin-65471008e0a4-powerpc64le-linux-gnu-debug.tar.gz ddb09291c9e270343b56e66fae33fd792eb2ec7e5a138337ec1608642dd3a983 guix-build-65471008e0a4/output/powerpc64le-linux-gnu/bitcoin-65471008e0a4-powerpc64le-linux-gnu.tar.gz de3cfcf47abed3d4d3881086eba94ee2c34d9078dc53639cc6321c2bd1041073 guix-build-65471008e0a4/output/riscv64-linux-gnu/SHA256SUMS.part fecd6a307b66fd54fa5792ce14e1a4d50df5646cdf6cc51d5b355fb1384f5105 guix-build-65471008e0a4/output/riscv64-linux-gnu/bitcoin-65471008e0a4-riscv64-linux-gnu-debug.tar.gz f2c5a85fb17ad9605809b4ac01eba56cd573744697b9c942d293b42a623a2832 guix-build-65471008e0a4/output/riscv64-linux-gnu/bitcoin-65471008e0a4-riscv64-linux-gnu.tar.gz 4cd0b05e96491d9b0fe7eff78aab885a2f0d62f141950117759fecceaeba5412 guix-build-65471008e0a4/output/x86_64-apple-darwin/SHA256SUMS.part bae30549d8044e1aa11bae6d57321a7a3a765c8b87ead9cdcc8abf9f22a564a3 guix-build-65471008e0a4/output/x86_64-apple-darwin/bitcoin-65471008e0a4-x86_64-apple-darwin-unsigned.dmg 435187b492d6df77d4fa7cd0f77ad08c587c4bd463295be802b6e222ee92a2fa guix-build-65471008e0a4/output/x86_64-apple-darwin/bitcoin-65471008e0a4-x86_64-apple-darwin-unsigned.tar.gz b9cf808ec88368a9b0e1883253a9d8c6f123bf7f61df40e34e5e4b8959846d65 guix-build-65471008e0a4/output/x86_64-apple-darwin/bitcoin-65471008e0a4-x86_64-apple-darwin.tar.gz b9d9a46f7d3188cd517a180fd24fdb38b8c695175fe9ac75c3b3eb2450d9f5d5 guix-build-65471008e0a4/output/x86_64-linux-gnu/SHA256SUMS.part fd601d6821fbe5faa1eb44b9f07046187f491a83fbf1e0fd603be212bfea3385 guix-build-65471008e0a4/output/x86_64-linux-gnu/bitcoin-65471008e0a4-x86_64-linux-gnu-debug.tar.gz 98ae9d653a8fdeda055468dbf674ee46b0727e1c5b768b1765fc4451defed36e guix-build-65471008e0a4/output/x86_64-linux-gnu/bitcoin-65471008e0a4-x86_64-linux-gnu.tar.gz 821de40cbc96c27bb1f0fbcfb46c4e801f202c2dfd7aa9ad88daf6ced2be90e5 guix-build-65471008e0a4/output/x86_64-w64-mingw32/SHA256SUMS.part 0f2425ea0a17c9aa80cf7d2eb316b9ebe76f49de777635ac37f9e6e21bcd650e guix-build-65471008e0a4/output/x86_64-w64-mingw32/bitcoin-65471008e0a4-win64-debug.zip 046ede05868c153ec1d87b8dad4b6494913ea3e952edee86b068d367c57fa7ec guix-build-65471008e0a4/output/x86_64-w64-mingw32/bitcoin-65471008e0a4-win64-setup-unsigned.exe 62b6e5ebb085735838ada1f328d6e092d7fb726caad6e049340bfa783897cfa1 guix-build-65471008e0a4/output/x86_64-w64-mingw32/bitcoin-65471008e0a4-win64-unsigned.tar.gz 265f9814a7fa3333395f34a5dceafd11d50d170aa5303386aa6f8244542d070a guix-build-65471008e0a4/output/x86_64-w64-mingw32/bitcoin-65471008e0a4-win64.zip ``` ACKs for top commit: theuni: Simple bump ACK 65471008e0a4d65e301a5b934928d38c80a21f2c. From a quick glance the upstream changes appear to be minimal and sane. hebasto: ACK 65471008e0a4d65e301a5b934928d38c80a21f2c Tree-SHA512: 61541b7dcde611f5bafe5b77977403dab86fe24f0bf4bfb79ab7123bac8b7c4dcad53993d18ab40964756699a77952c8ecc5a0416055c9e436fc34867f7f9cf6
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