got this error at 3.5.9
Ths look like a problem with your environment. Does 3.5.8 compile? If I recently broke it it's easier to
fix.
This looks to be in c++ code which is only used by the non-AES version of Hodl, suggesting your CPU doesn't
have AES. It also appears you are using gcc 6.4. The Windows binaries are built with 4.8.
I suggest you use gcc 4.8 if possible as there have been other reports of problems with newer compilers. If the
compile fails with 4.8 there may be other issues with your environment.
Or you could take the lazy way out and use the binaries.
my cpu has AES and im using msys2 and it doesn´t support to install a older version of gcc
There's not much I can do about your build environment. Like I said you can use the binaries or if you're
comfortable with code you can comment out the lines that don't compile. Since the code is only
used on non-AES CPUs, removing it will have no effect on your mining.
ok first of all thx for your time and help!!!
i recompiled 3.5.8 no problems
3.5.9 i get errors
because of that i don´t think it is a build environment problem
sry for my bad english
Thanks for that info.
I made a small change in Hodl in v3.5.9 but I see no connection with the code that won't compile. It compiles
and runs fine for me. I simply moved some code from one function to another, I have no idea why it broke
your compile. Unfortunately the vague error messages don't help.
Since the error does not occur for me I have no way to debug it.
ok thx
Same error on master branch with gcc 6.3 (building Docker image from clearlinux)
Dockerfile to compile/reproduce the issue:
FROM clearlinux:latest
RUN swupd bundle-add dev-utils os-core-dev c-basic && \
rm -rf /var/lib/swupd/*
RUN git clone https://github.com/JayDDee/cpuminer-opt.git && \
cd cpuminer-opt && \
sh build.sh
WORKDIR /cpuminer-opt
ENTRYPOINT ["./cpuminer"]
It crashed on same things on hodl, I have a CPU with aes_ni.
g++ -DHAVE_CONFIG_H -I. -Iyes/include -fno-strict-aliasing -I./compat/jansson -I. -Iyes/include -O3 -march=native -Wall -std=gnu++11 -MT algo/hodl/cpuminer-hodl.o -MD -MP -MF algo/hodl/.deps/cpuminer-hodl.Tpo -c -o algo/hodl/cpuminer-hodl.o `test -f 'algo/hodl/hodl.cpp' || echo './'`algo/hodl/hodl.cpp
In file included from /usr/include/c++/bits/char_traits.h:39:0,
from /usr/include/c++/string:40,
from /usr/include/c++/stdexcept:39,
from algo/hodl/hodl_uint256.h:11,
from algo/hodl/hodl.cpp:3:
/usr/include/c++/bits/stl_algobase.h:243:56: error: macro "min" passed 3 arguments, but takes just 2
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/include/c++/bits/stl_algobase.h:265:56: error: macro "max" passed 3 arguments, but takes just 2
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
In file included from /usr/include/c++/bits/stl_algo.h:60:0,
from /usr/include/c++/algorithm:62,
from algo/hodl/serialize.h:13,
from algo/hodl/block.h:9,
from algo/hodl/hodl.cpp:5:
/usr/include/c++/bits/algorithmfwd.h:362:41: error: macro "max" passed 3 arguments, but takes just 2
max(const _Tp&, const _Tp&, _Compare);
^
/usr/include/c++/bits/algorithmfwd.h:375:41: error: macro "min" passed 3 arguments, but takes just 2
min(const _Tp&, const _Tp&, _Compare);
^
/usr/include/c++/bits/algorithmfwd.h:403:30: error: macro "min" requires 2 arguments, but only 1 given
min(initializer_list<_Tp>);
^
/usr/include/c++/bits/algorithmfwd.h:413:30: error: macro "max" requires 2 arguments, but only 1 given
max(initializer_list<_Tp>);
^
In file included from /usr/include/c++/bits/uniform_int_dist.h:35:0,
from /usr/include/c++/bits/stl_algo.h:66,
from /usr/include/c++/algorithm:62,
from algo/hodl/serialize.h:13,
from algo/hodl/block.h:9,
from algo/hodl/hodl.cpp:5:
/usr/include/c++/limits:320:11: error: macro "min" requires 2 arguments, but only 1 given
min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
^
/usr/include/c++/limits:324:11: error: macro "max" requires 2 arguments, but only 1 given
max() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
^
/usr/include/c++/limits:387:11: error: macro "min" requires 2 arguments, but only 1 given
min() _GLIBCXX_USE_NOEXCEPT { return false; }
^
/usr/include/c++/limits:390:11: error: macro "max" requires 2 arguments, but only 1 given
max() _GLIBCXX_USE_NOEXCEPT { return true; }
^
/usr/include/c++/limits:394:38: error: macro "min" requires 2 arguments, but only 1 given
lowest() noexcept { return min(); }
^
/usr/include/c++/limits:456:11: error: macro "min" requires 2 arguments, but only 1 given
min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min(char); }
^
/usr/include/c++/limits:459:11: error: macro "max" requires 2 arguments, but only 1 given
max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max(char); }
^
/usr/include/c++/limits:463:38: error: macro "min" requires 2 arguments, but only 1 given
lowest() noexcept { return min(); }
^
/usr/include/c++/limits:523:11: error: macro "min" requires 2 arguments, but only 1 given
min() _GLIBCXX_USE_NOEXCEPT { return -__SCHAR_MAX__ - 1; }
^
/usr/include/c++/limits:526:11: error: macro "max" requires 2 arguments, but only 1 given
max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__; }
^
/usr/include/c++/limits:530:38: error: macro "min" requires 2 arguments, but only 1 given
lowest() noexcept { return min(); }
^
/usr/include/c++/limits:593:11: error: macro "min" requires 2 arguments, but only 1 given
min() _GLIBCXX_USE_NOEXCEPT { return 0; }
^
/usr/include/c++/limits:596:11: error: macro "max" requires 2 arguments, but only 1 given
max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__ * 2U + 1; }
^
/usr/include/c++/limits:600:38: error: macro "min" requires 2 arguments, but only 1 given
lowest() noexcept { return min(); }
^
/usr/include/c++/limits:666:11: error: macro "min" requires 2 arguments, but only 1 given
min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min (wchar_t); }
^
/usr/include/c++/limits:669:11: error: macro "max" requires 2 arguments, but only 1 given
max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max (wchar_t); }
^
/usr/include/c++/limits:673:38: error: macro "min" requires 2 arguments, but only 1 given
lowest() noexcept { return min(); }
^
/usr/include/c++/limits:735:11: error: macro "min" requires 2 arguments, but only 1 given
min() noexcept { return __glibcxx_min (char16_t); }
^
/usr/include/c++/limits:738:11: error: macro "max" requires 2 arguments, but only 1 given
max() noexcept { return __glibcxx_max (char16_t); }
^
/usr/include/c++/limits:741:38: error: macro "min" requires 2 arguments, but only 1 given
lowest() noexcept { return min(); }
^
/usr/include/c++/limits:796:11: error: macro "min" requires 2 arguments, but only 1 given
min() noexcept { return __glibcxx_min (char32_t); }
^
/usr/include/c++/limits:799:11: error: macro "max" requires 2 arguments, but only 1 given
max() noexcept { return __glibcxx_max (char32_t); }
^
/usr/include/c++/limits:802:38: error: macro "min" requires 2 arguments, but only 1 given
lowest() noexcept { return min(); }
^
/usr/include/c++/limits:858:11: error: macro "min" requires 2 arguments, but only 1 given
min() _GLIBCXX_USE_NOEXCEPT { return -__SHRT_MAX__ - 1; }
^
/usr/include/c++/limits:861:11: error: macro "max" requires 2 arguments, but only 1 given
max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__; }
^
/usr/include/c++/limits:865:38: error: macro "min" requires 2 arguments, but only 1 given
lowest() noexcept { return min(); }
^
/usr/include/c++/limits:925:11: error: macro "min" requires 2 arguments, but only 1 given
min() _GLIBCXX_USE_NOEXCEPT { return 0; }
^
/usr/include/c++/limits:928:11: error: macro "max" requires 2 arguments, but only 1 given
max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__ * 2U + 1; }
^
/usr/include/c++/limits:932:38: error: macro "min" requires 2 arguments, but only 1 given
lowest() noexcept { return min(); }
^
/usr/include/c++/limits:998:11: error: macro "min" requires 2 arguments, but only 1 given
min() _GLIBCXX_USE_NOEXCEPT { return -__INT_MAX__ - 1; }
^
/usr/include/c++/limits:1001:11: error: macro "max" requires 2 arguments, but only 1 given
max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__; }
^
/usr/include/c++/limits:1005:38: error: macro "min" requires 2 arguments, but only 1 given
lowest() noexcept { return min(); }
^
/usr/include/c++/limits:1065:11: error: macro "min" requires 2 arguments, but only 1 given
min() _GLIBCXX_USE_NOEXCEPT { return 0; }
^
/usr/include/c++/limits:1068:11: error: macro "max" requires 2 arguments, but only 1 given
max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__ * 2U + 1; }
^
/usr/include/c++/limits:1072:38: error: macro "min" requires 2 arguments, but only 1 given
lowest() noexcept { return min(); }
^
/usr/include/c++/limits:1137:11: error: macro "min" requires 2 arguments, but only 1 given
min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_MAX__ - 1; }
^
/usr/include/c++/limits:1140:11: error: macro "max" requires 2 arguments, but only 1 given
max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__; }
^
/usr/include/c++/limits:1144:38: error: macro "min" requires 2 arguments, but only 1 given
lowest() noexcept { return min(); }
^
/usr/include/c++/limits:1204:11: error: macro "min" requires 2 arguments, but only 1 given
min() _GLIBCXX_USE_NOEXCEPT { return 0; }
^
/usr/include/c++/limits:1207:11: error: macro "max" requires 2 arguments, but only 1 given
max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__ * 2UL + 1; }
^
/usr/include/c++/limits:1211:38: error: macro "min" requires 2 arguments, but only 1 given
lowest() noexcept { return min(); }
^
/usr/include/c++/limits:1277:11: error: macro "min" requires 2 arguments, but only 1 given
min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_LONG_MAX__ - 1; }
^
/usr/include/c++/limits:1280:11: error: macro "max" requires 2 arguments, but only 1 given
max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__; }
^
/usr/include/c++/limits:1284:38: error: macro "min" requires 2 arguments, but only 1 given
lowest() noexcept { return min(); }
^
/usr/include/c++/limits:1347:11: error: macro "min" requires 2 arguments, but only 1 given
min() _GLIBCXX_USE_NOEXCEPT { return 0; }
^
/usr/include/c++/limits:1350:11: error: macro "max" requires 2 arguments, but only 1 given
max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__ * 2ULL + 1; }
^
/usr/include/c++/limits:1354:38: error: macro "min" requires 2 arguments, but only 1 given
lowest() noexcept { return min(); }
^
/usr/include/c++/limits:1570:85: error: macro "min" requires 2 arguments, but only 1 given
__INT_N_201103 (__GLIBCXX_TYPE_INT_N_0), __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_0))
^
/usr/include/c++/limits:1570:85: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/limits:1570:85: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/limits:1570:85: error: macro "max" requires 2 arguments, but only 1 given
/usr/include/c++/limits:1570:85: error: macro "min" requires 2 arguments, but only 1 given
/usr/include/c++/limits:1570:85: error: macro "max" requires 2 arguments, but only 1 given
/usr/include/c++/limits:1598:11: error: macro "min" requires 2 arguments, but only 1 given
min() _GLIBCXX_USE_NOEXCEPT { return __FLT_MIN__; }
^
/usr/include/c++/limits:1601:11: error: macro "max" requires 2 arguments, but only 1 given
max() _GLIBCXX_USE_NOEXCEPT { return __FLT_MAX__; }
^
/usr/include/c++/limits:1673:11: error: macro "min" requires 2 arguments, but only 1 given
min() _GLIBCXX_USE_NOEXCEPT { return __DBL_MIN__; }
^
/usr/include/c++/limits:1676:11: error: macro "max" requires 2 arguments, but only 1 given
max() _GLIBCXX_USE_NOEXCEPT { return __DBL_MAX__; }
^
/usr/include/c++/limits:1748:11: error: macro "min" requires 2 arguments, but only 1 given
min() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MIN__; }
^
/usr/include/c++/limits:1751:11: error: macro "max" requires 2 arguments, but only 1 given
max() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MAX__; }
^
In file included from /usr/include/c++/bits/stl_algo.h:66:0,
from /usr/include/c++/algorithm:62,
from algo/hodl/serialize.h:13,
from algo/hodl/block.h:9,
from algo/hodl/hodl.cpp:5:
/usr/include/c++/bits/uniform_int_dist.h:76:56: error: macro "max" requires 2 arguments, but only 1 given
_IntType __b = std::numeric_limits<_IntType>::max())
^
/usr/include/c++/bits/uniform_int_dist.h:105:57: error: macro "max" requires 2 arguments, but only 1 given
_IntType __b = std::numeric_limits<_IntType>::max())
^
/usr/include/c++/bits/uniform_int_dist.h:149:11: error: macro "min" requires 2 arguments, but only 1 given
min() const
^
/usr/include/c++/bits/uniform_int_dist.h:156:11: error: macro "max" requires 2 arguments, but only 1 given
max() const
^
/usr/include/c++/bits/uniform_int_dist.h:227:40: error: macro "min" requires 2 arguments, but only 1 given
const __uctype __urngmin = __urng.min();
^
/usr/include/c++/bits/uniform_int_dist.h:228:40: error: macro "max" requires 2 arguments, but only 1 given
const __uctype __urngmax = __urng.max();
^
/usr/include/c++/bits/uniform_int_dist.h:296:40: error: macro "min" requires 2 arguments, but only 1 given
const __uctype __urngmin = __urng.min();
^
/usr/include/c++/bits/uniform_int_dist.h:297:40: error: macro "max" requires 2 arguments, but only 1 given
const __uctype __urngmax = __urng.max();
^
In file included from /usr/include/c++/algorithm:62:0,
from algo/hodl/serialize.h:13,
from algo/hodl/block.h:9,
from algo/hodl/hodl.cpp:5:
/usr/include/c++/bits/stl_algo.h:3447:34: error: macro "min" requires 2 arguments, but only 1 given
min(initializer_list<_Tp> __l)
^
/usr/include/c++/bits/stl_algo.h:3459:34: error: macro "max" requires 2 arguments, but only 1 given
max(initializer_list<_Tp> __l)
^
In file included from algo/hodl/block.h:9:0,
from algo/hodl/hodl.cpp:5:
algo/hodl/serialize.h:246:64: error: macro "max" requires 2 arguments, but only 1 given
else if (nSize <= std::numeric_limits::max()) return sizeof(unsigned char) + sizeof(unsigned short);
^
algo/hodl/serialize.h:247:62: error: macro "max" requires 2 arguments, but only 1 given
else if (nSize <= std::numeric_limits::max()) return sizeof(unsigned char) + sizeof(unsigned int);
^
algo/hodl/serialize.h:258:64: error: macro "max" requires 2 arguments, but only 1 given
else if (nSize <= std::numeric_limits::max())
^
algo/hodl/serialize.h:263:62: error: macro "max" requires 2 arguments, but only 1 given
else if (nSize <= std::numeric_limits::max())
^
In file included from algo/hodl/hodl.cpp:1:0:
/usr/include/c++/bits/stl_algobase.h:195:5: error: expected unqualified-id before 'const'
min(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/bits/stl_algobase.h:195:5: error: expected ')' before 'const'
/usr/include/c++/bits/stl_algobase.h:195:5: error: expected initializer before 'const'
/usr/include/c++/bits/stl_algobase.h:219:5: error: expected unqualified-id before 'const'
max(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/bits/stl_algobase.h:219:5: error: expected ')' before 'const'
/usr/include/c++/bits/stl_algobase.h:219:5: error: expected initializer before 'const'
In file included from /usr/include/c++/bits/char_traits.h:39:0,
from /usr/include/c++/string:40,
from /usr/include/c++/stdexcept:39,
from algo/hodl/hodl_uint256.h:11,
from algo/hodl/hodl.cpp:3:
/usr/include/c++/bits/stl_algobase.h:243:5: error: 'std::min' declared as an 'inline' variable
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/bits/stl_algobase.h:246:7: error: expected primary-expression before 'if'
if (__comp(__b, __a))
^~
/usr/include/c++/bits/stl_algobase.h:246:7: error: expected '}' before 'if'
/usr/include/c++/bits/stl_algobase.h:246:7: error: expected ';' before 'if'
/usr/include/c++/bits/stl_algobase.h:248:7: error: expected unqualified-id before 'return'
return __a;
^~~~~~
/usr/include/c++/bits/stl_algobase.h:265:5: error: 'max' declared as an 'inline' variable
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/bits/stl_algobase.h:268:7: error: expected primary-expression before 'if'
if (__comp(__a, __b))
^~
/usr/include/c++/bits/stl_algobase.h:268:7: error: expected '}' before 'if'
/usr/include/c++/bits/stl_algobase.h:268:7: error: expected ';' before 'if'
/usr/include/c++/bits/stl_algobase.h:270:7: error: expected unqualified-id before 'return'
return __a;
^~~~~~
/usr/include/c++/bits/stl_algobase.h:271:5: error: expected declaration before '}' token
}
^
make[2]: *** [Makefile:3390: algo/hodl/cpuminer-hodl.o] Error 1
make[2]: *** Waiting for unfinished jobs....
mv -f algo/groestl/aes_ni/.deps/cpuminer-hash-groestl.Tpo algo/groestl/aes_ni/.deps/cpuminer-hash-groestl.Po
mv -f algo/groestl/aes_ni/.deps/cpuminer-hash-groestl256.Tpo algo/groestl/aes_ni/.deps/cpuminer-hash-groestl256.Po
mv -f algo/haval/.deps/cpuminer-haval.Tpo algo/haval/.deps/cpuminer-haval.Po
make[2]: Leaving directory '/cpuminer-opt'
make[1]: *** [Makefile:3551: all-recursive] Error 1
make[1]: Leaving directory '/cpuminer-opt'
make: *** [Makefile:675: all] Error 2