Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: KaChingCoinDev on January 03, 2016, 01:11:36 AM



Title: Error Compiling Zetacoin Ubuntu
Post by: KaChingCoinDev on January 03, 2016, 01:11:36 AM
Hello,

I have been trying to compile Zetacoin. I have overcome a few errors, but this one has been stumped. Any help?

Code:
rpcrawtransaction.cpp:299:77:   required from here
/usr/include/boost/variant/get.hpp:178:5: error: invalid application of ‘sizeof’ to incomplete type ‘boost::STATIC_ASSERTION_FAILURE<false>’
     BOOST_STATIC_ASSERT_MSG(
     ^
Makefile:837: recipe for target 'rpcrawtransaction.o' failed
make[3]: *** [rpcrawtransaction.o] Error 1
make[3]: Leaving directory '/home/brandon/zetacoin/src'
Makefile:859: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/brandon/zetacoin/src'
Makefile:651: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/brandon/zetacoin/src'
Makefile:508: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1


Any help would be appreciated.


Title: Re: Error Compiling Zetacoin Ubuntu
Post by: gjhiggins on January 03, 2016, 04:51:22 PM
Hello,

I have been trying to compile Zetacoin. I have overcome a few errors, but this one has been stumped. Any help?

Code:
rpcrawtransaction.cpp:299:77:   required from here

Here's a diff-generated patch that will fix that particular OS-related issue ...

Code:
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -296,7 +296,7 @@ Value listunspent(const Array& params, bool fHelp)
             CTxDestination address;
             if (ExtractDestination(pk, address))
             {
-                const CScriptID& hash = boost::get<const CScriptID&>(address);
+                const CScriptID& hash = boost::get<CScriptID>(address);
                 CScript redeemScript;
                 if (pwalletMain->GetCScript(hash, redeemScript))
                     entry.push_back(Pair("redeemScript", HexStr(redeemScript.begin(), redeemScript.end())));

HTH

Cheers

Graham
/me is too unfamiliar with C++ compiler/architecture variants to suggest a PR


Title: Re: Error Compiling Zetacoin Ubuntu
Post by: KaChingCoinDev on January 04, 2016, 06:46:20 PM
Hello,

I have been trying to compile Zetacoin. I have overcome a few errors, but this one has been stumped. Any help?

Code:
rpcrawtransaction.cpp:299:77:   required from here

Here's a diff-generated patch that will fix that particular OS-related issue ...

Code:
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -296,7 +296,7 @@ Value listunspent(const Array& params, bool fHelp)
             CTxDestination address;
             if (ExtractDestination(pk, address))
             {
-                const CScriptID& hash = boost::get<const CScriptID&>(address);
+                const CScriptID& hash = boost::get<CScriptID>(address);
                 CScript redeemScript;
                 if (pwalletMain->GetCScript(hash, redeemScript))
                     entry.push_back(Pair("redeemScript", HexStr(redeemScript.begin(), redeemScript.end())));

HTH

Cheers

Graham
/me is too unfamiliar with C++ compiler/architecture variants to suggest a PR


I tried it, but now I get the same error at a different spot:

Code:
/usr/include/boost/variant/get.hpp:178:5: error: invalid application of ‘sizeof’ to incomplete type ‘boost::STATIC_ASSERTION_FAILURE<false>’
     BOOST_STATIC_ASSERT_MSG(
     ^
rpcrawtransaction.cpp:805:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
Makefile:837: recipe for target 'rpcrawtransaction.o' failed
make[3]: *** [rpcrawtransaction.o] Error 1
make[3]: Leaving directory '/home/brandon/zetacoin/src'
Makefile:859: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/brandon/zetacoin/src'
Makefile:651: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/brandon/zetacoin/src'
Makefile:508: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1


Title: Re: Error Compiling Zetacoin Ubuntu
Post by: gjhiggins on January 04, 2016, 10:15:35 PM
I tried it, but now I get the same error at a different spot:

Is that a partial paste? Seems to be missing the first section.

Cheers

Graham


Title: Re: Error Compiling Zetacoin Ubuntu
Post by: KaChingCoinDev on January 05, 2016, 12:57:12 AM
I tried it, but now I get the same error at a different spot:

Is that a partial paste? Seems to be missing the first section.

Cheers

Graham


Well after having issues with the VM as a whole I decided to create a new one using an older version of Ubuntu. That worked successfully, and I am syncing the wallet now. Thanks for your help!


Title: Re: Error Compiling Zetacoin Ubuntu
Post by: scatha on January 29, 2016, 08:41:47 AM
I have similar problems with various coins- the solution is usually I try a different version of boost-devel, make clean and recompile.


Title: Re: Error Compiling Zetacoin Ubuntu
Post by: AngryDwarf on October 06, 2016, 09:18:15 AM
One line code fix to compile against boost 1.58:

https://github.com/bitcoin/bitcoin/pull/6114/files

Worked on every wallet I've tried to compile on Ubuntu 16.04 with that problem. Simpler than installing different versions of boost, and requires less hacking of the Ubuntu system.


Title: Re: Error Compiling Zetacoin Ubuntu
Post by: M8BWNNRFMNdak68c on December 26, 2016, 12:15:22 PM
One line code fix to compile against boost 1.58:

https://github.com/bitcoin/bitcoin/pull/6114/files

Worked on every wallet I've tried to compile on Ubuntu 16.04 with that problem. Simpler than installing different versions of boost, and requires less hacking of the Ubuntu system.
great hint! i had the same error for Joulecoin and Mooncoin:
Quote
rpcrawtransaction.cpp:299:71:   required from here
/usr/include/boost/variant/get.hpp:178:5: error: invalid application of 'sizeof' to incomplete type 'boost::STATIC_ASSERTION_FAILURE<false>'
     BOOST_STATIC_ASSERT_MSG(
     ^
  CXX      base58.o
Makefile:839: recipe for target 'rpcrawtransaction.o' failed

so under a  modern ubuntu you can compile an old coin, when you apply the following command:
Code:
sed -i 's/<const\ CScriptID\&/<CScriptID/' rpcrawtransaction.cpp
( additionally, you need libdb4.8 instead of the new 5.1 / 5.3 version )


Title: Re: Error Compiling Zetacoin Ubuntu
Post by: ferri2017 on December 05, 2017, 01:01:32 AM
i have same probelm in buzzcoin