aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
AgeCommit message (Collapse)Author
2022-10-19Revert "build: Use Homebrew's sqlite package if it is available"fanquake
This reverts ee7b84e63cbeadd5e680d69ff0548275581e9241 from #20527. This change was made without any rationale, maybe other than a brew installed version might be newer, and that's "better". However when building from source on macOS, it just results in drastically worse perofrmance, and results in issues / confusions like #25724. Resolves the "build from source" portion of #25724. Building from depends is still not ideal, however I have some other changes that might help improve things in that case. The difference in performance can be observed using the example from https://github.com/bitcoin/bitcoin/issues/25724#issuecomment-1213554922, but minified to only 10 descriptors. i.e: ```bash time src/bitcoin-cli createwallet speedy true time src/bitcoin-cli importdescriptors '[ {"desc":"raw(00145846369f3d6ba366d6f5a903fb5cf4dca3763c0e)#k9wh6v62","timestamp":"now"}, {"desc":"raw(001420800aabf13f3a4c4ce3ce4c66cecf1d17f21a6e)#6m0hlfh4","timestamp":"now"}, {"desc":"raw(0014c6bf9715e06d73ebf9b3b02d5cc48d24d8bbabc1)#wyavh36r","timestamp":"now"}, {"desc":"raw(00141ba7807b3f46af113beaea5c698428ce7138cd8a)#jctdsups","timestamp":"now"}, {"desc":"raw(00140c1bd27f10fff01b36ddf3c1febaa1acff19b080)#9s6nc3pk","timestamp":"now"}, {"desc":"raw(00141226e31987e4bc2e63c0ee12908f675e40464b20)#9pp7qm39","timestamp":"now"}, {"desc":"raw(0014f73f149f7503960a5e849c6ee7a8a8c336f631cb)#qtkxv9fc","timestamp":"now"}, {"desc":"raw(0014c8ccb4d81ffc769fc5fdd8d7eed69b0e0cae5749)#hn39qayv","timestamp":"now"}, {"desc":"raw(001498565aead2d67a22a6021d55210f2a917fc22169)#6ar3vwsx","timestamp":"now"}, {"desc":"raw(001403013248ac0cd9eabe176cad162cda2a19f771e1)#4m47mukd","timestamp":"now"} ]' ``` Running master, when building from souce and using brew installed sqlite, this takes ~3.4s. With this PR, the same operation takes ~0.3s. Github-Pull: #25985 Rebased-From: d216d714aae36e6f1c95f82aef81a0be74dee2f3
2022-02-15build: Restrict check for CRC32C intrinsic to aarch64W. J. van der Laan
`crc32c`'s hardware accelerated code doesn't handle ARM 32-bit at all. Make the check in `configure.ac` check for this architecture explicitly. For the release binaries, the current `configure.ac` check happens to work: it enables it on aarch64 but disables it for armhf. However some combination of compiler version and settings might ostensibly cause this check to succeed on armhf (as reported on IRC). So make the 64-bit platform requirement explicit. Github-Pull: #23045 Rebased-From: f2747d1602ec4e1128356b861b2167daf66a845b
2021-10-21build: explicitly disable libsecp256k1 openssl based testsfanquake
These tests are failing when run against OpenSSL 3, and have been removed upstream, https://github.com/bitcoin-core/secp256k1/pull/983, so disabled them for now to avoid `make check` failures. Note that this will also remove warning output from our build, due to the use of deprecated OpenSSL API functions. See #23048. Github-Pull: #23314 Rebased-From: d7524546abf1fa5be8e6317ee50585e966ae6b4c
2021-09-08build: Bump version to 22.0 finalW. J. van der Laan
Tree-SHA512: c9280b1b19e6874ebdde89b6ab98933c56834cc0d74b98a420349cd93f96f526768e42b2e1e1d820c39f2f8b137bbeab72fc221d5ddb7f315c545675ee68e851
2021-08-26build: Bump version to 22.0rc3W. J. van der Laan
Tree-SHA512: 7e8c32d7b784329236090e09bb6c5f8ee7a64f46cfc136dae97d4838239292e94b28cfd429f56eaaddc1a23ebf33218b1b4396e126fe6cf60938f1909aaaf66e
2021-08-02build: Bump RC to rc2v22.0rc2W. J. van der Laan
Tree-SHA512: 2e9db22da514b0ef4456f46524762420730cdd3c160a4012ca9d736d18d01abd2403b0ce800743b1f92212937436fe849b1c1b07bed0e3ad9f61165be55b7958
2021-07-20build: Bump version to 22.0.0rc1v22.0rc1W. J. van der Laan
Tree-SHA512: 1bc98f4a6d15d8f810fa6d2ee26c495a8da08dff3efd3d2ec6bbc6bd8091751a21436efc39f04fb68c5279312644ff9a63bcbc3c4df02e0bf89cd1cd8473bac5
2021-07-18Merge bitcoin/bitcoin#21430: build: Add -Werror=implicit-fallthrough compile ↵fanquake
flag 3c4c8e79baf02af97ba1502189f649b04ef2198d build: Add -Werror=implicit-fallthrough compile flag (Hennadii Stepanov) 014110c47d94ece6e3e655cdbf02ed8c91c7a5cf Use C++17 [[fallthrough]] attribute, and drop -Wno-implicit-fallthrough (Hennadii Stepanov) Pull request description: ACKs for top commit: fanquake: ACK 3c4c8e79baf02af97ba1502189f649b04ef2198d - looks ok to me now. Checked that warnings occur in our code & leveldb by removing a `[[fallthrough]]` or `FALLTHROUGH_INTENDED`. jarolrod: ACK 3c4c8e79baf02af97ba1502189f649b04ef2198d theStack: ACK 3c4c8e79baf02af97ba1502189f649b04ef2198d Tree-SHA512: 4dce91f0f26b8a3de09bd92bb3d7e1995e078e3a8b3ff861c4fbf6c0b32b2327d063633b07b89c4aa94a1141d7f78d46d9d43ab8df865273e342693ad30645b6
2021-07-07build: Use and test PE binutils with --reloc-sectionCarl Dong
Also fix test-security-check.py to account for new PE PIE failure indication.
2021-07-05build: remove --enable-determinism configure optionfanquake
2021-07-05build: Add -Werror=implicit-fallthrough compile flagHennadii Stepanov
2021-07-05Use C++17 [[fallthrough]] attribute, and drop -Wno-implicit-fallthroughHennadii Stepanov
2021-06-23build: remove check for Boost Process headerfanquake
Now that we require Boost 1.64.0+, Boost Process will be available.
2021-06-23build: remove workaround for Boost and std::atomicfanquake
2021-06-23build: set minimum required Boost to 1.64.0fanquake
2021-06-18Merge bitcoin/bitcoin#22238: build: improve detection of eBPF supportfanquake
8f7704d0321a71c1691837a6bd3b4e05f84d3031 build: improve detection of eBPF support (fanquake) Pull request description: Just checking for the `sys/sdt.h` header isn't enough, as systems like macOS have the header, but it doesn't actually have the `DTRACE_PROBE*` probes, which leads to [compile failures](https://github.com/bitcoin/bitcoin/pull/22006#issuecomment-859559004). The contents of `sys/sdt.h` in the macOS SDK is: ```bash #ifndef _SYS_SDT_H #define _SYS_SDT_H /* * This is a wrapper header that wraps the mach visible sdt.h header so that * the header file ends up visible where software expects it to be. We also * do the C/C++ symbol wrapping here, since Mach headers are technically C * interfaces. * * Note: The process of adding USDT probes to code is slightly different * than documented in the "Solaris Dynamic Tracing Guide". * The DTRACE_PROBE*() macros are not supported on Mac OS X -- instead see * "BUILDING CODE CONTAINING USDT PROBES" in the dtrace(1) manpage * */ #include <sys/cdefs.h> __BEGIN_DECLS #include <mach/sdt.h> __END_DECLS #endif /* _SYS_SDT_H */ ``` The `BUILDING CODE CONTAINING USDT PROBES` section from the dtrace manpage is available [here](https://gist.github.com/fanquake/e56c9866d53b326646d04ab43a8df9e2), and outlines the more involved process of using USDT probes on macOS. ACKs for top commit: jb55: utACK 8f7704d0321a71c1691837a6bd3b4e05f84d3031 practicalswift: cr ACK 8f7704d0321a71c1691837a6bd3b4e05f84d3031 hebasto: ACK 8f7704d0321a71c1691837a6bd3b4e05f84d3031, tested on macOS Big Sur 11.4 (20F71) and on Linux Mint 20.1 (x86_64) with depends. Tree-SHA512: 5f1351d0ac2e655fccb22a5454f415906404fdaa336fd89b54ef49ca50a442c44ab92d063cba3f161cb8ea0679c92ae3cd6cfbbcb19728cac21116247a017df5
2021-06-17Merge bitcoin/bitcoin#21935: Enable external signer support by default, ↵fanquake
reduce #ifdef 2f5bdcbc31a2eeb7c11226a9e51c56f02ac807dd gui: misc external signer fixes and translation hints (Sjors Provoost) d672404466204444a1d9f2d3498de4448f53d2be refactor: make ExternalSigner NetworkArg() and m_chain private (Sjors Provoost) 4455145e266450397b45acd7286686966edd072b refactor: reduce #ifdef ENABLE_EXTERNAL_SIGNER usage (Sjors Provoost) 5be90c907eba0a38019c7d9826623d5d5f567c66 build: enable external signer by default (Sjors Provoost) 7d9453041b827bafbdfc1ac0b01c7b7e1ee2bd4f refactor: clean up external_signer.h includes (Sjors Provoost) fc0eca31b33f87882e2aa329a3746d4e08af1985 fuzz: fix fuzz binary linking order (Sjors Provoost) Pull request description: This follows the introduction of GUI support in https://github.com/bitcoin-core/gui/pull/4 I don't think we should expect GUI users to self compile. This also enables external signer support by default for RPC users. In addition this PR reduces the number of `#ifdef ENABLE_EXTERNAL_SIGNER`, which also fixes #21919. When compiled with `--disable-external-signer` such wallets can't be created in RPC or GUI, but they can be loaded. Attempting any action that calls HWI will trigger an error. Side-note: this PR may or may not (currently) break CI for the GUI repository, as explained here: https://github.com/bitcoin-core/gui/pull/4#issuecomment-769859001 ACKs for top commit: achow101: ACK 2f5bdcbc31a2eeb7c11226a9e51c56f02ac807dd hebasto: re-ACK 2f5bdcbc31a2eeb7c11226a9e51c56f02ac807dd Tree-SHA512: 1b71c5a8bea2be077ee9fa33a01130c957a0cf90951d4b7b04d3d0ef826bb77e474c3963abddfef2e2c1ea99d9c72cd2302d1eb9b5fcb7ba0bd2a625f006aa05
2021-06-16build: Disable deprecated-copy warning only when external warnings are enabledMarcoFalke
2021-06-16build: enable external signer by defaultSjors Provoost
2021-06-16build: improve detection of eBPF supportfanquake
Just checking for the `sys/sdt.h` header isn't enough, as systems like macOS have the header, but it doesn't actually have the dtrace probes, which leads to compile failures.
2021-06-07Merge bitcoin/bitcoin#21573: Update libsecp256k1 subtree to latest masterW. J. van der Laan
5c7ee1b2da6bf783d27034fca9dfd3a64ed525cb libsecp256k1 no longer has --with-bignum= configure option (Pieter Wuille) bdca9bcb6c9379707d09c63f02326884befbefb2 Squashed 'src/secp256k1/' changes from 3967d96bf1..efad3506a8 (Pieter Wuille) cabb5661234f8d832dbc3b65bf80b0acc02db0a0 Disable certain false positive warnings for libsecp256k1 msvc build (Pieter Wuille) Pull request description: This updates our src/secp256k1 subtree to the latest upstream master. The changes include: * The introduction of safegcd-based modular inverses, reducing ECDSA signing time by 25%-30% and ECDSA verification time by 15%-17%. * [Original paper](https://gcd.cr.yp.to/papers.html) by Daniel J. Bernstein and Bo-Yin Yang * [Implementation](https://github.com/bitcoin-core/secp256k1/pull/767) by Peter Dettman; [final](https://github.com/bitcoin-core/secp256k1/pull/831) version * [Explanation](https://github.com/bitcoin-core/secp256k1/blob/master/doc/safegcd_implementation.md) of the algorithm using Python snippets * [Analysis](https://github.com/sipa/safegcd-bounds) of the maximum number of iterations the algorithm needs * [Formal proof in Coq](https://medium.com/blockstream/a-formal-proof-of-safegcd-bounds-695e1735a348) by Russell O'Connor, for a high-level equivalent algorithm * Removal of libgmp as an (optional) dependency (which wasn't used in the Bitcoin Core build) * CI changes (Travis -> Cirrus) * Build system improvements ACKs for top commit: laanwj: Tested ACK 5c7ee1b2da6bf783d27034fca9dfd3a64ed525cb Tree-SHA512: ad8ac3746264d279556a4aa7efdde3733e114fdba8856dd53218588521f04d83950366f5c1ea8fd56329b4c7fe08eedf8e206f8f26dbe3f0f81852e138655431
2021-05-25Merge bitcoin/bitcoin#21788: build: Silence [-Wunused-command-line-argument] ↵fanquake
warnings e9f948c72790136656df6056fd9e3698f360e077 build: Convert warnings into errors when testing for -fstack-clash-protection (Hennadii Stepanov) Pull request description: Apple clang version 12.0.5 (clang-1205.0.22.9) that is a part of Xcode 12.5, and is based on LLVM clang 11.1.0, fires spammy warnings: ``` clang: warning: argument unused during compilation: '-fstack-clash-protection' [-Wunused-command-line-argument] ``` From the https://github.com/apple/llvm-project: ``` $ git log --oneline | grep 'stack-clash-protection' 00065d5cbd02 Revert "-fstack-clash-protection: Return an actual error when used on unsupported OS" 4d59c8fdb955 -fstack-clash-protection: Return an actual error when used on unsupported OS df3bfaa39071 [Driver] Change -fnostack-clash-protection to -fno-stack-clash-protection 68e07da3e5d5 [clang][PowerPC] Enable -fstack-clash-protection option for ppc64 515bfc66eace [SystemZ] Implement -fstack-clash-protection e67cbac81211 Support -fstack-clash-protection for x86 454621160066 Revert "Support -fstack-clash-protection for x86" 0fd51a4554f5 Support -fstack-clash-protection for x86 658495e6ecd4 Revert "Support -fstack-clash-protection for x86" e229017732bc Support -fstack-clash-protection for x86 b03c3d8c6209 Revert "Support -fstack-clash-protection for x86" 4a1a0690ad68 Support -fstack-clash-protection for x86 f6d98429fcdb Revert "Support -fstack-clash-protection for x86" 39f50da2a357 Support -fstack-clash-protection for x86 ``` I suppose, that Apple clang-1205.0.22.9 ends with on of the "Revert..." commits. This PR prevents using of the `-fstack-clash-protection` flag if it causes warnings. --- System: macOS Big Sur 11.3 (20E232). ACKs for top commit: jarolrod: re-ACK e9f948c72790136656df6056fd9e3698f360e077 Sjors: tACK e9f948c72790136656df6056fd9e3698f360e077 on macOS 11.3.1 Tree-SHA512: 30186da67f9b0f34418014860c766c2e7f622405520f1cbbc1095d4aa4038b0a86014d76076f318a4b1b09170a96d8167c21d7f53a760e26017f486e1a7d39d4
2021-05-24build: Convert warnings into errors when testing for -fstack-clash-protectionHennadii Stepanov
When building with Clang, if `-fstack-clash-protection` is used with an unsupported target, it may result in hundreds of `-Wunused-command-line-argument` warnings at compile time. This is currently the case when building for at least Darwin using Apple or LLVM Clang. Unsupported targets may also include *BSD, however that is changing; see further discussion in https://reviews.llvm.org/D92245 and https://reviews.freebsd.org/D27366. Note that this option is already skipped for Windows.
2021-05-08fuzz: Remove unused --enable-danger-fuzz-link-all optionMarcoFalke
2021-05-05Merge bitcoin/bitcoin#21629: build: fix configuring when building depends ↵W. J. van der Laan
with NO_BDB=1 a5491882a06d3bf7c486033037edd9c9203ecaed build: fix configuring when building depends with NO_BDB=1 (fanquake) Pull request description: Currently, if you build depends using `NO_BDB=1` (only sqlite wallets), `./configure` will fail as it still tries to find bdb. i.e: ```bash make -C depends/ NO_QT=1 NO_BDB=1 NO_UPNP=1 NO_ZMQ=1 NO_NATPMP=1 -j8 ... copying packages: native_b2 boost libevent sqlite ./autogen.sh ./configure --prefix=/home/ubuntu/bitcoin/depends/x86_64-pc-linux-gnu ... checking for Berkeley DB C++ headers... default configure: error: Found Berkeley DB other than 4.8, required for portable BDB wallets (--with-incompatible-bdb to ignore or --without-bdb to disable BDB wallet support) ``` This PR fixes the build such that you can build depends, opting out of bdb, without opting out of wallets entirely, and still configure successfully. I think I've tested across most potential configurations. i.e: ```bash ./configure (bdb and sqlite on system) bdb & sqlite are both are available ./configure --without-bdb (bdb and sqlite on system) only sqlite ./configure --without-sqlite (bdb and sqlite on system) only bdb ./configure --disable-wallet (bdb and sqlite on system) neither bdb or sqlite depends NO_WALLET=1 ./configure --prefix=/bitcoin/depends/x86_64-apple-darwin19.6.0 neither bdb or sqlite depends NO_BDB=1 ./configure --prefix=/bitcoin/depends/x86_64-apple-darwin19.6.0 only sqlite depends NO_SQLITE=1 ./configure --prefix=/bitcoin/depends/x86_64-apple-darwin19.6.0 only bdb depends ./configure --prefix=/bitcoin/depends/x86_64-apple-darwin19.6.0 bdb and sqlite ``` ACKs for top commit: laanwj: Code review ACK a5491882a06d3bf7c486033037edd9c9203ecaed jarolrod: ACK a5491882a06d3bf7c486033037edd9c9203ecaed Tree-SHA512: baf7d2543a401db0d846095415ff449c04ecfb4a74c734dc51e79453702f9051210daeef686970f11fcffd32cdfadbc58acd54f0706aceecfb3edb0ff17310d7
2021-04-23libsecp256k1 no longer has --with-bignum= configure optionPieter Wuille
2021-04-21Merge #20353: configure: Support -fdebug-prefix-map and -fmacro-prefix-mapfanquake
7abac98d3e3c1bc8ad66cb5c05184b9c5cc674d5 configure: Support -f{debug,macro}-prefix-map (Anthony Towns) Pull request description: When bitcoin is checked out in two directories (eg via git worktree) object files between the two will differ due to the full path being included in the debug section. `-fdebug-prefix-map` is used to replace this with "." to avoid this unnecessary difference and allow ccache to share objects between worktrees (provided the source and compile options are the same). Also provide `-fmacro-prefix-map` if supported so that the working dir is not encoded in `__FILE__` macros. ACKs for top commit: practicalswift: cr ACK 7abac98d3e3c1bc8ad66cb5c05184b9c5cc674d5: patch looks correct fanquake: ACK 7abac98d3e3c1bc8ad66cb5c05184b9c5cc674d5 Tree-SHA512: b6a37c1728ec3b2e552f244da0e66db113c1e7662c7ac502e12ff466f3dbfbfefae12695ca135137c50dbb1c4c5d84059116c0cd09b391a17466dc77b8726679
2021-04-07build: fix configuring when building depends with NO_BDB=1fanquake
Currently, if you build depends using `NO_BDB=1` (only sqlite wallets), ./configure will fail as it still tries to find bdb. i.e: ```bash checking for Berkeley DB C++ headers... default configure: error: Found Berkeley DB other than 4.8, required for portable BDB wallets (--with-incompatible-bdb to ignore or --without-bdb to disable BDB wallet support) ``` This PR fixes the build such that you can build depends, opting out of bdb without opting out of wallets entirely, and still configure successfully.
2021-04-07Merge #21613: build: enable -Wdocumentationfanquake
a4e970adb6de8425025ae3f62fb89d9e27a8ab1f build: enable -Wdocumentation if suppressing external warnings (fanquake) 3b0078f958c46e94b468c829522ba965f5549f11 doc: fixup -Wdocumentation issues (fanquake) c6edcf1c710e4aaf1cafdbf8e86fe209b57bdeb8 build: suppress libevent warnings if supressing external warnings (fanquake) Pull request description: Enable `-Wdocumentation` by taking advantage of our `--enable-suppress-external-warnings` flag. Most of the CIs are using this flag now, so any regressions should be caught. This also required modifying libevents flags when suppressing warnings, as depending on the version being built against, that could generate a large number of warnings. i.e: ```bash In file included from httpserver.cpp:34: In file included from ./support/events.h:12: /usr/local/Cellar/libevent/2.1.12/include/event2/http.h:464:11: warning: parameter 'req' not found in the function declaration [-Wdocumentation] @param req a request object ^~~ /usr/local/Cellar/libevent/2.1.12/include/event2/http.h:465:11: warning: parameter 'databuf' not found in the function declaration [-Wdocumentation] @param databuf the data chunk to send as part of the reply. ^~~~~~~ /usr/local/Cellar/libevent/2.1.12/include/event2/http.h:467:11: warning: parameter 'call' not found in the function declaration [-Wdocumentation] @param call back's argument. ^~~~ /usr/local/Cellar/libevent/2.1.12/include/event2/http.h:939:4: warning: declaration is marked with '@deprecated' command but does not have a deprecation attribute [-Wdocumentation-deprecated-sync] @deprecated This function is deprecated; you probably want to use ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/Cellar/libevent/2.1.12/include/event2/http.h:946:1: note: add a deprecation attribute to the declaration to silence this warning char *evhttp_decode_uri(const char *uri); ^ __AVAILABILITY_INTERNAL_DEPRECATED /usr/local/Cellar/libevent/2.1.12/include/event2/http.h:979:5: warning: declaration is marked with '@deprecated' command but does not have a deprecation attribute [-Wdocumentation-deprecated-sync] @deprecated This function is deprecated as of Libevent 2.0.9. Use ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/Cellar/libevent/2.1.12/include/event2/http.h:987:1: note: add a deprecation attribute to the declaration to silence this warning int evhttp_parse_query(const char *uri, struct evkeyvalq *headers); ^ __AVAILABILITY_INTERNAL_DEPRECATED /usr/local/Cellar/libevent/2.1.12/include/event2/http.h:1002:11: warning: parameter 'query_parse' not found in the function declaration [-Wdocumentation] @param query_parse the query portion of the URI ^~~~~~~~~~~ /usr/local/Cellar/libevent/2.1.12/include/event2/http.h:1002:11: note: did you mean 'uri'? @param query_parse the query portion of the URI ^~~~~~~~~~~ uri 69 warnings generated. ``` Note that a lot of these have already been fixed upstream. ACKs for top commit: laanwj: Concept and code review ACK a4e970adb6de8425025ae3f62fb89d9e27a8ab1f practicalswift: cr ACK a4e970adb6de8425025ae3f62fb89d9e27a8ab1f: automatic compiler feedback comes sooner and is more reliable than manual reviewer feedback jonatack: Light ACK a4e970adb6de8425025ae3f62fb89d9e27a8ab1f skimmed the changes, clang 11 build is clean with the change, verified -Wdocumentation build warnings with this change when a doc fix was reverted Tree-SHA512: 57a1e30cffcc8bcceee72d85f58ebe29eae525861c70acb237541bd480c51ede89875c033042c0af376fdbb49fb7f588ef9282a47c6e78f9d4501c41f1b21eb6
2021-04-06build: enable -Wdocumentation if suppressing external warningsfanquake
Co-authored-by: Ben Woosley <ben.woosley@gmail.com>
2021-04-06build: suppress libevent warnings if supressing external warningsfanquake
2021-04-06build: remove -Wdeprecated-register from NOWARN flagsfanquake
The register keyword was deprecated in C++11, and removed in C++17. Now that we require C++17, we shouldn't have to supress warnings for a non-existant feature.
2021-03-29build: check if -lsocket is required with *ifaddrsfanquake
2021-03-27Merge #21505: build: Remove unused header from the build systemfanquake
0eabb2abede1230edcc0d7b660d9635135f0b4c1 build: Remove unused header from the build system (Hennadii Stepanov) Pull request description: The only `#include <miniupnpc/miniwget.h>` was removed in #16659. ACKs for top commit: practicalswift: cr ACK 0eabb2abede1230edcc0d7b660d9635135f0b4c1 fanquake: ACK 0eabb2abede1230edcc0d7b660d9635135f0b4c1 Tree-SHA512: 630da03875c851e80286561eae0f966c89624cbb17b90f70e2bec9a69146e79d088fc176e07a4906915770ac1cdb11341a7a431ea7cf6a59d2816e927486f335
2021-03-24Merge #17227: Qt: Add Android packaging supportWladimir J. van der Laan
246774e26459cb3652e308880abdd140e8e9d204 depends: fix Qt precompiled headers bug (Igor Cota) 8e7ad4146d55f472e3d1dacaabb6b7dee704a896 depends: disable Qt Vulkan support on Android (Igor Cota) ba46adaa1abd51798394b5bad3799021adc237d2 CI: add Android APK build to cirrus (Igor Cota) 7563720e30a3052b7ee390f1b3d2874856fd073a CI: add Android APK build script (Igor Cota) ebfb10cb75adb704418d08197681c1e742e63bd5 Qt: add Android packaging support (Igor Cota) Pull request description: ![bitcoin-qt](https://user-images.githubusercontent.com/762502/67396157-62f3d000-f5a7-11e9-8a6f-9425823fcd6c.gif) This PR is the third and final piece of the basic Android support puzzle - it depends on https://github.com/bitcoin/bitcoin/pull/16110 and is related to https://github.com/bitcoin/bitcoin/pull/16883. It introduces an `android` directory under `qt` and a simple way to build an Android package of `bitcoin-qt`: 1. Build depends for Android as described in the [README](https://github.com/bitcoin/bitcoin/blob/master/depends/README.md) 2. Configure with one of the resulting prefixes 3. Run `make && make apk` in `src/qt` The resulting APK files will be in `android/build/outputs/apk`. You can install them manually or with [adb](https://developer.android.com/studio/command-line/adb). One can also open the `android` directory in Android Studio for that integrated development and debugging experience. `BitcoinQtActivity` is your starting point. Under the hood makefile `apk` target: 1. Renames the `bitcoin-qt` binary to `libbitcoin-qt.so` and copies it over to a folder under `android/libs` depending on which prefix and corresponding [ABI](https://developer.android.com/ndk/guides/abis.html#sa) `bitcoin-qt` was built for 2. Takes `libc++_shared.so` from the Android NDK and puts in the same place. It [must be included](https://developer.android.com/ndk/guides/cpp-support) in the APK 3. Extracts Qt for Android Java support files from the `qtbase` archive in `depends/sources` to `android/src` There is also just a tiny bit of `ifdef`'d code to make the Qt Widgets menus usable. It's not pretty but it works and is a stepping stone towards https://github.com/bitcoin/bitcoin/pull/16883. ACKs for top commit: MarcoFalke: cr ACK 246774e264 laanwj: Code review ACK 246774e26459cb3652e308880abdd140e8e9d204 Tree-SHA512: ba30a746576a167545223c35a51ae60bb0838818779fc152c210f5af1413961b2a6ab6af520ff92cbc8dcd5dcb663e81ca960f021218430c1f76397ed4cead6c
2021-03-22build: Remove unused header from the build systemHennadii Stepanov
2021-03-21Qt: add Android packaging supportIgor Cota
Introduce an android directory under qt and allow one to package bitcoin-qt for Android by running make apk. Add bitcoin-qt Android build instructions.
2021-03-12build: don't try and use -fstack-clash-protection on Windowsfanquake
This has never worked with any of the mingw-w64 compilers we use, and the -O0 is causing issues for builders applying spectre mitigations. Recent discussion on https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90458 also indicates that this should just not be used on Windows.
2021-03-11Merge #21007: bitcoind: Add -daemonwait option to wait for initializationWladimir J. van der Laan
e017a913d0d78ef0766cf73586fe7a38488e1a26 bitcoind: Add -daemonwait option to wait for initialization (Wladimir J. van der Laan) c3e6fdee6d39d3f52dec421b48a0ac8bad5006f7 shutdown: Use RAII TokenPipe in shutdown (Wladimir J. van der Laan) 612f746a8ffa265b6877bedbbe21fcbb392f1516 util: Add RAII TokenPipe (Wladimir J. van der Laan) Pull request description: This adds a `-daemonwait` flag that does the same as `-daemon` except that it, from a user perspective, backgrounds the process only after initialization is complete. This is similar to the behaviour of some other software such as c-lightning. This can be useful when the process launching bitcoind wants to guarantee that either the RPC server is running, or that initialization failed, before continuing. The exit code indicates the initialization result. The use of the libc function `daemon()` is replaced by a custom implementation which is inspired by the [glibc implementation](https://github.com/lattera/glibc/blob/master/misc/daemon.c#L44), but which also creates a pipe from the child to the parent process for communication. An additional advantage of having our own `daemon()` implementation is that no MACOS-specific pragmas are needed anymore to silence a deprecation warning. TODO: - [x] Factor out `token_read` and `token_write` to an utility, and use them in `shutdown.cpp` as well—this is exactly the same kind of communication mechanism. - [x] RAII-ify pipe endpoints. - [x] Improve granularity of the `configure.ac` checks. This currently still checks for the function `daemon()` which makes no sense as it's not used. It should check for individual functions such as `fork()` and `setsid()` etc—the former being required, the second optional. - [-] ~~Signal propagation during initialization: if say, pressing Ctrl-C during `-daemonwait` it would be good to pass this SIGINT on to the child process instead of detaching the parent process and letting the child run free.~~ This is not necessary, see https://github.com/bitcoin/bitcoin/pull/21007#issuecomment-769007341. Future: - Consider if it makes sense to use this in the RPC tests (there would be no more need for "is RPC ready" polling loops). I think this is out of scope for this PR. ACKs for top commit: jonatack: Tested ACK e017a913d0d78ef0766cf73586fe7a38488e1a26 checked change since previous review is move-only Tree-SHA512: 53369b8ca2247e4cf3af8cb2cfd5b3399e8e0e3296423d64be987004758162a7ddc1287b01a92d7692328edcb2da4cf05d279b1b4ef61a665b71440ab6a6dbe2
2021-03-04bitcoind: Add -daemonwait option to wait for initializationWladimir J. van der Laan
This adds a `-daemonwait` flag that does the same as `-daemon` except it, from a user perspective, backgrounds the process only after initialization is complete. This can be useful when the process launching bitcoind wants to guarantee that either the RPC server is running, or that initialization failed, before continuing. The exit code indicates the initialization result. This replaces the use of the libc function `daemon()` by a custom implementation which is inspired by the glibc implementation, but also creates a pipe from the child to the parent process for communication. An additional advantage of having our own `daemon()` implementation is that no MACOS-specific pragmas are needed anymore to silence a deprecation warning.
2021-03-04build: compile libnatpmp with -DNATPMP_STATICLIB on Windowsfanquake
This fixes linking issues and mirrors what we do with miniupnpc.
2021-03-02build: Make AM_CONDITIONAL([ENABLE_EXTERNAL_SIGNER]) unconditionalHennadii Stepanov
This change fixes an error when the value of the "use_boost" variable is equal to "no".
2021-03-02build, refactor: Fix indentation for if..then..fiHennadii Stepanov
This makes easier to spot conditional macros.
2021-02-28Merge #21286: build: Bump minimum Qt version to 5.9.5fanquake
faa06ecc9c357428f3fa7a8f86b41b1220809951 build: Bump minimum Qt version to 5.9.5 (Hennadii Stepanov) Pull request description: Close #20104. ACKs for top commit: laanwj: Code review ACK faa06ecc9c357428f3fa7a8f86b41b1220809951 jarolrod: ACK faa06ecc9c357428f3fa7a8f86b41b1220809951 fanquake: ACK faa06ecc9c357428f3fa7a8f86b41b1220809951 - this should be ok to do now. Tree-SHA512: 7295472b5fd37ffb30f044e88c39d375a5a5187d3f2d44d4e73d0eb0c7fd923cf9949c2ddab6cddd8c5da7e375fff38112b6ea9779da4fecce6f024d05ba9c08
2021-02-25Merge #21264: fuzz: Two scripted diff renamesMarcoFalke
fae216a73d71441432cf07212313d18771ce7deb scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext (MarcoFalke) fa4fbec03e4395a6ab75ea98a696bee6d768e97e scripted-diff: Rename PROVIDE_MAIN_FUNCTION -> PROVIDE_FUZZ_MAIN_FUNCTION (MarcoFalke) Pull request description: Split out two renames from #21003: * `PROVIDE_FUZZ_MAIN_FUNCTION`. *Reason*: This in only used by fuzzing, so the name should indicate that. * `MakeNoLogFileContext`. *Reason*: Better reflects what the helper does. Also, prepares it to be used in non-fuzz tests in the future. ACKs for top commit: practicalswift: cr ACK fae216a73d71441432cf07212313d18771ce7deb: scripted-diff looks correct Tree-SHA512: e5d347746f5da72b0c86fd4f07ac2e4b3016e88e8c97a830c73bd79d0af6d0245fe7712487fc20344d6cc25958941716c1678124a123930407e3a437265b71df
2021-02-24build, doc: Fix configure script output indentation and typosHennadii Stepanov
2021-02-23build: Bump minimum Qt version to 5.9.5Hennadii Stepanov
2021-02-23Merge #21250: build: make HAVE_O_CLOEXEC available outside LevelDB (bugfix)Wladimir J. van der Laan
9bac71350d98580cc7441957fc7c3fa2f4158553 build: make HAVE_O_CLOEXEC available outside LevelDB (bugfix) (Sebastian Falbesoner) 584fd91d2d294883e6896dbd64a2176528e94581 init: only use pipe2 if availabile, check in configure (Sebastian Falbesoner) Pull request description: The result of the O_CLOEXEC availability check is currently only set in the Makefile and passed to LevelDB (see `LEVELDB_CPPFLAGS_INT` in `src/Makefile.leveldb.include`), but not defined to be used in our codebase. This means that code within the preprocessor conditional `#if HAVE_O_CLOEXEC` was actually never compiled. On the master branch this is currently used for pipe creation in `src/shutdown.cpp`, PR #21007 moves this part to a new module (I found the issue while testing that PR). The fix is similar to the one in #19803, which solved the same problem for HAVE_FDATASYNC. In the course of working on the PR it turned out that pipe2 is not available an all platforms, hence a configure check and a corresponding define HAVE_PIPE2 is introduced and used. The PR can be tested by anyone with a system that has pipe2 and O_CLOEXEC available by putting gibberish into the HAVE_O_CLOEXEC block: on master, everything should compile fine, on PR, the compiler should abort with an error. At least that's my naive way of testing preprocessor logic, happy to hear more sophisticated ways :-) ACKs for top commit: laanwj: Code review ACK 9bac71350d98580cc7441957fc7c3fa2f4158553 Tree-SHA512: aec89faf6ba52b6f014c610ebef7b725d9e967207d58b42a4a71afc9f1268fcb673ecc85b33a2a3debba8105a304dd7edaba4208c5373fcef2ab83e48a170051
2021-02-22build: make HAVE_O_CLOEXEC available outside LevelDB (bugfix)Sebastian Falbesoner
2021-02-22init: only use pipe2 if availabile, check in configureSebastian Falbesoner