Any ZCash CPU Miner that is RHEL6/7 Compatible?

Hey guys!

So I’ve began provisionning new servers like crazy using a custom PXE, so far I’m up 61 and rushing to get more online (we have hundreds of un-used servers waiting to be leased basically, all racked up ready to go).

I also have a large cluster which I’ve been working on that won’t be in production for a while. It’s entirely running off RHEL6 (CentOS 6 precisely).

I tried getting the nheqminer compiled using a self-compiled boost library set, the boost stuff itself seems legit however I get a compilation failure.

Anyone has got that working yet on RHEL?
Otherwise, anyone knows of CPU miners that are stratum compatible which support RHEL ?

Thanks!
Louis

Just for your information, i’ve got the latest zcash rc2 running on Centos 7, absolutely no wrinkles whatsoever … cannot speak for all the proprietary miners that are popping up like daisies though :slight_smile: … mind you dedicated zcash boxes i’m using are ubuntu 16.04 just to be safe

also, the zcash build pulls down the boost libs et al that it specifically needs and compiles

Yea I figured the official release would be running however not supporting stratum is less of an option for us.

For management purposes and to avoid running a wallet right now we prefer having stratum compatible cpuminers.

maybe str4d’s stand alone miner ? seems very close to the zcash code

feeleep proposed that to me yesterday.

I’ve tried it but ending up with the same compilation issues. I’m guessing GCC would need to be updated to make it work properly on RHEL6.

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.

Ok all! So for your info I came up with a build running on CentOS 6. I wouldn’t build it on my production machines given that I’ve had to setup an environment with GCC 4.8+, RHEL6 being delivered with 4.4.X per default.

I won’t describe the GCC part since there are so many different ways to get that going and don’t want you to hate me if you break your OS while doing so.

The BOOST libraries were also necessary. To save some time I found some pre-compiled ones online which come with a repo:

sudo wget http://repo.enetres.net/enetres.repo -O /etc/yum.repos.d/enetres.repo
sudo yum install boost-devel

Then, simply clone feeleep’s nheqminer source from here:
https://github.com/feeleep75/nheqminer

Before following up his instruction on building with CMAKE, you’ll have to do one quick edit to CMakeLists.txt:

Seek this line:

set(CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -std=c++11”)

Add -lpthread after c++11 to make it look as follows:

set(CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -std=c++11 -lpthread”)

Then pursue by creating the build directory, then “cmake …” and then make. The build should succeed and is portable to any RHEL system that has the boost libraries.

Thought i’d publish if anyone else wants to get it done.

strd4 miner compiles without any extra effort on centos 7 just fine.

Yes however was much less powerful when tested against kost’s release of nheqminer with xenoncat’s support.

He also has static builds that can be used, I’ve had tremendously good results on his stuff so far: