joergoster / Stockfish-old

UCI chess engine
http://www.stockfishchess.com/
GNU General Public License v3.0
8 stars 4 forks source link

Get error when I compile stackfisch-uct on Mac #8

Closed ArminHHJ closed 2 years ago

ArminHHJ commented 2 years ago

Could you help? Get error when I compile stackfisch-uct on Mac. make profile-build ARCH=x86-64-bmi2 COMP=clang

search.cpp:2113:22: error: constexpr variable 'C' must be initialized by a constant expression constexpr double C = 1.6 std::sqrt(2); ^ ~~~~~~ search.cpp:2113:32: note: non-constexpr function 'sqrt' cannot be used in a constant expression constexpr double C = 1.6 std::sqrt(2); ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/math.h:1034:1: note: declared here sqrt(_A1 lcpp_x) _NOEXCEPT {return ::sqrt((double)lcpp_x);} ^ 1 error generated. make[1]: [search.o] Error 1 make: [build] Error 2 armin@Armins-MacBook-Pro src %

joergoster commented 2 years ago

Try changing to const double C = 1.6 * std::sqrt(2); or double C = 1.6 * std::sqrt(2);

ArminHHJ commented 2 years ago

const double C = 1.6 * std::sqrt(2);

funktioniert. Danke