I’ve also had issues compiling on an older Debian machine. If it’ll help, these are diffs for the version of zcash from 2 days ago:
diff --git a/src/crypto/equihash.h b/src/crypto/equihash.h
index 3f1c300..ff92577 100644
--- a/src/crypto/equihash.h
+++ b/src/crypto/equihash.h
@@ -13,6 +13,7 @@
#include <cstring>
#include <exception>
+#include <stdexcept>
#include <functional>
#include <memory>
#include <set>
diff --git a/src/gtest/test_joinsplit.cpp b/src/gtest/test_joinsplit.cpp
index a8da4d5..f444a48 100644
--- a/src/gtest/test_joinsplit.cpp
+++ b/src/gtest/test_joinsplit.cpp
@@ -223,7 +223,7 @@ for test_input in TEST_VECTORS:
BOOST_FOREACH(std::vector<std::string>& v, tests) {
auto expected = js->h_sig(
uint256S(v[0]),
- {uint256S(v[1]), uint256S(v[2])},
+ { {uint256S(v[1]), uint256S(v[2])} },
uint256S(v[3])
);
diff --git a/src/primitives/transaction.cpp b/src/primitives/transaction.cpp
index 399cd66..94801ed 100644
--- a/src/primitives/transaction.cpp
+++ b/src/primitives/transaction.cpp
@@ -55,8 +55,8 @@ JSDescription JSDescription::Randomized(
std::function<int(int)> gen)
{
// Randomize the order of the inputs and outputs
- inputMap = {0, 1};
- outputMap = {0, 1};
+ inputMap = { {0, 1} };
+ outputMap = { {0, 1} };
MappedShuffle(inputs.begin(), inputMap.begin(), ZC_NUM_JS_INPUTS, gen);
MappedShuffle(outputs.begin(), outputMap.begin(), ZC_NUM_JS_OUTPUTS, gen);
diff --git a/src/uint256.h b/src/uint256.h
index 3729c98..f768e61 100644
--- a/src/uint256.h
+++ b/src/uint256.h
@@ -19,7 +19,7 @@ class base_blob
{
protected:
enum { WIDTH=BITS/8 };
- alignas(uint32_t) uint8_t data[WIDTH];
+ __attribute__((aligned(4))) uint8_t data[WIDTH];
public:
base_blob()
{
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index 1bb78d5..31fe9a8 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -2399,8 +2399,8 @@ Value zc_sample_joinsplit(const json_spirit::Array& params, bool fHelp)
JSDescription samplejoinsplit(*pzcashParams,
pubKeyHash,
anchor,
- {JSInput(), JSInput()},
- {JSOutput(), JSOutput()},
+ { {JSInput(), JSInput()} },
+ { {JSOutput(), JSOutput()} },
0,
0);
@@ -2702,8 +2702,8 @@ Value zc_raw_joinsplit(const json_spirit::Array& params, bool fHelp)
JSDescription jsdesc(*pzcashParams,
joinSplitPubKey,
anchor,
- {vjsin[0], vjsin[1]},
- {vjsout[0], vjsout[1]},
+ { {vjsin[0], vjsin[1]} },
+ { {vjsout[0], vjsout[1]} },
vpub_old,
vpub_new);
diff --git a/src/zcbenchmarks.cpp b/src/zcbenchmarks.cpp
index 6ea9999..9c41cd5 100644
--- a/src/zcbenchmarks.cpp
+++ b/src/zcbenchmarks.cpp
@@ -83,8 +83,8 @@ double benchmark_create_joinsplit()
JSDescription jsdesc(*pzcashParams,
pubKeyHash,
anchor,
- {JSInput(), JSInput()},
- {JSOutput(), JSOutput()},
+ { {JSInput(), JSInput()} },
+ { {JSOutput(), JSOutput()} },
0,
0);
double ret = timer_stop(tv_start);
See also the last comment on Compilation problem in ./src/wallet/rpcwallet.cpp · Issue #838 · zcash/zcash · GitHub
These changes are also needed for the str4d’s standalone miner.
And on Compiling on older systems · Issue #13 · nicehash/nheqminer · GitHub you can check what was needed to compile nheqminer.
Hope this helps.