I don't understand why I was able to compile on Digital Ocean vps but not Vultr and i did the same steps.
Different distributions of Linux uses different versions of boost. Try Ubuntu 14.04.
Or try the patch included below for 16.04:
diff --git a/configure.ac b/configure.ac
index 7208c72..3ade7e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -354,6 +354,8 @@ fi
if test x$use_hardening != xno; then
AX_CHECK_COMPILE_FLAG([-Wstack-protector],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"])
AX_CHECK_COMPILE_FLAG([-fstack-protector-all],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-protector-all"])
+ AX_CHECK_COMPILE_FLAG([-fPIE],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIE"])
+ AX_CHECK_COMPILE_FLAG([-fPIC],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIC"])
AX_CHECK_PREPROC_FLAG([-D_FORTIFY_SOURCE=2],[
AX_CHECK_PREPROC_FLAG([-U_FORTIFY_SOURCE],[
@@ -367,6 +369,11 @@ if test x$use_hardening != xno; then
AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"])
AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"])
+ if test x$TARGET_OS != xwindows; then
+ # -pie will link successfully with MinGW, but it's unsupported and leads to undeterministic binaries
+ AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"])
+ AX_CHECK_LINK_FLAG([[-pic]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pic"])
+ fi
CXXFLAGS="$CXXFLAGS $HARDENED_CXXFLAGS"
CPPFLAGS="$CPPFLAGS $HARDENED_CPPFLAGS"
diff --git a/src/Makefile.am b/src/Makefile.am
index ab22d1b..7cdf221 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,6 @@
include Makefile.include
-AM_CPPFLAGS += -I$(builddir)
+AM_CPPFLAGS += -fPIC -I$(builddir)
noinst_LIBRARIES = \
libchaincoin_server.a \
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index e91dc75..9810694 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -65,13 +65,21 @@ public:
vSeeds.push_back(CDNSSeedData("seed2.chaincoin.org", "seed2.chaincoin.org"));
vSeeds.push_back(CDNSSeedData("seed3.chaincoin.org", "seed3.chaincoin.org"));
vSeeds.push_back(CDNSSeedData("seed4.chaincoin.org", "seed4.chaincoin.org"));
-
+#if BOOST_VERSION >= 158000
+ base58Prefixes[PUBKEY_ADDRESS] = std::vector(1,28); // Chaincoin addresses start with 'X'
+ base58Prefixes[SCRIPT_ADDRESS] = std::vector(1,4); // Chaincoin script addresses start with '7'
+ base58Prefixes[SECRET_KEY] = std::vector(1,28 + 128); // Chaincoin private keys start with '7' or 'X'
+ base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x02)(0xFE)(0x52)(0xF8).convert_to_container >(); // Chaincoin BIP32 pubkeys start with 'drkv'
+ base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x02)(0xFE)(0x52)(0xCC).convert_to_container >(); // Chaincoin BIP32 prvkeys start with 'drkp'
+ base58Prefixes[EXT_COIN_TYPE] = boost::assign::list_of(0x80000005).convert_to_container >(); // Chaincoin BIP44 coin type is '5'
+#else
base58Prefixes[PUBKEY_ADDRESS] = list_of( 28); // Chaincoin addresses start with 'X'
base58Prefixes[SCRIPT_ADDRESS] = list_of( 4); // Chaincoin script addresses start with '7'
base58Prefixes[SECRET_KEY] = list_of(28 + 128); // Chaincoin private keys start with '7' or 'X'
base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x02)(0xFE)(0x52)(0xF8); // Chaincoin BIP32 pubkeys start with 'drkv'
base58Prefixes[EXT_SECRET_KEY] = list_of(0x02)(0xFE)(0x52)(0xCC); // Chaincoin BIP32 prvkeys start with 'drkp'
base58Prefixes[EXT_COIN_TYPE] = list_of(0x80000005); // Chaincoin BIP44 coin type is '5'
+#endif
// Convert the pnSeeds array into usable address objects.
for (unsigned int i = 0; i < ARRAYLEN(pnSeed); i++)
@@ -132,12 +140,21 @@ public:
vFixedSeeds.clear();
vSeeds.clear();
+#if BOOST_VERSION >= 158000
+ base58Prefixes[PUBKEY_ADDRESS] = std::vector(1,80); // Testnet chaincoin addresses start with 'x' or 'y'
+ base58Prefixes[SCRIPT_ADDRESS] = std::vector(1,44); // Testnet chaincoin script addresses start with '8' or '9'
+ base58Prefixes[SECRET_KEY] = std::vector(1,88 + 128); // Testnet private keys start with '9' or 'c' (Bitcoin defaults)
+ base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x3a)(0x80)(0x61)(0xa0).convert_to_container >(); // Testnet chaincoin BIP32 pubkeys start with 'DRKV'
+ base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x3a)(0x80)(0x58)(0x37).convert_to_container >(); // Testnet chaincoin BIP32 prvkeys start with 'DRKP'
+ base58Prefixes[EXT_COIN_TYPE] = boost::assign::list_of(0x80)(0x00)(0x00)(0x01).convert_to_container >(); // Testnet chaincoin BIP44 coin type is '5' (All coin's testnet default)
+#else
base58Prefixes[PUBKEY_ADDRESS] = list_of( 80); // Testnet chaincoin addresses start with 'x' or 'y'
base58Prefixes[SCRIPT_ADDRESS] = list_of( 44); // Testnet chaincoin script addresses start with '8' or '9'
base58Prefixes[SECRET_KEY] = list_of(88 + 128); // Testnet private keys start with '9' or 'c' (Bitcoin defaults)
base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x3a)(0x80)(0x61)(0xa0); // Testnet chaincoin BIP32 pubkeys start with 'DRKV'
base58Prefixes[EXT_SECRET_KEY] = list_of(0x3a)(0x80)(0x58)(0x37); // Testnet chaincoin BIP32 prvkeys start with 'DRKP'
base58Prefixes[EXT_COIN_TYPE] = list_of(0x80000001); // Testnet chaincoin BIP44 coin type is '5' (All coin's testnet default)
+#endif
}
virtual Network NetworkID() const { return CChainParams::TESTNET; }
};