From a3a4f633154d8b8f221b656f2db4386816d34f33 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Thu, 2 Sep 2021 18:04:49 +0200 Subject: [PATCH 01/18] Merge bitcoin/bitcoin#18448: rpc: fix/add missing RPCExamples for "Util" RPCs ea98d9c2eff86e6537f35ac4381ac169daacde36 rpc: fix/add missing RPCExamples for "Util" RPCs (Sebastian Falbesoner) Pull request description: Similar to https://github.com/bitcoin/bitcoin/pull/18398, this PR gives the RPCExamples in the RPC category "Util" (that currently contains `createmultisig`, `deriveaddresses`, `estimatesmartfee`, `getdescriptorinfo`, `signmessagewithprivkey`, `validateaddress`, `verifymessage`) some love by fixing one broken and adding three missing examples: - fixed `HelpExampleRpc` for `createmultisig` (disturbing escape characters and quotation marks) - added missing `HelpExampleRpc` for - `deriveaddresses` (also put descriptor in a new string constant) - `estimatesmartfee` - `getdescriptorinfo` (also put descriptor in a new string constant) Output for `createmultisig` example on the master branch: ``` $ curl --user __cookie__ --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "createmultisig", "params": [2, "[\"03789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd\",\"03dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a61626\"]"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ Enter host password for user '__cookie__': {"result":null,"error":{"code":-1,"message":"JSON value is not an array as expected"},"id":"curltest"} ``` Output for `createmultisig` example on the PR branch: ``` $ curl --user __cookie__ --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "createmultisig", "params": [2, ["03789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd","03dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a61626"]]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ Enter host password for user '__cookie__': {"result":{"address":"3QsFXpFJf2ZY6GLWVoNFFd2xSDwdS713qX","redeemScript":"522103789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd2103dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a6162652ae","descriptor":"sh(multi(2,03789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd,03dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a61626))#4djp057k"},"error":null,"id":"curltest"} ``` ACKs for top commit: jonatack: ACK ea98d9c2eff86e6537f35ac4381ac169daacde36 looked at the code, rebased to master, ran the helps, did not try running the added json-rpc examples Tree-SHA512: d6ecb6da66f19517065453357d210102e2cc9f1f8037aeb6a9177ff036d0c21773dddf5e0acdbc71edbbde3026e4d1e7ce7c0935cd3e023c60f34e1b173b3299 --- src/rpc/mining.cpp | 3 ++- src/rpc/misc.cpp | 13 ++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 026ceb2fc2..97e40c58e8 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -1143,7 +1143,8 @@ static RPCHelpMan estimatesmartfee() "have been observed to make an estimate for any number of blocks."}, }}, RPCExamples{ - HelpExampleCli("estimatesmartfee", "6") + HelpExampleCli("estimatesmartfee", "6") + + HelpExampleRpc("estimatesmartfee", "6") }, [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue { diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 6872f41115..4670387766 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -308,7 +308,7 @@ static RPCHelpMan createmultisig() "\nCreate a multisig address from 2 public keys\n" + HelpExampleCli("createmultisig", "2 \"[\\\"03789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd\\\",\\\"03dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a61626\\\"]\"") + "\nAs a JSON-RPC call\n" - + HelpExampleRpc("createmultisig", "2, \"[\\\"03789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd\\\",\\\"03dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a61626\\\"]\"") + + HelpExampleRpc("createmultisig", "2, [\"03789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd\",\"03dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a61626\"]") }, [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue { @@ -345,6 +345,8 @@ static RPCHelpMan createmultisig() static RPCHelpMan getdescriptorinfo() { + const std::string EXAMPLE_DESCRIPTOR = "wpkh([d34db33f/84h/0h/0h]0279be667ef9dcbbac55a06295Ce870b07029Bfcdb2dce28d959f2815b16f81798)"; + return RPCHelpMan{"getdescriptorinfo", {"\nAnalyses a descriptor.\n"}, { @@ -362,7 +364,9 @@ static RPCHelpMan getdescriptorinfo() }, RPCExamples{ "\nAnalyse a descriptor\n" - + HelpExampleCli("getdescriptorinfo", "\"pkh([d34db33f/84h/0h/0h]0279be667ef9dcbbac55a06295Ce870b07029Bfcdb2dce28d959f2815b16f81798)\"") + + HelpExampleCli("getdescriptorinfo", "\"" + EXAMPLE_DESCRIPTOR + "\"") + + HelpExampleRpc("getdescriptorinfo", "\"" + EXAMPLE_DESCRIPTOR + "\"") + }, [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue { @@ -389,6 +393,8 @@ static RPCHelpMan getdescriptorinfo() static RPCHelpMan deriveaddresses() { + const std::string EXAMPLE_DESCRIPTOR = "wpkh([d34db33f/84h/0h/0h]xpub6DJ2dNUysrn5Vt36jH2KLBT2i1auw1tTSSomg8PhqNiUtx8QX2SvC9nrHu81fT41fvDUnhMjEzQgXnQjKEu3oaqMSzhSrHMxyyoEAmUHQbY/0/*)#cjjspncu"; + return RPCHelpMan{"deriveaddresses", "\nDerives one or more addresses corresponding to an output descriptor.\n" "Examples of output descriptors are:\n" @@ -410,7 +416,8 @@ static RPCHelpMan deriveaddresses() }, RPCExamples{ "\nFirst three receive addresses\n" - + HelpExampleCli("deriveaddresses", "\"pkh([d34db33f/84h/0h/0h]xpub6DJ2dNUysrn5Vt36jH2KLBT2i1auw1tTSSomg8PhqNiUtx8QX2SvC9nrHu81fT41fvDUnhMjEzQgXnQjKEu3oaqMSzhSrHMxyyoEAmUHQbY/0/*)#cjjspncu\" \"[0,2]\"") + + HelpExampleCli("deriveaddresses", "\"" + EXAMPLE_DESCRIPTOR + "\" \"[0,2]\"") + + HelpExampleRpc("deriveaddresses", "\"" + EXAMPLE_DESCRIPTOR + "\", \"[0,2]\"") }, [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue { From 98f7e82d07182d3caaacd1f3330f3b8cd84559a4 Mon Sep 17 00:00:00 2001 From: fanquake Date: Fri, 25 Feb 2022 11:49:49 +0000 Subject: [PATCH 02/18] Merge bitcoin/bitcoin#24433: doc: Explain that feedback needs to be addressed fa694f61ab21cb973843e5234a6aeacd4a957e05 doc: Explain that feedback needs to be addressed (MarcoFalke) fa0819eea380047c9d7404895d3e4e8ea37930bb doc: Move peer-review paragraph to right section (MarcoFalke) fa2b65b3583e7e7ffa892bf2453720b0d2bd7904 doc: Add link to release-process.md in CONTRIBUTING.md (MarcoFalke) Pull request description: Generally, the pull request author is expected to reply to all comments or iterate the code before merge. Of course, it is allowed to reject feedback, but it should not be done by silently ignoring it. Clarify this in the docs. Also, some minor copy edits. ACKs for top commit: michaelfolkson: ACK fa694f61ab21cb973843e5234a6aeacd4a957e05 Sjors: ACK fa694f61ab21cb973843e5234a6aeacd4a957e05 jamesob: ACK https://github.com/bitcoin/bitcoin/pull/24433/commits/fa694f61ab21cb973843e5234a6aeacd4a957e05 prayank23: ACK https://github.com/bitcoin/bitcoin/pull/24433/commits/fa694f61ab21cb973843e5234a6aeacd4a957e05 brunoerg: ACK fa694f61ab21cb973843e5234a6aeacd4a957e05 w0xlt: ACK fa694f6 Tree-SHA512: 339d6f252395664442f4bfb73d839314de8c9b0fdc8900a1c4a67b1cef9c73ecb98c7587a842dd5a36a4a3efbd8270d2162962013893706313f7ef34491db18c --- CONTRIBUTING.md | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a075ee3a6c..d181a70746 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,8 +12,8 @@ revolves around a meritocracy where contributors earn trust from the developer community over time. Nevertheless, some hierarchy is necessary for practical purposes. As such, there are repository "maintainers" who are responsible for merging pull requests, as well as a "lead maintainer" who is responsible for the -release cycle as well as overall merging, moderation and appointment of -maintainers. +[release cycle](/doc/release-process.md) as well as overall merging, moderation +and appointment of maintainers. Getting Started --------------- @@ -168,9 +168,14 @@ in the body of the pull request to indicate tasks are pending. At this stage, one should expect comments and review from other contributors. You can add more commits to your pull request by committing them locally and pushing -to your fork until you have satisfied all feedback. +to your fork. -Note: Code review is a burdensome but important part of the development process, and as such, certain types of pull requests are rejected. In general, if the **improvements** do not warrant the **review effort** required, the PR has a high chance of being rejected. It is up to the PR author to convince the reviewers that the changes warrant the review effort, and if reviewers are "Concept NACK'ing" the PR, the author may need to present arguments and/or do research backing their suggested changes. +You are expected to reply to any review comments before your pull request is +merged. You may update the code or reject the feedback if you do not agree with +it, but you should express so in a reply. If there is outstanding feedback and +you are not actively working on it, your pull request may be closed. + +Please refer to the [peer review](#peer-review) section below for more details. ### Squashing Commits @@ -301,6 +306,14 @@ maintainers take into account the peer review when determining if there is consensus to merge a pull request (remember that discussions may have been spread out over GitHub, mailing list and IRC discussions). +Code review is a burdensome but important part of the development process, and +as such, certain types of pull requests are rejected. In general, if the +**improvements** do not warrant the **review effort** required, the PR has a +high chance of being rejected. It is up to the PR author to convince the +reviewers that the changes warrant the review effort, and if reviewers are +"Concept NACK'ing" the PR, the author may need to present arguments and/or do +research backing their suggested changes. + #### Conceptual Review A review can be a conceptual review, where the reviewer leaves a comment @@ -481,11 +494,6 @@ the contents onto the [Tracker](https://docs.google.com/spreadsheets/d/1DnKxat0S When pasting the contents, make sure to split the values into the cells so every line is not present under commit hash. -Release Policy --------------- - -The project leader is the release manager for each Dash Core release. - Copyright --------- From e4c8ea5061c7775869d1328f30e019cf8764c897 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Fri, 28 Jan 2022 15:26:21 +0100 Subject: [PATCH 03/18] Merge bitcoin/bitcoin#24139: Avoid unsigned integer overflow in bitcoin-tx faa75fa19335e3e826efa4f2280609a2db34425d Avoid unsigned integer overflow in bitcoin-tx (MarcoFalke) Pull request description: While `npos` means "largest unsigned value" and adding `1` to it yields `0`, it may be clearer to just assign `0` to it and only increment otherwise. This also allows to remove a file-wide suppression for `unsigned-integer-overflow`. ACKs for top commit: hebasto: ACK faa75fa19335e3e826efa4f2280609a2db34425d, I have reviewed the code and it looks OK, I agree it can be merged. theStack: Code-review ACK faa75fa19335e3e826efa4f2280609a2db34425d Tree-SHA512: c24436641e5d801341c948b812c7f711d5dff70efdf04af00fd3221f4b81d93f25608dddaa36230ba81ca7ab0d18bdd957095d4561e22621e4d69017934f0a16 --- src/bitcoin-tx.cpp | 7 +++++-- test/sanitizer_suppressions/ubsan | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index 99889a3e96..0eb122f086 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -383,13 +383,16 @@ static void MutateTxAddOutData(CMutableTransaction& tx, const std::string& strIn if (pos==0) throw std::runtime_error("TX output value not specified"); - if (pos != std::string::npos) { + if (pos == std::string::npos) { + pos = 0; + } else { // Extract and validate VALUE value = ExtractAndValidateValue(strInput.substr(0, pos)); + ++pos; } // extract and validate DATA - std::string strData = strInput.substr(pos + 1, std::string::npos); + const std::string strData{strInput.substr(pos, std::string::npos)}; if (!IsHex(strData)) throw std::runtime_error("invalid TX output data"); diff --git a/test/sanitizer_suppressions/ubsan b/test/sanitizer_suppressions/ubsan index e1a49e9544..e3e64d50f3 100644 --- a/test/sanitizer_suppressions/ubsan +++ b/test/sanitizer_suppressions/ubsan @@ -21,7 +21,6 @@ unsigned-integer-overflow:addrman.cpp unsigned-integer-overflow:arith_uint256.h unsigned-integer-overflow:basic_string.h unsigned-integer-overflow:bench/bench.h -unsigned-integer-overflow:bitcoin-tx.cpp unsigned-integer-overflow:bloom.cpp unsigned-integer-overflow:chain.cpp unsigned-integer-overflow:chain.h From 237279950b3f0cf246d5ac1710fbd1f041c7e276 Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 21 Sep 2021 14:46:53 +0800 Subject: [PATCH 04/18] Merge bitcoin/bitcoin#23001: doc: Enable TLS in links in documentation 9bdda50151dd808cbad094d457bf0ed7939a7c87 Enable TLS in links in documentation (Jeremy Rand) Pull request description: This PR enables TLS in several documentation links, which improves security. ACKs for top commit: fanquake: ACK 9bdda50151dd808cbad094d457bf0ed7939a7c87 Tree-SHA512: 9d04d8771a9daf3c3b9914ff324e2eabfdf3ff5ae7f7dc92b84a1f3527010ceb860e73873a8f24d6051763eb472d9ea324ccbd6129a40318a520ca88c05f0586 --- contrib/guix/INSTALL.md | 2 +- contrib/guix/README.md | 2 +- doc/developer-notes.md | 2 +- src/test/data/README.md | 2 +- test/functional/README.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/guix/INSTALL.md b/contrib/guix/INSTALL.md index c7050b2ae3..2ab9968bdf 100644 --- a/contrib/guix/INSTALL.md +++ b/contrib/guix/INSTALL.md @@ -364,7 +364,7 @@ This is especially notable because Ubuntu Focal packages `libgit2 v0.28.4`, and Should you be in this situation, you need to build both `libgit2 v1.1.x` and `guile-git` from source. -Source: http://logs.guix.gnu.org/guix/2020-11-12.log#232527 +Source: https://logs.guix.gnu.org/guix/2020-11-12.log#232527 ##### `{scheme,guile}-bytestructures` v1.0.8 and v1.0.9 are broken for Guile v2.2 diff --git a/contrib/guix/README.md b/contrib/guix/README.md index 698deb47ac..23050cec48 100644 --- a/contrib/guix/README.md +++ b/contrib/guix/README.md @@ -430,6 +430,6 @@ used. If you start `guix-daemon` using an init script, you can edit said script to supply this flag. -[b17e]: http://bootstrappable.org/ +[b17e]: https://bootstrappable.org/ [r12e/source-date-epoch]: https://reproducible-builds.org/docs/source-date-epoch/ [env-vars-list]: #recognized-environment-variables diff --git a/doc/developer-notes.md b/doc/developer-notes.md index ab0783840e..248557919a 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -447,7 +447,7 @@ make cov Profiling is a good way to get a precise idea of where time is being spent in code. One tool for doing profiling on Linux platforms is called -[`perf`](http://www.brendangregg.com/perf.html), and has been integrated into +[`perf`](https://www.brendangregg.com/perf.html), and has been integrated into the functional test framework. Perf can observe a running process and sample (at some frequency) where its execution is. diff --git a/src/test/data/README.md b/src/test/data/README.md index ee907dff53..cc4d41c75d 100644 --- a/src/test/data/README.md +++ b/src/test/data/README.md @@ -8,5 +8,5 @@ License The data files in this directory are distributed under the MIT software license, see the accompanying file COPYING or -http://www.opensource.org/licenses/mit-license.php. +https://www.opensource.org/licenses/mit-license.php. diff --git a/test/functional/README.md b/test/functional/README.md index be46730f9d..12da5d8d7a 100644 --- a/test/functional/README.md +++ b/test/functional/README.md @@ -190,5 +190,5 @@ perf report -i /path/to/datadir/send-big-msgs.perf.data.xxxx --stdio | c++filt | #### See also: - [Installing perf](https://askubuntu.com/q/50145) -- [Perf examples](http://www.brendangregg.com/perf.html) +- [Perf examples](https://www.brendangregg.com/perf.html) - [Hotspot](https://github.com/KDAB/hotspot): a GUI for perf output analysis From d891d3c95cc539da62a7fd98d876cc9eb64820b6 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 21 Feb 2022 13:58:04 +0100 Subject: [PATCH 05/18] (partial) Merge bitcoin/bitcoin#24339: rpc: Improve RPC help by explicitly mentioning output types c821ab8be8dffb749853c05e05cb515c11e6328a Use `GetAllOutputTypes` in `getblock` RPC function (Kiminuo) d970a85d335202cc85f6604f794c43af6645673f Move `GetAllOutputTypes` function from `rpc/rawtransaction.cpp` to `rpc/util.{h|cpp}` (Kiminuo) Pull request description: This PR attempts to replicate https://github.com/bitcoin/bitcoin/blob/0ccf9b2e5594581deef2f60174c3651a57f93b64/src/rpc/rawtransaction.cpp#L547 to one other place (at the moment) so that users have better idea what RPC methods can actually return. I created this PR as a follow-up to the idea mentioned here https://github.com/bitcoin/bitcoin/pull/23320#discussion_r732458112 (resolved). ACKs for top commit: kristapsk: re-ACK c821ab8be8dffb749853c05e05cb515c11e6328a Tree-SHA512: 5ff66a41ad7c43ec769f4a99933d2d070feea7c617286d94b6f9bfa1a2547a42211915778210a89074ad4b14d99f34852cc6871efed5e6f1e2ffedd40d669386 --- src/rpc/rawtransaction.cpp | 10 ---------- src/rpc/util.cpp | 10 ++++++++++ src/rpc/util.h | 7 +++++++ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index d3c37f7345..6c1a433dc0 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -867,16 +867,6 @@ static RPCHelpMan decoderawtransaction() }; } -static std::string GetAllOutputTypes() -{ - std::vector ret; - using U = std::underlying_type::type; - for (U i = (U)TxoutType::NONSTANDARD; i <= (U)TxoutType::NULL_DATA; ++i) { - ret.emplace_back(GetTxnOutputType(static_cast(i))); - } - return Join(ret, ", "); -} - static RPCHelpMan decodescript() { return RPCHelpMan{"decodescript", diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp index 3b02da632f..29d48cac63 100644 --- a/src/rpc/util.cpp +++ b/src/rpc/util.cpp @@ -18,6 +18,16 @@ const std::string UNIX_EPOCH_TIME = "UNIX epoch time"; const std::string EXAMPLE_ADDRESS[2] = {"XunLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPw0", "XwQQkwA4FYkq2XERzMY2CiAZhJTEDAbtc0"}; +std::string GetAllOutputTypes() +{ + std::vector ret; + using U = std::underlying_type::type; + for (U i = (U)TxoutType::NONSTANDARD; i <= (U)TxoutType::NULL_DATA; ++i) { + ret.emplace_back(GetTxnOutputType(static_cast(i))); + } + return Join(ret, ", "); +} + void RPCTypeCheck(const UniValue& params, const std::list& typesExpected, bool fAllowNull) diff --git a/src/rpc/util.h b/src/rpc/util.h index 189551cd03..b373a044fb 100644 --- a/src/rpc/util.h +++ b/src/rpc/util.h @@ -41,6 +41,13 @@ class CPubKey; class CScript; struct Sections; +/** + * Gets all existing output types formatted for RPC help sections. + * + * @return Comma separated string representing output type names. + */ +std::string GetAllOutputTypes(); + /** Wrapper for UniValue::VType, which includes typeAny: * Used to denote don't care type. */ struct UniValueType { From 1a12ef14dac4fed75aab5cc140ea1dfbdf89841a Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Tue, 14 Sep 2021 15:48:36 +0300 Subject: [PATCH 06/18] (partial)Merge bitcoin-core/gui#420: Ensure translator comments end in full stop 5cc783f5f32ffd550d1b298fc2e9cf6c0439f9fe qt: ensure translator comments end in full stop (Jarol Rodriguez) Pull request description: This is a follow-up to #318 which addresses this [nit](https://github.com/bitcoin-core/gui/pull/318#discussion_r706856893) by addressing it globally. This ensures that all GUI translator comments end in a full stop. If a comment does not end in a full stop, a translator may think that the rest of the comment is being cut off. While here, add a colon to the word "see" for any comments touched which point to look at a link. ACKs for top commit: hebasto: ACK 5cc783f5f32ffd550d1b298fc2e9cf6c0439f9fe, I have reviewed the code and it looks OK, I agree it can be merged. shaavan: Code Review ACK 5cc783f5f32ffd550d1b298fc2e9cf6c0439f9fe Tree-SHA512: 67a1d56175c974e0af9b460fa44163f7ce139a7b81cfaf8ed2c0e7fb6d5120957c3135d96010aeb6229689468e36673fe9571b5a8c3e1c07e047aba1bd563444 --- src/qt/addressbookpage.cpp | 2 +- src/qt/qrimagewidget.cpp | 2 +- src/qt/transactionview.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp index b9db3fa5eb..c0f3ebf343 100644 --- a/src/qt/addressbookpage.cpp +++ b/src/qt/addressbookpage.cpp @@ -306,7 +306,7 @@ void AddressBookPage::on_exportButton_clicked() QString filename = GUIUtil::getSaveFileName(this, tr("Export Address List"), QString(), /*: Expanded name of the CSV file format. - See https://en.wikipedia.org/wiki/Comma-separated_values */ + See: https://en.wikipedia.org/wiki/Comma-separated_values. */ tr("Comma separated file") + QLatin1String(" (*.csv)"), nullptr); if (filename.isNull()) diff --git a/src/qt/qrimagewidget.cpp b/src/qt/qrimagewidget.cpp index b14416f60c..40a55a9e4b 100644 --- a/src/qt/qrimagewidget.cpp +++ b/src/qt/qrimagewidget.cpp @@ -133,7 +133,7 @@ void QRImageWidget::saveImage() QString fn = GUIUtil::getSaveFileName( this, tr("Save QR Code"), QString(), /*: Expanded name of the PNG file format. - See https://en.wikipedia.org/wiki/Portable_Network_Graphics */ + See: https://en.wikipedia.org/wiki/Portable_Network_Graphics. */ tr("PNG Image") + QLatin1String(" (*.png)"), nullptr); if (!fn.isEmpty()) { diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index 619f120229..80e030c24f 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -364,7 +364,7 @@ void TransactionView::exportClicked() QString filename = GUIUtil::getSaveFileName(this, tr("Export Transaction History"), QString(), /*: Expanded name of the CSV file format. - See https://en.wikipedia.org/wiki/Comma-separated_values */ + See: https://en.wikipedia.org/wiki/Comma-separated_values. */ tr("Comma separated file") + QLatin1String(" (*.csv)"), nullptr); if (filename.isNull()) From 45e0f6e56d1f9441f6d832619f33db0af8afcc38 Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 2 Aug 2022 11:52:13 +0100 Subject: [PATCH 07/18] Merge bitcoin/bitcoin#25763: bdb: disable Werror for format-security 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 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 --- depends/packages/bdb.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/bdb.mk b/depends/packages/bdb.mk index dc536fd399..b69276cb15 100644 --- a/depends/packages/bdb.mk +++ b/depends/packages/bdb.mk @@ -14,7 +14,7 @@ $(package)_config_opts_freebsd=--with-pic $(package)_config_opts_netbsd=--with-pic $(package)_config_opts_openbsd=--with-pic $(package)_config_opts_android=--with-pic -$(package)_cflags+=-Wno-error=implicit-function-declaration +$(package)_cflags+=-Wno-error=implicit-function-declaration -Wno-error=format-security $(package)_cxxflags+=-std=c++17 $(package)_cppflags_mingw32=-DUNICODE -D_UNICODE endef From b1ac9926e74e7d5649882db6d71b5a217c1457cc Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 28 Nov 2022 13:27:30 +0000 Subject: [PATCH 08/18] Merge bitcoin/bitcoin#26073: build: fix depends bdb compilation for BSDs 5b2529b2697e9b2675783c98a32a41e28c72e076 build: fix depends bdb compilation for BSDs (fanquake) Pull request description: Currently, building bdb for *BSD HOSTs in depends fails with: ```bash libtool: compile: clang -m64 -c -I. -I../dist/./.. -I/home/ubuntu/bitcoin/depends/x86_64-unknown-freebsd/include -D_THREAD_SAFE -pipe -std=c11 -O2 -Wno-error=implicit-function-declaration -Wno-error=format-security ../dist/./../mutex/mut_tas.c -fPIC -DPIC -o mut_tas.o In file included from ../dist/./../mutex/mut_tas.c:11: In file included from ./db_int.h:884: In file included from ../dist/./../dbinc/mutex.h:15: ../dist/./../dbinc/mutex_int.h:932:2: error: unknown type name 'pthread_rwlock_t' MUTEX_FIELDS /* Opaque thread mutex structures. */ ^ ../dist/./../dbinc/mutex_int.h:65:3: note: expanded from macro 'MUTEX_FIELDS' pthread_rwlock_t rwlock; /* Read/write lock */ \ ^ 1 error generated. ``` Defining `_XOPEN_SOURCE` >=600 fixes access to the missing `pthread_rwlock_t` definitions. ACKs for top commit: jarolrod: ACK 5b2529b2697e9b2675783c98a32a41e28c72e076 Tree-SHA512: 76584bfef7a86c69a095eb722657aa681b95658a031ef2da79d91a616e5370da292a65e7d67cdf641711791422b8a407b647b630ad497ffb9908683479e6cfb6 --- depends/packages/bdb.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/depends/packages/bdb.mk b/depends/packages/bdb.mk index b69276cb15..980f9ccdc1 100644 --- a/depends/packages/bdb.mk +++ b/depends/packages/bdb.mk @@ -16,6 +16,9 @@ $(package)_config_opts_openbsd=--with-pic $(package)_config_opts_android=--with-pic $(package)_cflags+=-Wno-error=implicit-function-declaration -Wno-error=format-security $(package)_cxxflags+=-std=c++17 +$(package)_cppflags_freebsd=-D_XOPEN_SOURCE=600 +$(package)_cppflags_netbsd=-D_XOPEN_SOURCE=600 +$(package)_cppflags_openbsd=-D_XOPEN_SOURCE=600 $(package)_cppflags_mingw32=-DUNICODE -D_UNICODE endef From f0a53c99e9b23bbe8c7665d4f40eafb5f7b46330 Mon Sep 17 00:00:00 2001 From: merge-script <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 8 Feb 2023 16:37:09 +0100 Subject: [PATCH 09/18] Merge bitcoin/bitcoin#26994: depends: define `__BSD_VISIBLE` for FreeBSD bdb build 0e02f725482dd30b9f03903074a481af1164411d depends: define `__BSD_VISIBLE` for FreeBSD bdb build (fanquake) Pull request description: Required for additional definitions (`IPC_R` & friends), to be available, when compiling under C11, which would otherwise cause compile fails. See: https://github.com/MarcoFalke/btc_nightly/pull/4. ACKs for top commit: hebasto: ACK 0e02f725482dd30b9f03903074a481af1164411d, tested on FreeBSD 13.1: Tree-SHA512: 885d4aa341d9668da360cf6dfafb97ce816803c54e76c0a06e448db39a723666d42cd14b3e713d17ecbe33163f5af69924567cf449d679a2db95b36357005d43 --- depends/packages/bdb.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/bdb.mk b/depends/packages/bdb.mk index 980f9ccdc1..6945c5416e 100644 --- a/depends/packages/bdb.mk +++ b/depends/packages/bdb.mk @@ -16,7 +16,7 @@ $(package)_config_opts_openbsd=--with-pic $(package)_config_opts_android=--with-pic $(package)_cflags+=-Wno-error=implicit-function-declaration -Wno-error=format-security $(package)_cxxflags+=-std=c++17 -$(package)_cppflags_freebsd=-D_XOPEN_SOURCE=600 +$(package)_cppflags_freebsd=-D_XOPEN_SOURCE=600 -D__BSD_VISIBLE=1 $(package)_cppflags_netbsd=-D_XOPEN_SOURCE=600 $(package)_cppflags_openbsd=-D_XOPEN_SOURCE=600 $(package)_cppflags_mingw32=-DUNICODE -D_UNICODE From 482e5bbc49a82ba16ca4c3e19a6c4aaf4ff056bb Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 17 Apr 2023 16:04:23 +0100 Subject: [PATCH 10/18] Merge bitcoin/bitcoin#27462: depends: fix compiling bdb with clang-16 on aarch64 f8b8458276983f8fc1e2a47c4d00c1e30633067d depends: fix compiling bdb with clang-16 on aarch64 (fanquake) Pull request description: Compiling bdb with clang-16 on aarch64 (hardware) currently fails: ```bash make -C depends/ bdb CC=clang CXX=clang++ ... checking for mutexes... UNIX/fcntl configure: WARNING: NO SHARED LATCH IMPLEMENTATION FOUND FOR THIS PLATFORM. configure: error: Unable to find a mutex implementation ``` Looking at config.log we've got: ```bash configure:18704: checking for mutexes configure:18815: clang -o conftest -pipe -std=c11 -O2 -Wno-error=implicit-function-declaration -Wno-error=format-security -I/bitcoin/depends/aarch64-unknown-linux-gnu/include -D_GNU_SOURCE -D_REENTRANT -L/bitcoin/depends/aarch64-unknown-linux-gnu/lib conftest.c -lpthread >&5 conftest.c:45:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] main() { ^ int conftest.c:50:2: warning: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] exit ( ^ conftest.c:50:2: note: include the header or explicitly provide a declaration for 'exit' 1 warning and 1 error generated. ``` Clang-16 changed `-Wimplicit-function-declaration` and `-Wimplicit-int` warnings into errors, see: https://releases.llvm.org/16.0.0/tools/clang/docs/ReleaseNotes.html#potentially-breaking-changes. > The -Wimplicit-function-declaration and -Wimplicit-int warnings now > default to an error in C99, C11, and C17. As of C2x, support for implicit > function declarations and implicit int has been removed, and the > warning options will have no effect. Specifying -Wimplicit-int in > C89 mode will now issue warnings instead of being a noop. ACKs for top commit: hebasto: ACK f8b8458276983f8fc1e2a47c4d00c1e30633067d, tested on Ubuntu Lunar (`aarch64`) with: Tree-SHA512: 5ca078b1c00915446e9f0f2ecaa4342295a2097996554345753315d1c81c23000c57be14e1ac5506a87820f5114aba748456f2c2b6426b0810504d62d761a787 --- depends/packages/bdb.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/bdb.mk b/depends/packages/bdb.mk index 6945c5416e..bae926f0d7 100644 --- a/depends/packages/bdb.mk +++ b/depends/packages/bdb.mk @@ -14,7 +14,7 @@ $(package)_config_opts_freebsd=--with-pic $(package)_config_opts_netbsd=--with-pic $(package)_config_opts_openbsd=--with-pic $(package)_config_opts_android=--with-pic -$(package)_cflags+=-Wno-error=implicit-function-declaration -Wno-error=format-security +$(package)_cflags+=-Wno-error=implicit-function-declaration -Wno-error=format-security -Wno-error=implicit-int $(package)_cxxflags+=-std=c++17 $(package)_cppflags_freebsd=-D_XOPEN_SOURCE=600 -D__BSD_VISIBLE=1 $(package)_cppflags_netbsd=-D_XOPEN_SOURCE=600 From d725c5880d1ebb573b3fa72235ff0a5e1657f194 Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 27 Mar 2023 11:44:42 +0100 Subject: [PATCH 11/18] Merge bitcoin/bitcoin#27312: depends: qrencode 4.1.1 eb1c3adf38cb71c3e6f298a61871738c4919b4a1 depends: qrencode 4.1.1 (fanquake) Pull request description: Upgrade to the latest qrencode, and disable some warnings that cause compile failures with newer compilers (clang-15+). I haven't tested this (from a GUI perspective) at all. This is just "good enough" to keep things compiling, and uses some similar work-arounds as we have with other older packages, i.e bdb. Note that upstream, libqrencode is effectively unmaintained. No code changes for > 2 years. No responses to issues/PRs. Seems like the author has mostly dropped off of GitHub as well. This fixes part of #27299. ACKs for top commit: TheCharlatan: Code review ACK eb1c3adf38cb71c3e6f298a61871738c4919b4a1 Tree-SHA512: 898eaac3e9915dfcdc0a011b736fff685a3b46990bd27f6038ef4d3e7cb6a276206438ea50d45908a051ce55c9b0779347d4be1d35271b67f76f409a7dc21fed --- depends/packages/qrencode.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/depends/packages/qrencode.mk b/depends/packages/qrencode.mk index d1687883bc..2afd95d7c4 100644 --- a/depends/packages/qrencode.mk +++ b/depends/packages/qrencode.mk @@ -1,15 +1,16 @@ package=qrencode -$(package)_version=3.4.4 +$(package)_version=4.1.1 $(package)_download_path=https://fukuchi.org/works/qrencode/ $(package)_file_name=$(package)-$($(package)_version).tar.bz2 -$(package)_sha256_hash=efe5188b1ddbcbf98763b819b146be6a90481aac30cfc8d858ab78a19cde1fa5 +$(package)_sha256_hash=e455d9732f8041cf5b9c388e345a641fd15707860f928e94507b1961256a6923 define $(package)_set_vars -$(package)_config_opts=--disable-shared --without-tools --without-tests --disable-sdltest +$(package)_config_opts=--disable-shared --without-tools --without-tests --without-png $(package)_config_opts += --disable-gprof --disable-gcov --disable-mudflap $(package)_config_opts += --disable-dependency-tracking --enable-option-checking $(package)_config_opts_linux=--with-pic $(package)_config_opts_android=--with-pic +$(package)_cflags += -Wno-int-conversion -Wno-implicit-function-declaration endef define $(package)_preprocess_cmds From 25a594f46e80851fd68f8c825320ada3db63bd04 Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Tue, 24 Jan 2023 13:33:48 -0500 Subject: [PATCH 12/18] Merge bitcoin/bitcoin#25987: build: compile depends sqlite with more recommended options dee690257c7948510a0661e23c9e398a13e20659 build: pass --enable-debug to sqlite when DEBUG=1 (fanquake) 807b61fcca6d301286ae43d00f88d986a985ea38 build: use more recommended sqlite3 compile options (fanquake) Pull request description: https://www.sqlite.org/compile.html [SQLITE_DQS](https://www.sqlite.org/compile.html#dqs) > This setting disables the double-quoted string literal misfeature. [SQLITE_DEFAULT_MEMSTATUS](https://www.sqlite.org/compile.html#default_memstatus) > This setting causes the sqlite3_status() interfaces that track > memory usage to be disabled. > This helps the sqlite3_malloc() routines run much faster, and since > SQLite uses sqlite3_malloc() internally, this helps to make the > entire library faster. [SQLITE_OMIT_DEPRECATED](https://www.sqlite.org/compile.html#omit_deprecated) > Omitting deprecated interfaces and features will not help SQLite > to run any faster. > It will reduce the library footprint, however. And it is the > right thing to do. [SQLITE_OMIT_SHARED_CACHE](https://www.sqlite.org/compile.html#omit_shared_cache) > Omitting the possibility of using shared cache allows many > conditionals in performance-critical sections of the code to be > eliminated. This can give a noticeable improvement in performance. Also: https://www.sqlite.org/sharedcache.html > Shared-cache mode is an obsolete feature. > The use of shared-cache mode is discouraged. > Most use cases for shared-cache are better served by WAL mode. > Applications that build their own copy of SQLite from source code > are encouraged to use the -DSQLITE_OMIT_SHARED_CACHE compile-time > option, as the resulting binary will be both smaller and faster. [SQLITE_OMIT_JSON](https://www.sqlite.org/compile.html#omit_json) > Starting with sqlite 3.38.0 the JSON extension became opt-out rather than opt-in, so we disable it here. --disable-rtree > An R-Tree is a special index that is designed for doing range queries. > R-Trees are most commonly used in geospatial systems... https://www.sqlite.org/rtree.html --disable-fts4 --disable-fts5 > FTS5 is an SQLite virtual table module that provides full-text > search functionality to database applications. DSQLITE_LIKE_DOESNT_MATCH_BLOBS > simplifies the implementation of the LIKE optimization and allows > queries that use the LIKE optimization to run faster. DSQLITE_OMIT_DECLTYPE > By omitting the (seldom-needed) ability to return the declared type of > columns from the result set of query, prepared statements can be made > to consume less memory. DSQLITE_OMIT_PROGRESS_CALLBACK > By omitting this interface, a single conditional is removed from the > inner loop of the bytecode engine, helping SQL statements to run slightly > faster. DSQLITE_OMIT_AUTOINIT > with the SQLITE_OMIT_AUTOINIT option, the automatic initialization is omitted. > This helps many API calls to run a little faster > it also means that the application must call sqlite3_initialize() manually. On my Linux box this results in a `libsqlite3.a` that shrinks from ~1.7mb to ~1.3mb. On macOS, `libsqlite3.a` shrinks from ~2.2mb to ~1.3mb. Guix Build: ```bash 04626ec7b64086103bfb5537397d7953d0699b31da1b1bc100003c7d30991fdf guix-build-dee690257c79/output/aarch64-linux-gnu/SHA256SUMS.part a77c72052266788e890a0d3d89cc6eee9dd72db6a1b6fdc8aab882b35a315284 guix-build-dee690257c79/output/aarch64-linux-gnu/bitcoin-dee690257c79-aarch64-linux-gnu-debug.tar.gz 86d782f185ee0fae8e8733ab8a511de2ca2500f02eb3d4aaa20d65b4434dcd77 guix-build-dee690257c79/output/aarch64-linux-gnu/bitcoin-dee690257c79-aarch64-linux-gnu.tar.gz d81874ecd378470b01a429f2a4be07fcb4824b56ace146226b77088cc3c41baa guix-build-dee690257c79/output/arm-linux-gnueabihf/SHA256SUMS.part 8f24076800e5a19ac9005af8c6e4987b32e0a857a83af84931958505228ef58d guix-build-dee690257c79/output/arm-linux-gnueabihf/bitcoin-dee690257c79-arm-linux-gnueabihf-debug.tar.gz b913f2b0d8f0e32a176bc0e9330106cf1973afe6e8ee955f3eeb89918ab9d565 guix-build-dee690257c79/output/arm-linux-gnueabihf/bitcoin-dee690257c79-arm-linux-gnueabihf.tar.gz 034b47d8a60a19391e0e18f6fcc8fb3a87be78a9707e3ac3e7ee45eb37687bb7 guix-build-dee690257c79/output/arm64-apple-darwin/SHA256SUMS.part 9efc5c0ceac05f6efce03fcde0cbe8b79bae43fe0d98aecb817908e76f5c39b7 guix-build-dee690257c79/output/arm64-apple-darwin/bitcoin-dee690257c79-arm64-apple-darwin-unsigned.dmg a549cdcbd311d9b025971b13987290f6cd2b93e16c8389e8a7a2ccd3608326ed guix-build-dee690257c79/output/arm64-apple-darwin/bitcoin-dee690257c79-arm64-apple-darwin-unsigned.tar.gz 3dd9e26a41596151022aa4288d778dc335a2b38bd391e3f65c0575dd6eb47b54 guix-build-dee690257c79/output/arm64-apple-darwin/bitcoin-dee690257c79-arm64-apple-darwin.tar.gz a71685a3ff62fbf456fc1d3c0f78ab7ab1d5a4a094c1f43d3829730d65a3ec51 guix-build-dee690257c79/output/dist-archive/bitcoin-dee690257c79.tar.gz d5c74167b2260b7de72fdbac77eedacbbb929214e279e07f41c3236ea20116b6 guix-build-dee690257c79/output/powerpc64-linux-gnu/SHA256SUMS.part 03c043daa971f70886805c9e4174acd600e5cda03ae0e827043c4df81a6a6426 guix-build-dee690257c79/output/powerpc64-linux-gnu/bitcoin-dee690257c79-powerpc64-linux-gnu-debug.tar.gz 3884423f67d48f671a90169962f9568dcbd8df582cd269df29a4399dc9c70e99 guix-build-dee690257c79/output/powerpc64-linux-gnu/bitcoin-dee690257c79-powerpc64-linux-gnu.tar.gz cee2847d4feeadebfdf4d37110faafa250824c68cfefc3bfa289ae8b09599a20 guix-build-dee690257c79/output/powerpc64le-linux-gnu/SHA256SUMS.part ca9f1085184b50e7bd377b68a58afd42ac4055ffe214eede8c6ca7291e00b45a guix-build-dee690257c79/output/powerpc64le-linux-gnu/bitcoin-dee690257c79-powerpc64le-linux-gnu-debug.tar.gz b9cadff5b30244f6cb4f277e1ac610841332cb0d732637fe438fd51c88adf5a4 guix-build-dee690257c79/output/powerpc64le-linux-gnu/bitcoin-dee690257c79-powerpc64le-linux-gnu.tar.gz db6e45d9fc8868e5cb25fa3d0789247db10a6bab2a6f3866a27d641ae00bd03b guix-build-dee690257c79/output/riscv64-linux-gnu/SHA256SUMS.part 751e90c0aefa249f175c0c1707dc5eee3637e2b9657a9ee1b2068479e9830ff0 guix-build-dee690257c79/output/riscv64-linux-gnu/bitcoin-dee690257c79-riscv64-linux-gnu-debug.tar.gz 8dd87bb24f1fbdba67fb6b72ab5fc93532452eada8c2942463100b8ed8118ae3 guix-build-dee690257c79/output/riscv64-linux-gnu/bitcoin-dee690257c79-riscv64-linux-gnu.tar.gz b53fe650f431e394a5af6bd809401551e3c36e4f7d90c31f39f51c5fe236efaf guix-build-dee690257c79/output/x86_64-apple-darwin/SHA256SUMS.part b35b4ae345a625e42b8315acd9b75bb651f60265f67ec6f7d78a41c8d21c635e guix-build-dee690257c79/output/x86_64-apple-darwin/bitcoin-dee690257c79-x86_64-apple-darwin-unsigned.dmg 6748e4c64ae069632624cbec20de7f03eca1a7578fcef96607f3e8cb0ac4106e guix-build-dee690257c79/output/x86_64-apple-darwin/bitcoin-dee690257c79-x86_64-apple-darwin-unsigned.tar.gz 6415cbecfa18002a1e4865b996268558b4f26121118fd73b0ef4ca44967f34c7 guix-build-dee690257c79/output/x86_64-apple-darwin/bitcoin-dee690257c79-x86_64-apple-darwin.tar.gz f0a8d8837e80e42b5d77c3efc9d746c11ffc9909aece16dcba0a10726e1be7e0 guix-build-dee690257c79/output/x86_64-linux-gnu/SHA256SUMS.part 418f4607159387ee17657120beda1c741fa6060e4457b304b857aa6c33859e6a guix-build-dee690257c79/output/x86_64-linux-gnu/bitcoin-dee690257c79-x86_64-linux-gnu-debug.tar.gz d384fe8f2d6515c256a371ad84ae76ac9727ffd49887c0e22bb5ada4cd890092 guix-build-dee690257c79/output/x86_64-linux-gnu/bitcoin-dee690257c79-x86_64-linux-gnu.tar.gz 3f441eb2d68ddd530b32f56a16ff639b27dcc58b5ba395e40f4c2be805f6cd8b guix-build-dee690257c79/output/x86_64-w64-mingw32/SHA256SUMS.part d3d22479adc554ced965c4bde79f4c919e6b216acfca598fac4ebfc3b0e2d39d guix-build-dee690257c79/output/x86_64-w64-mingw32/bitcoin-dee690257c79-win64-debug.zip 89de153f5d839df6cd1266f8b3cb3ad455b2f6c43cee7644889da1e3efc7b2f1 guix-build-dee690257c79/output/x86_64-w64-mingw32/bitcoin-dee690257c79-win64-setup-unsigned.exe ba30708b9551b3794e4d2726aff27775dd4f1b347ea71b3fe1b00e39e8b7a594 guix-build-dee690257c79/output/x86_64-w64-mingw32/bitcoin-dee690257c79-win64-unsigned.tar.gz ab6a2b7a3e899fc58030a44b555e449d64aa69b5215d761bc550946b14f93515 guix-build-dee690257c79/output/x86_64-w64-mingw32/bitcoin-dee690257c79-win64.zip ``` ACKs for top commit: Sjors: tACK dee690257c7948510a0661e23c9e398a13e20659 achow101: ACK dee690257c7948510a0661e23c9e398a13e20659 hebasto: ACK dee690257c7948510a0661e23c9e398a13e20659, I have reviewed the code and it looks OK. Tree-SHA512: e0605f049404905db94ea61473b2b68df008ceb86b9a09d8562ca3acc1f3a3be3893149fc62d189a6fbf24cfc76c393f2d1a1215292e9ae5dc4afc199e876821 --- depends/packages/sqlite.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/depends/packages/sqlite.mk b/depends/packages/sqlite.mk index 820d724214..c8f3555ab2 100644 --- a/depends/packages/sqlite.mk +++ b/depends/packages/sqlite.mk @@ -6,10 +6,15 @@ $(package)_sha256_hash=5af07de982ba658fd91a03170c945f99c971f6955bc79df3266544373 define $(package)_set_vars $(package)_config_opts=--disable-shared --disable-readline --disable-dynamic-extensions --enable-option-checking +$(package)_config_opts+= --disable-rtree --disable-fts4 --disable-fts5 $(package)_config_opts_linux=--with-pic $(package)_config_opts_freebsd=--with-pic $(package)_config_opts_netbsd=--with-pic $(package)_config_opts_openbsd=--with-pic +$(package)_config_opts_debug=--enable-debug +$(package)_cflags=-DSQLITE_DQS=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_OMIT_DEPRECATED +$(package)_cflags+=-DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_JSON -DSQLITE_LIKE_DOESNT_MATCH_BLOBS +$(package)_cflags+=-DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_AUTOINIT endef define $(package)_preprocess_cmds From f50fb6e627bdd58821944c9637638dfaa9ff81a5 Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Mon, 30 Jan 2023 17:17:20 -0500 Subject: [PATCH 13/18] Merge bitcoin/bitcoin#26998: depends: ensure we are appending to sqlite cflags 56a03f1834a7437e3357923a1e45e512c9b2e6fc depends: ensure we are appending to sqlite cflags (fanquake) Pull request description: Otherwise we'll just override other flags passed in (i.e msan). Should fix https://cirrus-ci.com/task/6598922274078720?logs=ci#L3661. ACKs for top commit: achow101: ACK 56a03f1834a7437e3357923a1e45e512c9b2e6fc TheCharlatan: ACK 56a03f1834a7437e3357923a1e45e512c9b2e6fc Tree-SHA512: 5890018cfc5deaef18b0f01a3a0396f803e97f9a9785bf6873ef48bc13b74b644315f0f29cf11d3522964a6396f74e1f080bb4e412bc302956a651fed28b27df --- depends/packages/sqlite.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/sqlite.mk b/depends/packages/sqlite.mk index c8f3555ab2..a8ec89c6c6 100644 --- a/depends/packages/sqlite.mk +++ b/depends/packages/sqlite.mk @@ -12,7 +12,7 @@ $(package)_config_opts_freebsd=--with-pic $(package)_config_opts_netbsd=--with-pic $(package)_config_opts_openbsd=--with-pic $(package)_config_opts_debug=--enable-debug -$(package)_cflags=-DSQLITE_DQS=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_OMIT_DEPRECATED +$(package)_cflags+=-DSQLITE_DQS=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_OMIT_DEPRECATED $(package)_cflags+=-DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_JSON -DSQLITE_LIKE_DOESNT_MATCH_BLOBS $(package)_cflags+=-DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_AUTOINIT endef From 1b88674815ef958c3a407849e3f247c9f3c5d242 Mon Sep 17 00:00:00 2001 From: fanquake Date: Thu, 25 Jan 2024 15:43:38 +0000 Subject: [PATCH 14/18] Merge bitcoin/bitcoin#29287: depends: Do not override `CFLAGS` when building SQLite with `DEBUG=1` 5fb8f0f80fc41cc636da56864195244d8fd9116e depends: Do not override CFLAGS when building SQLite with DEBUG=1 (Hennadii Stepanov) 2b0dd88f1ce9084324dc54db578fade9c926fd71 depends: Ensure definitions are passed when building SQLite with DEBUG=1 (Hennadii Stepanov) Pull request description: The `--enable-debug` configure option for the SQLite package does two things: ```autoconf #----------------------------------------------------------------------- # --enable-debug # AC_ARG_ENABLE(debug, [AS_HELP_STRING( [--enable-debug], [build with debugging features enabled [default=no]])], [], []) AC_MSG_CHECKING([Build type]) if test x"$enable_debug" = "xyes"; then BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_DEBUG -DSQLITE_ENABLE_SELECTTRACE -DSQLITE_ENABLE_WHERETRACE" CFLAGS="-g -O0" AC_MSG_RESULT([debug]) else AC_MSG_RESULT([release]) fi #----------------------------------------------------------------------- ``` It adds three preprocessor definitions and overrides `CFLAGS` with `"-g -O0"`. The latter breaks the user's ability to provide sanitizer and LTO flags. This PR might be especially useful for OSS-Fuzz where `DEBUG=1` has been used since https://github.com/google/oss-fuzz/pull/10503. Also it makes a workaround for building SQLite for 32-bit unneeded. For details, please refer to https://github.com/hebasto/oss-fuzz/tree/240120-sqlite. Changes in https://github.com/bitcoin/bitcoin/pull/29282 might not be strictly required now. However, I consider them an improvement. ACKs for top commit: fanquake: ACK 5fb8f0f80fc41cc636da56864195244d8fd9116e - downstream is also green, so i'll fixup the PR there. Tree-SHA512: 8593d8a0237ebb270d5da763fb65ed642ab8ed0d44e57704a34154621f49e3d5c58b462cc0070251fa1ba556c58a3c7d3620530d6839dc6dc9e0887010330eca --- depends/packages/sqlite.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/depends/packages/sqlite.mk b/depends/packages/sqlite.mk index a8ec89c6c6..6809b39113 100644 --- a/depends/packages/sqlite.mk +++ b/depends/packages/sqlite.mk @@ -11,10 +11,12 @@ $(package)_config_opts_linux=--with-pic $(package)_config_opts_freebsd=--with-pic $(package)_config_opts_netbsd=--with-pic $(package)_config_opts_openbsd=--with-pic -$(package)_config_opts_debug=--enable-debug -$(package)_cflags+=-DSQLITE_DQS=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_OMIT_DEPRECATED -$(package)_cflags+=-DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_JSON -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -$(package)_cflags+=-DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_AUTOINIT +# We avoid using `--enable-debug` because it overrides CFLAGS, a behavior we want to prevent. +$(package)_cflags_debug += -g +$(package)_cppflags_debug += -DSQLITE_DEBUG +$(package)_cppflags+=-DSQLITE_DQS=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_OMIT_DEPRECATED +$(package)_cppflags+=-DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_JSON -DSQLITE_LIKE_DOESNT_MATCH_BLOBS +$(package)_cppflags+=-DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_AUTOINIT endef define $(package)_preprocess_cmds From cd33b69bfdee7d52ea9c291e471ab6f7cd4bfc75 Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 25 Mar 2024 10:49:11 +0000 Subject: [PATCH 15/18] Merge bitcoin/bitcoin#29488: depends: always configure with `--with-pic` e037c4fe0914d8fa9149ce7532c0d70f738e79e9 depends: always configure with --with-pic (fanquake) Pull request description: We currently do this sporadically. Not only amongst packages, but across OS's, i.e sometimes it's done for BSDs/Android, and sometimes not. Configure with `--with-pic` globally instead. I think this generally makes more sense, and should not have any downsides. See related discussion in https://github.com/bitcoin/bitcoin/pull/28846#discussion_r1399123100. ACKs for top commit: hebasto: ACK e037c4fe0914d8fa9149ce7532c0d70f738e79e9. Tree-SHA512: efc743ff92f9f99f3ac16514e98363ad395c6f956cd4be7e785b5c573685baf7fcd68c51d6a705ee8761fc676eb045b7e61676595be0eb0f70f34e99174cddc0 --- depends/funcs.mk | 2 +- depends/packages.md | 3 +++ depends/packages/bdb.mk | 5 ----- depends/packages/expat.mk | 1 - depends/packages/freetype.mk | 1 - depends/packages/libXau.mk | 1 - depends/packages/libevent.mk | 5 ----- depends/packages/libxcb_util.mk | 1 - depends/packages/qrencode.mk | 2 -- depends/packages/sqlite.mk | 4 ---- depends/packages/zeromq.mk | 5 ----- 11 files changed, 4 insertions(+), 26 deletions(-) diff --git a/depends/funcs.mk b/depends/funcs.mk index 87052bf6e0..14450150c2 100644 --- a/depends/funcs.mk +++ b/depends/funcs.mk @@ -146,7 +146,7 @@ $(1)_stage_env+=PATH=$(build_prefix)/bin:$(PATH) # config.guess, which is what we set it too here. This also quells autoconf # warnings, "If you wanted to set the --build type, don't use --host.", # when using versions older than 2.70. -$(1)_autoconf=./configure --build=$(BUILD) --host=$($($(1)_type)_host) --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)" +$(1)_autoconf=./configure --build=$(BUILD) --host=$($($(1)_type)_host) --prefix=$($($(1)_type)_prefix) --with-pic $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)" ifneq ($($(1)_nm),) $(1)_autoconf += NM="$$($(1)_nm)" endif diff --git a/depends/packages.md b/depends/packages.md index 4158b46d28..6d09f8c97b 100644 --- a/depends/packages.md +++ b/depends/packages.md @@ -163,6 +163,9 @@ From the [Gentoo Wiki entry](https://wiki.gentoo.org/wiki/Project:Quality_Assura > creates. This leads to massive overlinking, which is toxic to the Gentoo > ecosystem, as it leads to a massive number of unnecessary rebuilds. +Where possible, packages are built with Position Independant Code. Either using +the autotools `--with-pic` flag, or `DCMAKE_POSITION_INDEPENDENT_CODE` with CMake. + ## Secondary dependencies: Secondary dependency packages relative to the bitcoin binaries/libraries (i.e. diff --git a/depends/packages/bdb.mk b/depends/packages/bdb.mk index bae926f0d7..6a8de39221 100644 --- a/depends/packages/bdb.mk +++ b/depends/packages/bdb.mk @@ -9,11 +9,6 @@ $(package)_patches=clang_cxx_11.patch define $(package)_set_vars $(package)_config_opts=--disable-shared --enable-cxx --disable-replication --enable-option-checking $(package)_config_opts_mingw32=--enable-mingw -$(package)_config_opts_linux=--with-pic -$(package)_config_opts_freebsd=--with-pic -$(package)_config_opts_netbsd=--with-pic -$(package)_config_opts_openbsd=--with-pic -$(package)_config_opts_android=--with-pic $(package)_cflags+=-Wno-error=implicit-function-declaration -Wno-error=format-security -Wno-error=implicit-int $(package)_cxxflags+=-std=c++17 $(package)_cppflags_freebsd=-D_XOPEN_SOURCE=600 -D__BSD_VISIBLE=1 diff --git a/depends/packages/expat.mk b/depends/packages/expat.mk index bb203d06f8..2db283ef3c 100644 --- a/depends/packages/expat.mk +++ b/depends/packages/expat.mk @@ -11,7 +11,6 @@ define $(package)_set_vars $(package)_config_opts=--disable-shared --without-docbook --without-tests --without-examples $(package)_config_opts += --disable-dependency-tracking --enable-option-checking $(package)_config_opts += --without-xmlwf - $(package)_config_opts_linux=--with-pic $(package)_cppflags += -D_DEFAULT_SOURCE endef diff --git a/depends/packages/freetype.mk b/depends/packages/freetype.mk index 6f5dbe0f01..c28259ed67 100644 --- a/depends/packages/freetype.mk +++ b/depends/packages/freetype.mk @@ -7,7 +7,6 @@ $(package)_sha256_hash=8bee39bd3968c4804b70614a0a3ad597299ad0e824bc8aad5ce8aaf48 define $(package)_set_vars $(package)_config_opts=--without-zlib --without-png --without-harfbuzz --without-bzip2 --disable-static $(package)_config_opts += --enable-option-checking --without-brotli - $(package)_config_opts_linux=--with-pic endef define $(package)_config_cmds diff --git a/depends/packages/libXau.mk b/depends/packages/libXau.mk index b7e032c0b2..aeb14dcd6e 100644 --- a/depends/packages/libXau.mk +++ b/depends/packages/libXau.mk @@ -10,7 +10,6 @@ $(package)_dependencies=xproto define $(package)_set_vars $(package)_config_opts=--disable-shared --disable-lint-library --without-lint $(package)_config_opts += --disable-dependency-tracking --enable-option-checking - $(package)_config_opts_linux=--with-pic endef define $(package)_preprocess_cmds diff --git a/depends/packages/libevent.mk b/depends/packages/libevent.mk index 5bd12522a7..f033fc9723 100644 --- a/depends/packages/libevent.mk +++ b/depends/packages/libevent.mk @@ -11,11 +11,6 @@ define $(package)_set_vars $(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress --disable-samples $(package)_config_opts += --disable-dependency-tracking --enable-option-checking $(package)_config_opts_release=--disable-debug-mode - $(package)_config_opts_linux=--with-pic - $(package)_config_opts_freebsd=--with-pic - $(package)_config_opts_netbsd=--with-pic - $(package)_config_opts_openbsd=--with-pic - $(package)_config_opts_android=--with-pic $(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0601 endef diff --git a/depends/packages/libxcb_util.mk b/depends/packages/libxcb_util.mk index 6f1b9cd7c6..6e4c7359b2 100644 --- a/depends/packages/libxcb_util.mk +++ b/depends/packages/libxcb_util.mk @@ -8,7 +8,6 @@ $(package)_dependencies=libxcb define $(package)_set_vars $(package)_config_opts = --disable-shared --disable-devel-docs --without-doxygen $(package)_config_opts += --disable-dependency-tracking --enable-option-checking -$(package)_config_opts += --with-pic endef define $(package)_preprocess_cmds diff --git a/depends/packages/qrencode.mk b/depends/packages/qrencode.mk index 2afd95d7c4..9ebd2dd85a 100644 --- a/depends/packages/qrencode.mk +++ b/depends/packages/qrencode.mk @@ -8,8 +8,6 @@ define $(package)_set_vars $(package)_config_opts=--disable-shared --without-tools --without-tests --without-png $(package)_config_opts += --disable-gprof --disable-gcov --disable-mudflap $(package)_config_opts += --disable-dependency-tracking --enable-option-checking -$(package)_config_opts_linux=--with-pic -$(package)_config_opts_android=--with-pic $(package)_cflags += -Wno-int-conversion -Wno-implicit-function-declaration endef diff --git a/depends/packages/sqlite.mk b/depends/packages/sqlite.mk index 6809b39113..7d175ec4bb 100644 --- a/depends/packages/sqlite.mk +++ b/depends/packages/sqlite.mk @@ -7,10 +7,6 @@ $(package)_sha256_hash=5af07de982ba658fd91a03170c945f99c971f6955bc79df3266544373 define $(package)_set_vars $(package)_config_opts=--disable-shared --disable-readline --disable-dynamic-extensions --enable-option-checking $(package)_config_opts+= --disable-rtree --disable-fts4 --disable-fts5 -$(package)_config_opts_linux=--with-pic -$(package)_config_opts_freebsd=--with-pic -$(package)_config_opts_netbsd=--with-pic -$(package)_config_opts_openbsd=--with-pic # We avoid using `--enable-debug` because it overrides CFLAGS, a behavior we want to prevent. $(package)_cflags_debug += -g $(package)_cppflags_debug += -DSQLITE_DEBUG diff --git a/depends/packages/zeromq.mk b/depends/packages/zeromq.mk index c74ae15b31..8d83354368 100644 --- a/depends/packages/zeromq.mk +++ b/depends/packages/zeromq.mk @@ -11,11 +11,6 @@ define $(package)_set_vars $(package)_config_opts += --without-libsodium --without-libgssapi_krb5 --without-pgm --without-norm --without-vmci $(package)_config_opts += --disable-libunwind --disable-radix-tree --without-gcov --disable-dependency-tracking $(package)_config_opts += --disable-Werror --disable-drafts --enable-option-checking - $(package)_config_opts_linux=--with-pic - $(package)_config_opts_freebsd=--with-pic - $(package)_config_opts_netbsd=--with-pic - $(package)_config_opts_openbsd=--with-pic - $(package)_config_opts_android=--with-pic $(package)_cxxflags+=-std=c++17 endef From 0e6cb989a70a505539122fbc0a7c6d79d60632ca Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 7 Feb 2023 12:00:05 +0000 Subject: [PATCH 16/18] Merge bitcoin/bitcoin#26421: build: copy config.{guess,sub} post autogen in zmq package 1914e470e327091c625f627b4447beb336f7fe5a build: copy config.{guess,sub} post autogen in zmq package (fanquake) Pull request description: Otherwise our config.guess and config.sub will be copied over. This problem has been masked by the fact that modern systems ship with versions that recognise all the triplets we use (namely arm64-apple-darwin). However building on ubuntu 20.04 surfaces the issue. Fixes #26420. ACKs for top commit: hebasto: ACK 1914e470e327091c625f627b4447beb336f7fe5a, tested on Ubuntu 18.04. Tree-SHA512: dff64c3c62d9f8fc205e5a4dffe8befd58838418d073a15dfe304a0f64b182dfffd9dcf98b53df44bfab905c12a62d03cd5c0f91fa7c4b246ac21ae5f20540fd --- depends/packages/zeromq.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/depends/packages/zeromq.mk b/depends/packages/zeromq.mk index 8d83354368..d24914baa7 100644 --- a/depends/packages/zeromq.mk +++ b/depends/packages/zeromq.mk @@ -16,12 +16,12 @@ endef define $(package)_preprocess_cmds patch -p1 < $($(package)_patch_dir)/remove_libstd_link.patch && \ - patch -p1 < $($(package)_patch_dir)/netbsd_kevent_void.patch && \ - cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub config + patch -p1 < $($(package)_patch_dir)/netbsd_kevent_void.patch endef define $(package)_config_cmds ./autogen.sh && \ + cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub config && \ $($(package)_autoconf) endef From 4b704a60ad31913f5d6f1ed5f8b735204bf6ab6c Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 24 Oct 2023 22:04:38 +0100 Subject: [PATCH 17/18] Merge bitcoin/bitcoin#28627: depends: zeromq 4.3.5 986d7fed057b995a720787cbbd21e1c41763fb83 depends: zeromq 4.3.5 (fanquake) Pull request description: First new point release of zeromq in two and a half years. Mostly bug fixes; the project also completed a relicense to the "Mozilla Public License". See https://github.com/zeromq/libzmq/releases/tag/v4.3.5. ACKs for top commit: hebasto: ACK 986d7fed057b995a720787cbbd21e1c41763fb83, I have reviewed the code and it looks OK. TheCharlatan: ACK 986d7fed057b995a720787cbbd21e1c41763fb83 Tree-SHA512: cdd6abfbbe10873c1ca267fed648c2e6ff17a4aff50c414924006e63fa39d501e803f8893a5cd966a2078b5c077f2578e482483e6723ea6f5760f16211d40998 --- depends/packages/zeromq.mk | 9 ++- .../patches/zeromq/netbsd_kevent_void.patch | 57 ------------------- 2 files changed, 4 insertions(+), 62 deletions(-) delete mode 100644 depends/patches/zeromq/netbsd_kevent_void.patch diff --git a/depends/packages/zeromq.mk b/depends/packages/zeromq.mk index d24914baa7..82119f866a 100644 --- a/depends/packages/zeromq.mk +++ b/depends/packages/zeromq.mk @@ -1,9 +1,9 @@ package=zeromq -$(package)_version=4.3.4 +$(package)_version=4.3.5 $(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/ $(package)_file_name=$(package)-$($(package)_version).tar.gz -$(package)_sha256_hash=c593001a89f5a85dd2ddf564805deb860e02471171b3f204944857336295c3e5 -$(package)_patches=remove_libstd_link.patch netbsd_kevent_void.patch +$(package)_sha256_hash=6653ef5910f17954861fe72332e68b03ca6e4d9c7160eb3a8de5a5a913bfab43 +$(package)_patches=remove_libstd_link.patch define $(package)_set_vars $(package)_config_opts = --without-docs --disable-shared --disable-valgrind @@ -15,8 +15,7 @@ define $(package)_set_vars endef define $(package)_preprocess_cmds - patch -p1 < $($(package)_patch_dir)/remove_libstd_link.patch && \ - patch -p1 < $($(package)_patch_dir)/netbsd_kevent_void.patch + patch -p1 < $($(package)_patch_dir)/remove_libstd_link.patch endef define $(package)_config_cmds diff --git a/depends/patches/zeromq/netbsd_kevent_void.patch b/depends/patches/zeromq/netbsd_kevent_void.patch deleted file mode 100644 index 845c6bdda6..0000000000 --- a/depends/patches/zeromq/netbsd_kevent_void.patch +++ /dev/null @@ -1,57 +0,0 @@ -commit 129137d5182967dbfcfec66bad843df2a992a78f -Author: fanquake -Date: Mon Jan 3 20:13:33 2022 +0800 - - problem: kevent udata is now void* on NetBSD Current (10) - - solution: check for the intptr_t variant in configure. - -diff --git a/configure.ac b/configure.ac -index 1a571291..402f8b86 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -307,6 +307,27 @@ case "${host_os}" in - if test "x$libzmq_netbsd_has_atomic" = "xno"; then - AC_DEFINE(ZMQ_FORCE_MUTEXES, 1, [Force to use mutexes]) - fi -+ # NetBSD Current (to become 10) has changed the type of udata in it's -+ # kevent struct from intptr_t to void * to align with darwin and other -+ # BSDs, see upstream commit: -+ # https://github.com/NetBSD/src/commit/e5ead823eb916b56589d2c6c560dbcfe4a2d0afc -+ AC_MSG_CHECKING([whether kevent udata type is intptr_t]) -+ AC_LANG_PUSH([C++]) -+ AC_LINK_IFELSE([AC_LANG_PROGRAM( -+ [[#include -+ #include -+ #include ]], -+ [[struct kevent ev; -+ intptr_t udata; -+ EV_SET(&ev, 0, 0, EV_ADD, 0, 0, udata); -+ return 0;]])], -+ [libzmq_netbsd_kevent_udata_intptr_t=yes], -+ [libzmq_netbsd_kevent_udata_intptr_t=no]) -+ AC_LANG_POP([C++]) -+ AC_MSG_RESULT([$libzmq_netbsd_kevent_udata_intptr_t]) -+ if test "x$libzmq_netbsd_kevent_udata_intptr_t" = "xyes"; then -+ AC_DEFINE(ZMQ_NETBSD_KEVENT_UDATA_INTPTR_T, 1, [kevent udata type is intptr_t]) -+ fi - ;; - *openbsd*|*bitrig*) - # Define on OpenBSD to enable all library features -diff --git a/src/kqueue.cpp b/src/kqueue.cpp -index 53d82ac4..a6a7a7f2 100644 ---- a/src/kqueue.cpp -+++ b/src/kqueue.cpp -@@ -46,9 +46,9 @@ - #include "i_poll_events.hpp" - #include "likely.hpp" - --// NetBSD defines (struct kevent).udata as intptr_t, everyone else --// as void *. --#if defined ZMQ_HAVE_NETBSD -+// NetBSD up to version 9 defines (struct kevent).udata as intptr_t, -+// everyone else as void *. -+#if defined ZMQ_HAVE_NETBSD && defined(ZMQ_NETBSD_KEVENT_UDATA_INTPTR_T) - #define kevent_udata_t intptr_t - #else - #define kevent_udata_t void * From 801c4fc24a1493c211022f2dde48892c6fae3f3f Mon Sep 17 00:00:00 2001 From: pasta Date: Fri, 27 Sep 2024 10:21:23 -0500 Subject: [PATCH 18/18] build: followup to 29488 applied to gmp --- depends/packages/gmp.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/gmp.mk b/depends/packages/gmp.mk index c28eb9d53c..0bbf31444b 100644 --- a/depends/packages/gmp.mk +++ b/depends/packages/gmp.mk @@ -5,7 +5,7 @@ $(package)_file_name=gmp-$($(package)_version).tar.bz2 $(package)_sha256_hash=eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c define $(package)_set_vars -$(package)_config_opts+=--enable-cxx --enable-fat --with-pic --disable-shared +$(package)_config_opts+=--enable-cxx --enable-fat --disable-shared $(package)_cflags_armv7l_linux+=-march=armv7-a $(package)_cflags_aarch64_darwin+=-march=armv8-a endef