Hi I seem to be getting an error during compiling of monero-stratum.

[ 60%] Linking CXX shared library libcnutil.so
[ 60%] Built target cnutil
Scanning dependencies of target hashing
[ 60%] Building C object hashing/CMakeFiles/hashing.dir/src/hashing.c.o
/home/miner/monero-stratum/hashing/src/hashing.c: In function 
/home/miner/monero-stratum/hashing/src/hashing.c:5:5: error: too many arguments to function ‘cn_slow_hash’
 cn_slow_hash(input, len, output, variant, 0);
In file included from /home/miner/monero-stratum/hashing/src/hashing.c:1:0:
/home/miner/monero/src/crypto/hash-ops.h:82:6: note: declared here
void cn_slow_hash(const void *data, size_t length, char *hash);
hashing/CMakeFiles/hashing.dir/build.make:62: recipe for target 
'hashing/CMakeFiles/hashing.dir/src/hashing.c.o' failed
make[2]: *** [hashing/CMakeFiles/hashing.dir/src/hashing.c.o] Error 1
CMakeFiles/Makefile2:123: recipe for target 'hashing/CMakeFiles/hashing.dir/all' failed
make[1]: *** [hashing/CMakeFiles/hashing.dir/all] Error 2
Makefile:83: recipe for target 'all' failed

I followed the Ubuntu 16.04 directions.

Perhaps the recent update to the Monero Daemon caused this.

Please Help.

  • I'm going to download a docker version .. Boy I feel Lazy for not solving this. May 7, 2018 at 15:50
  • Even the docker version of this did not compile. I think this is because of the fork . May 7, 2018 at 22:02
  • 1
    It looks like part of the code was updated for variant 1, and part was not. Maybe one of these parts is an external dependency.
    – user36303
    May 11, 2018 at 20:03

2 Answers 2


I found this in the repo and it worked for me.

Boils down to running this:

apt-get -qq update
apt-get install -y -qq libboost-all-dev golang curl cmake build-essential libssl-dev git-core libunbound-dev libzmq3-dev 
curl -L -o ~/v0.12.0.0.tar.gz https://github.com/monero-project/monero/archive/v0.12.0.0.tar.gz
tar xzvf ~/v0.12.0.0.tar.gz -C ~/
pushd ~/monero- && cmake -DBUILD_SHARED_LIBS=1 . && make && popd

then running:

cmake .

from monero-stratum if you weren't in there already.

You may need to specify MONERO_DIR when runing cmake . in the monero-stratum repo per the directions on the repo homepage.


install latest go from https://golang.org/dl/

create home/go/scr Add /usr/local/go/bin to the PATH environment variable. You can do this by adding this line to your /etc/profile (for a system-wide installation) or $HOME/.profile:

export PATH=$PATH:/usr/local/go/bin

create home/go/scr

follow https://github.com/sammy007/monero-stratum until error then

edit monero-stratum/hashing/src/hashing.c to looklike this

#include "crypto/hash-ops.h"

void cryptonight_hash(const char* input, char* output, uint32_t len) {
    const int variant = input[0] >= 7 ? input[0] - 6 : 0;
    cn_slow_hash(input, len, output);

void cryptonight_fast_hash(const char* input, char* output, uint32_t len) {
    cn_fast_hash(input, len, output);


cmake .



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.