Skip to content
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

Not compiling on CentOS 7 #94

Closed
nmmmnu opened this issue Aug 1, 2018 · 2 comments
Closed

Not compiling on CentOS 7 #94

nmmmnu opened this issue Aug 1, 2018 · 2 comments
Assignees

Comments

@nmmmnu
Copy link

nmmmnu commented Aug 1, 2018

i try to compile the wallet, and get:
messagesigner.cpp: In static member function ‘static bool CHashSigner::VerifyHash(const uint256&, const CTxDestination&, const std::vector&, std::string&)’:
messagesigner.cpp:79:16: error: no match for ‘operator!=’ (operand types are ‘const CTxDestination {aka const boost::variant<CNoDestination, CKeyID, CScriptID, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessUnknown>}’ and ‘CTxDestination {aka boost::variant<CNoDestination, CKeyID, CScriptID, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessUnknown>}’)

there seems to be operator == , but != missing.

fix is easy by replacing "a != b" with " ! ( a == b ) ". See diff at the end.

export BDB_PREFIX=/root/src/db-4.8.30.NC/build_unix/build/

export CPPFLAGS="-I${BDB_PREFIX}/include/ -O2"
export LDFLAGS="-L${BDB_PREFIX}/lib/"

export CXXFLAGS="${CPPFLAGS}"

./autogen.sh && ./configure && make

here is git diff that fix the issue

diff --git a/src/key_io.cpp b/src/key_io.cpp
index 55198f0..9b78dc0 100644
--- a/src/key_io.cpp
+++ b/src/key_io.cpp
@@ -284,7 +284,7 @@ bool CBitcoinAddress::operator==(const CBitcoinAddress &rhs) const

bool CBitcoinAddress::operator!=(const CBitcoinAddress &rhs) const
{

  • return txDest != rhs.txDest;
  • return ! ( txDest == rhs.txDest );
    }

bool CBitcoinAddress::operator<(const CBitcoinAddress &rhs) const
diff --git a/src/messagesigner.cpp b/src/messagesigner.cpp
index 18804b4..5fc9c53 100644
--- a/src/messagesigner.cpp
+++ b/src/messagesigner.cpp
@@ -76,7 +76,7 @@ bool CHashSigner::VerifyHash(const uint256& hash, const CTxDestination &address,
return false;
}

  • if(address != recoveredAddress) {
  • if( ! ( address == recoveredAddress ) ) {
    strErrorRet = strprintf("Addresses don't match: address=%s, addressFromSig=%s, hash=%s, vchSig=%s",
    EncodeDestination(address), EncodeDestination(recoveredAddress), hash.ToString(),
    EncodeBase64(&vchSig[0], vchSig.size()));
@durkmurder
Copy link
Collaborator

Different compilers. Will add that operator.

@durkmurder durkmurder self-assigned this Aug 1, 2018
@durkmurder
Copy link
Collaborator

Fixed in PR. Will be released with 1.0.14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants