-
Notifications
You must be signed in to change notification settings - Fork 38.7k
refactor: Fix link error with --enable-debug #19309
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
|
How does the given patch fix this? |
|
ACK ef11f39 Tested that I can compile with |
|
Could use some documentation as to why ef11f39 fixes the issue, but it does. |
Not sure (( It seems related to instantiating of the |
|
FWIW, I've managed to reproduce the initial issue with the only flag: UPDATE: using GCC 7.5.0 |
|
The alternative approach is not using function aliasing at all: diff --git a/src/ui_interface.cpp b/src/ui_interface.cpp
index 15795bd67..c6017e57a 100644
--- a/src/ui_interface.cpp
+++ b/src/ui_interface.cpp
@@ -59,6 +59,11 @@ bool InitError(const bilingual_str& str)
return false;
}
+bool AbortError(const bilingual_str& str)
+{
+ return InitError(str);
+}
+
void InitWarning(const bilingual_str& str)
{
uiInterface.ThreadSafeMessageBox(str, "", CClientUIInterface::MSG_WARNING);
diff --git a/src/ui_interface.h b/src/ui_interface.h
index 356d30eaf..bfa771a1b 100644
--- a/src/ui_interface.h
+++ b/src/ui_interface.h
@@ -122,7 +122,7 @@ void InitWarning(const bilingual_str& str);
/** Show error message **/
bool InitError(const bilingual_str& str);
-constexpr auto AbortError = InitError;
+bool AbortError(const bilingual_str& str);
extern CClientUIInterface uiInterface;
|
maflcko
left a comment
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.
A smaller patch would be to write the verbose version of the alias?
|
Updated ef11f39 -> b83cc0f (pr19309.01 -> pr19309.02, diff):
|
|
Is there an upstream GCC bug for this? If we decide to go with this workaround, perhaps leave a comment with some context and we can revert in the future? |
|
@dongcarl I don't think anyone has reduced the test case yet |
|
Re-ACK b83cc0f |
|
This is not a gcc bug, but a Bitcoin Core bug. Proper fix is here: #19331 |
Thank you Marco! |
Summary: ``` FatalError has been copied from AbortNode, so the two should use the same style to avoid confusion. Follow-up to #18927 ``` Backport of core [[bitcoin/bitcoin#19295 | PR19295]], [[bitcoin/bitcoin#19309 | PR19309]] and [[bitcoin/bitcoin#19331 | PR19331]]. [[bitcoin/bitcoin#19295 | PR19295]] is the original intent [[bitcoin/bitcoin#19309 | PR19309]] is a hacky bug fix [[bitcoin/bitcoin#19331 | PR19331]] reverts [[bitcoin/bitcoin#19309 | PR19309]] and fixes [[bitcoin/bitcoin#19295 | PR19295]]. In the end the relevant commits are: bitcoin/bitcoin@fa02b47 bitcoin/bitcoin@fac96e6 bitcoin/bitcoin@fa72ca6 bitcoin/bitcoin@cccc278 Depends on D8649. Test Plan: With debug: ninja all check-all Reviewers: #bitcoin_abc, jasonbcox Reviewed By: #bitcoin_abc, jasonbcox Differential Revision: https://reviews.bitcoinabc.org/D8650
Fixes a link error on master (39bd9dd):
See: