-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Move CopyrightHolders()
and LicenseInfo()
into libbitcoin_common
#26688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
CXX libbitcoin_node_a-pow.o
CXX libbitcoin_node_a-rest.o
bitcoind.cpp:12:10: fatal error: common/license.h: No such file or directory
#include <common/license.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:15519: bitcoind-bitcoind.o] Error 1 |
After bitcoin#26645, this change is required to be able to `#include clientversion.h` in the `libbitcoinconsensus` code without dependency on `util/translation.h`.
1b176d1
to
1370d89
Compare
What are the steps to test/reproduce? I tried, but failed with: $ git diff src/
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 38bb11aad4..43084a862f 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -11,6 +11,7 @@
#include <pubkey.h>
#include <script/script.h>
#include <uint256.h>
+#include <util/check.h>
typedef std::vector<unsigned char> valtype;
@@ -400,6 +401,8 @@ static bool EvalChecksig(const valtype& sig, const valtype& pubkey, CScript::con
// Key path spending in Taproot has no script, so this is unreachable.
break;
}
+ STR_INTERNAL_BUG("");
+ NONFATAL_UNREACHABLE();
assert(false);
}
|
An additional diff for your test is required as follows: --- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -973,7 +973,7 @@ if BUILD_BITCOIN_LIBS
lib_LTLIBRARIES += $(LIBBITCOINCONSENSUS)
include_HEADERS = script/bitcoinconsensus.h
-libbitcoinconsensus_la_SOURCES = support/cleanse.cpp $(crypto_libbitcoin_crypto_base_la_SOURCES) $(libbitcoin_consensus_a_SOURCES)
+libbitcoinconsensus_la_SOURCES = clientversion.cpp support/cleanse.cpp util/check.cpp $(crypto_libbitcoin_crypto_base_la_SOURCES) $(libbitcoin_consensus_a_SOURCES)
libbitcoinconsensus_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(RELDFLAGS)
libbitcoinconsensus_la_LIBADD = $(LIBSECP256K1) |
Ok, but what is the diff/steps to test that diff? ;) |
Perhaps, the first two commits from #26504 are. |
26504 is quite large. It would help testers if there was a MWE (minimal (non)working example) available. So for now, I tend toward NACK, unless there is a reason to do this change, with an explanation or steps to verify. |
26504 compiles fine for me with the changes here reverted |
And cross-compiling for Windows as well? |
Haven't tried that. I think it would be helpful to mention it in the description, so that testing is easier. |
Ok, I used my diff to test (#26688 (comment)) on |
The PR description has been updated. A set of diffs was introduced to reproduce the problem and test its fix easily. Specifically noted, that using of
Sorry, but I disagree. Adding source files, e.g., |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, lgtm
Friendly ping @fanquake :) |
It's not clear from the PR description why we are making this change. The description says that if you apply a diff, the build fails. However it doesn't explain why we are fixing a problem we don't have; there are currently no build issues with master, only after you apply a diff to (purposefully) break things. You say
but it's not clear there is consensus on making that change, and the PR description here doesn't explain how this a prerequisite for that, or, if so, why it needs to be split out in advance. It would be good for the PR description to either:
|
I don't think using An alternative, I presume, would be to inject |
I also don't think it's malicious. My point is just that if the entire PR rationale is that the build is broken, but only after you've broken it with some other patch (i.e not master), I don't think that's great reasoning to justify a refactor. |
I wouldn't say it is "broken" to use |
🐙 This pull request conflicts with the target branch and needs rebase. |
I think this is a bugfix/requirement for #26504, so I am not sure why it was closed but the other not? |
It is closed as well now. |
After #26645, this change is required to be able to
#include clientversion.h
in thelibbitcoinconsensus
code without dependency onutil/translation.h
.Steps to reproduce the problem
To demonstrate the problem, let's consider the
x86_64-w64-mingw32
platform as it guarantees that all symbols are defined in a library:And now, let's apply a diff as follows:
The resulted code fails to compile:
Obviously, the
util/check.cpp
needs to be added to the library sources:Now, a linker complains about another symbol:
which is defined in the
clientversion.cpp
:This time a linker error is:
which is supposed to be solved by this PR.
See #26504.
The last time those functions were moved in #24409.