Author Topic: Step-by-step: Masternode on VPS  (Read 527 times)

georgem

  • Tech Admin
  • ******
  • Posts: 235
    • View Profile
Re: Step-by-step: Masternode on VPS
« Reply #45 on: February 02, 2015, 01:03:36 AM »

Before that you can try to update your boost to a newer version. I think you can do

Code: [Select]
apt-get install libboost1.51-all-dev
(or something newer than 1.51). The default for 12.04 is boost 1.48, that is quite outdated.

It seems that my server has a general problem with the repositories. I need to fix that.

I gave up trying to compile it directly on the server.
Instead I used virtualbox, and downloaded an iso of ubuntu 14, and ran it as a virtual instance on my pc. And then I did the compiling there, in a virtual box.
And it worked immediately.
Then I uploaded the daemon to the server. Voila.
Why didn't I think so earlier.  8)

Forum donations: SVusZDRc8P1BjBRwrgdqYrJ4j5aY3gHFUg

vertoe

  • Newbie
  • *
  • Posts: 28
  • Darkcoin Core Dev
    • View Profile
    • Darkco.in
Re: Step-by-step: Masternode on VPS
« Reply #46 on: February 02, 2015, 09:14:39 AM »
so, was away for the weekend. fixed the one error in OP. anything else missing?

Could you change:
Quote
Local: Generate a masternode secret from the transaction input. if input:0 fails, try:1, and so on until you get what you want:

To

Quote
Local: Generate a masternode secret from the transaction input by going to the console at tools > debug console. if input:0 fails, try:1, and so on until you get what you want:


Is the address in the original post where you want the SPR sent still?  I'll send it as soon as you confirm.

For another 200 SPR, would you be game to add how to get multiple masternodes going on the VPS?

Fixed and added instructions for multimasternodesetups, there is quite a nice bounty piling up already lol :-)
SSHUvYeyGQcV6z1QvFiu2SppKDTbb2ZFC1

elbandi

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Step-by-step: Masternode on VPS
« Reply #47 on: February 02, 2015, 09:41:27 AM »
I don't seem to be able to compile on my ubuntu server.

Not even 5 sec after the compilation start it stopped with the following error:

Here as copy paste:

Code: [Select]
root@rs211321:/usr/spreadcoin/src# make -j4 -f makefile.unix USE_UPNP=
/bin/sh ../share/genbuild.sh obj/build.h
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/checkpoints.d -o obj/checkpoints.o checkpoints.cpp
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/db.d -o obj/db.o db.cpp
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/init.d -o obj/init.o init.cpp
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -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 checkpoints.cpp:10:0:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
In file included from db.h:8:0,
                 from db.cpp:6:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
In file included from db.h:8:0,
                 from main.cpp:8:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
In file included from txdb.h:8:0,
                 from init.cpp:6:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
main.cpp: In member function ‘bool CBlock::CheckBlock(CValidationState&, bool, bool) const’:
main.cpp:2638:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
main.cpp: In function ‘void SpreadCoinMiner(CWallet*)’:
main.cpp:5325:49: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.6/backward/auto_ptr.h:87) [-Wdeprecated-declarations]
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/checkpoints.o] Error 1
make: *** Waiting for unfinished jobs....
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/db.o] Error 1
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/init.o] Error 1
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/main.o] Error 1
root@rs211321:/usr/spreadcoin/src#

You need at least ubuntu precise for build spreadcoin. (boost 1.48 version).
And there is a "missing include bug", this line sould be added to main.h:
Code: [Select]
#include <boost/functional/hash_fwd.hpp>

like here:
Code: [Select]
#include <list>
#include <algorithm>
#include <boost/lexical_cast.hpp>
#include <boost/functional/hash_fwd.hpp>

Elbandi

MyFarm

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Re: Step-by-step: Masternode on VPS
« Reply #48 on: February 02, 2015, 04:32:30 PM »
800 SPR sent.  Thank you Vertoe!

georgem

  • Tech Admin
  • ******
  • Posts: 235
    • View Profile
Re: Step-by-step: Masternode on VPS
« Reply #49 on: February 02, 2015, 10:33:05 PM »
I don't seem to be able to compile on my ubuntu server.

Not even 5 sec after the compilation start it stopped with the following error:

Here as copy paste:

Code: [Select]
root@rs211321:/usr/spreadcoin/src# make -j4 -f makefile.unix USE_UPNP=
/bin/sh ../share/genbuild.sh obj/build.h
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/checkpoints.d -o obj/checkpoints.o checkpoints.cpp
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/db.d -o obj/db.o db.cpp
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/init.d -o obj/init.o init.cpp
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -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 checkpoints.cpp:10:0:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
In file included from db.h:8:0,
                 from db.cpp:6:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
In file included from db.h:8:0,
                 from main.cpp:8:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
In file included from txdb.h:8:0,
                 from init.cpp:6:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
main.cpp: In member function ‘bool CBlock::CheckBlock(CValidationState&, bool, bool) const’:
main.cpp:2638:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
main.cpp: In function ‘void SpreadCoinMiner(CWallet*)’:
main.cpp:5325:49: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.6/backward/auto_ptr.h:87) [-Wdeprecated-declarations]
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/checkpoints.o] Error 1
make: *** Waiting for unfinished jobs....
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/db.o] Error 1
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/init.o] Error 1
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/main.o] Error 1
root@rs211321:/usr/spreadcoin/src#

You need at least ubuntu precise for build spreadcoin. (boost 1.48 version).
And there is a "missing include bug", this line sould be added to main.h:
Code: [Select]
#include <boost/functional/hash_fwd.hpp>

like here:
Code: [Select]
#include <list>
#include <algorithm>
#include <boost/lexical_cast.hpp>
#include <boost/functional/hash_fwd.hpp>

Elbandi

Thanks for explaining this error.
It helped alot.

So I edited the main.h and restarted the build process on my ubuntu 12 precise version and it went on for 2 minutes or so, until a new error along the same lines appeared:
This time complaining about a missing boost/chrono.cpp in masternodes.cpp.

Code: [Select]
masternodes.cpp:1:28: fatal error: boost/chrono.hpp: No such file or directory
compilation terminated.

So I thought, maybe this file is missing an include too, but as it seems masternodes.cpp does have a boost/chrono.hpp included...

Code: [Select]
#include <boost/chrono.hpp>
So what is the problem now?
Forum donations: SVusZDRc8P1BjBRwrgdqYrJ4j5aY3gHFUg

elbandi

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Step-by-step: Masternode on VPS
« Reply #50 on: February 02, 2015, 10:42:44 PM »
So I edited the main.h and restarted the build process on my ubuntu 12 precise version and it went on for 2 minutes or so, until a new error along the same lines appeared:
This time complaining about a missing boost/chrono.cpp in masternodes.cpp.

Code: [Select]
masternodes.cpp:1:28: fatal error: boost/chrono.hpp: No such file or directory
compilation terminated.

So I thought, maybe this file is missing an include too, but as it seems masternodes.cpp does have a boost/chrono.hpp included...

Code: [Select]
#include <boost/chrono.hpp>
So what is the problem now?
Is libboost1.48-dev package installed?

http://packages.ubuntu.com/search?searchon=contents&keywords=chrono.hpp&mode=exactfilename&suite=precise&arch=any

Elbandi

georgem

  • Tech Admin
  • ******
  • Posts: 235
    • View Profile
Re: Step-by-step: Masternode on VPS
« Reply #51 on: February 02, 2015, 10:46:54 PM »
So I edited the main.h and restarted the build process on my ubuntu 12 precise version and it went on for 2 minutes or so, until a new error along the same lines appeared:
This time complaining about a missing boost/chrono.cpp in masternodes.cpp.

Code: [Select]
masternodes.cpp:1:28: fatal error: boost/chrono.hpp: No such file or directory
compilation terminated.

So I thought, maybe this file is missing an include too, but as it seems masternodes.cpp does have a boost/chrono.hpp included...

Code: [Select]
#include <boost/chrono.hpp>
So what is the problem now?
Is libboost1.48-dev package installed?

http://packages.ubuntu.com/search?searchon=contents&keywords=chrono.hpp&mode=exactfilename&suite=precise&arch=any

Elbandi

Yes, I think so.

If I do a

Code: [Select]
dpkg -s libboost-dev | grep 'Version'
it tells me I have:

Code: [Select]
Version: 1.48.0.2
Forum donations: SVusZDRc8P1BjBRwrgdqYrJ4j5aY3gHFUg

georgem

  • Tech Admin
  • ******
  • Posts: 235
    • View Profile
Re: Step-by-step: Masternode on VPS
« Reply #52 on: February 02, 2015, 10:50:40 PM »
Where does the boost library have to be located?

If I do a

Code: [Select]
locate boost
I get

Code: [Select]
/usr/lib/libboost_iostreams.so.1.46.1
/usr/share/doc/libboost-iostreams1.46.1
/usr/share/doc/libboost-iostreams1.46.1/NEWS.Debian.gz
/usr/share/doc/libboost-iostreams1.46.1/README.Debian.gz
/usr/share/doc/libboost-iostreams1.46.1/changelog.Debian.gz
/usr/share/doc/libboost-iostreams1.46.1/copyright
/usr/share/lintian/overrides/libboost-iostreams1.46.1
/usr/src/linux-headers-3.2.0-59/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-59/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-59/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-60/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-60/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-60/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-61/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-61/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-61/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-63/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-63/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-63/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-64/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-64/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-64/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-65/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-65/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-65/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-67/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-67/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-67/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-68/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-68/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-68/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-69/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-69/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-69/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-70/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-70/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-70/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-72/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-72/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-72/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-73/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-73/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-73/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-74/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-74/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-74/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-75/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-75/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-75/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/var/lib/dpkg/info/libboost-iostreams1.46.1.list
/var/lib/dpkg/info/libboost-iostreams1.46.1.md5sums
/var/lib/dpkg/info/libboost-iostreams1.46.1.postinst
/var/lib/dpkg/info/libboost-iostreams1.46.1.postrm
/var/lib/dpkg/info/libboost-iostreams1.46.1.shlibs

Is this correct? Or are my locations messed up?
Forum donations: SVusZDRc8P1BjBRwrgdqYrJ4j5aY3gHFUg

elbandi

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Step-by-step: Masternode on VPS
« Reply #53 on: February 02, 2015, 11:47:23 PM »
If I do a

Code: [Select]
dpkg -s libboost-dev | grep 'Version'
it tells me I have:

Code: [Select]
Version: 1.48.0.2
Oh, f*cking ubuntu... something is wrong on precise :(

http://packages.ubuntu.com/precise/libboost-dev depend on wrong package: libboost1.46-dev not libboost1.48-dev

You have to remove all 1.46 boost library/dev (old wrong package)
Code: [Select]
dpkg -l|grep 1.46
And install this: http://packages.ubuntu.com/precise/libboost1.48-all-dev