Hi all, i am trying to compile jumbucks daemon for run a node, but when i try to compile it fail in main.o, i have checked all dependencies and others daemons compiles without issues, i have tried too from ubuntu 16 and debian 7 and ko, some help is welcomed
Hey mate. Can you post the error message on build?
Thanks Julian
Hi thanks Julian the error i get in the compilation is:
-DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2 -MMD -MF obj/main.d -o obj/main.o main.cpp
In file included from alert.h:13:0,
from main.cpp:6:
util.h: In function ‘std::string i64tostr(int64_t)’:
util.h:153:69: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘int64_t {aka long int}’ [-Wformat=]
#define strprintf(format, ...) real_strprintf(format, 0, __VA_ARGS__)
^
util.h:222:12: note: in expansion of macro ‘strprintf’
return strprintf("%d", n);
^
In file included from checkpoints.h:8:0,
from main.cpp:7:
net.h: In member function ‘void CNode::AskFor(const CInv&)’:
net.h:393:142: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘int64_t {aka long int}’ [-Wformat=]
printf("askfor %s %d (%s)\n", inv.ToString().c_str(), nRequestTime, DateTimeStrFormat("%H:%M:%S", nRequestTime/1000000).c_str());
^
In file included from alert.h:13:0,
from main.cpp:6:
main.h: In member function ‘std::string CTransaction::ToString() const’:
util.h:153:69: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 6 has type ‘std::vector::size_type {aka long unsigned int}’ [-Wformat=]
#define strprintf(format, ...) real_strprintf(format, 0, __VA_ARGS__)
^
main.h:634:16: note: in expansion of macro ‘strprintf’
str += strprintf("(hash=%s, nTime=%d, ver=%d, vin.size=%u, vout.size=%u, nLockTime=%d)\n",
^
util.h:153:69: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘std::vector::size_type {aka long unsigned int}’ [-Wformat=]
#define strprintf(format, ...) real_strprintf(format, 0, __VA_ARGS__)
^
main.h:634:16: note: in expansion of macro ‘strprintf’
str += strprintf("(hash=%s, nTime=%d, ver=%d, vin.size=%u, vout.size=%u, nLockTime=%d)\n",
^
In file included from db.h:8:0,
from main.cpp:8:
main.h: In member function ‘void CBlock::print() const’:
main.h:1065:67: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 9 has type ‘std::vector::size_type {aka long unsigned int}’ [-Wformat=]
HexStr(vchBlockSig.begin(), vchBlockSig.end()).c_str());
^
In file included from alert.h:13:0,
from main.cpp:6:
main.h: In member function ‘std::string CBlockIndex::ToString() const’:
util.h:153:69: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 13 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
#define strprintf(format, ...) real_strprintf(format, 0, __VA_ARGS__)
^
main.h:1306:16: note: in expansion of macro ‘strprintf’
return strprintf("CBlockIndex(nprev=%p, pnext=%p, nFile=%u, nBlockPos=%-6d nHeight=%d, nMint=%s, nMoneySupply=%s, nFlags=(%s)(%d)(%s), nStakeModifier=%016x, hashProof=%s, prevoutStake=(%s), nStakeTime=%d merkle=%s, hashBlock=%s)",
^
main.cpp: In function ‘bool AddOrphanTx(const CTransaction&)’:
main.cpp:208:110: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
printf("ignoring large orphan tx (size: %u, hash: %s)\n", nSize, hash.ToString().substr(0,10).c_str());
^
main.cpp:217:37: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘std::map::size_type {aka long unsigned int}’ [-Wformat=]
mapOrphanTransactions.size());
^
main.cpp: In member function ‘bool CTxMemPool::accept(CTxDB&, CTransaction&, bool*)’:
main.cpp:651:41: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘int64_t {aka long int}’ [-Wformat=]
nFees, txMinFee);
^
main.cpp:651:41: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘int64_t {aka long int}’ [-Wformat=]
main.cpp:705:24: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘std::map::size_type {aka long unsigned int}’ [-Wformat=]
mapTx.size());
^
main.cpp: In function ‘int64_t GetProofOfWorkReward(int, int64_t)’:
main.cpp:1004:107: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘int64_t {aka long int}’ [-Wformat=]
printf("GetProofOfWorkReward() : create=%s nSubsidy=%d\n", FormatMoney(nSubsidy).c_str(), nSubsidy);
^
main.cpp: In function ‘int64_t GetProofOfStakeReward(int64_t, int64_t, int)’:
main.cpp:1023:107: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘int64_t {aka long int}’ [-Wformat=]
printf("GetProofOfStakeReward(): create=%s nCoinAge=%d\n", FormatMoney(nSubsidy).c_str(), nCoinAge);
^
main.cpp:1035:1: error: a function-definition is not allowed here before ‘{’ token
{
^
main.cpp:1028:22: warning: unused variable ‘nTargetTimespan’ [-Wunused-variable]
static const int64_t nTargetTimespan = 16 * 60; // 16 mins
^
main.cpp:3733:5: error: expected ‘}’ at end of input
}
^
main.cpp:3733:5: warning: control reaches end of non-void function [-Wreturn-type]
}
^
main.cpp: At global scope:
main.cpp:110:13: warning: ‘bool GetTransaction(const uint256&, CWalletTx&)’ defined but not used [-Wunused-function]
bool static GetTransaction(const uint256& hashTx, CWalletTx& wtx)
^
main.cpp:145:13: warning: ‘void SetBestChain(const CBlockLocator&)’ defined but not used [-Wunused-function]
void static SetBestChain(const CBlockLocator& loc)
^
main.cpp:152:13: warning: ‘void UpdatedTransaction(const uint256&)’ defined but not used [-Wunused-function]
void static UpdatedTransaction(const uint256& hashTx)
^
main.cpp:159:13: warning: ‘void PrintWallets(const CBlock&)’ defined but not used [-Wunused-function]
void static PrintWallets(const CBlock& block)
^
main.cpp:166:13: warning: ‘void Inventory(const uint256&)’ defined but not used [-Wunused-function]
void static Inventory(const uint256& hash)
^
main.cpp:972:16: warning: ‘uint256 GetOrphanRoot(const CBlock*)’ defined but not used [-Wunused-function]
uint256 static GetOrphanRoot(const CBlock* pblock)
^
make: *** [obj/main.o] Error 1
I have checked the dependencies and i have all the required ones, thank you in advance