ehsanrashid / DON

UCI Chess Engine
GNU General Public License v3.0
6 stars 7 forks source link

compile error (Linux) #8

Closed tissatussa closed 3 years ago

tissatussa commented 3 years ago

hi,

I use Ubuntu 20.04.1 and can NOT compile DON .. i tried to use the (default) GCC compiler and also CLANG but they both give errors .. see terminal log text in ZIP file

don_compile_errors.zip

BTW. in /src/nnue/architectures/ i also had to rename halfkp_256x2-32-32.h to HalfKP_256x2-32-32.h (watch the capitals) because this gave an error also ..

tissatussa commented 3 years ago

I just compiled your newest version but i still have some errors : don_compile_errors_B.zip this log also shows again i first had to rename that .h file in /architectures .. HTH

tissatussa commented 3 years ago

thanks for your support! Today i compiled your newest version but i still have an error, see attached ZIP with the terminal log.

DON-master_C_log.zip

I'm not a beginner at computers and linux, how can i help you to solve the issue? With Meld (a linux diff GUI) i see you changed the name of that .h file in /architectures, so i did not have to rename it. And at line 57 in bitboard.cpp you added "noexcept". However, the log shows 1 error and the compilation ended :

evaluator.cpp:364:68: internal compiler error: unexpected expression ‘std::clamp’ of kind overload [...]

tissatussa commented 3 years ago

i just downloaded your newest source ZIP and compiled it, but i still have the SAME error .. see my DON-master_C_log.zip .. I also did a diff compare of these newest source files (my "D") and the previous ones (my "C") : i see you made some changes in the files searcher.cpp and type.h .. and you did not change any code in evaluator.cpp, where the error seems to be ? :

Screenshot_2020-12-12_09-39-08

to me it looks like some bracket is wrong, but i'm not a C-language programmer .. i still want to help you, to solve the issue and i patiently await your newest code !

tissatussa commented 3 years ago

hi, after some time i downloaded your newest DON and compiled it, but it still gives an error ..

in terminal i get this message, and i read the README but i have no clue what to do :

Please submit a full bug report, with preprocessed source if appropriate. See /usr/share/doc/gcc-9/README.Bugs for instructions.

here is my terminal output. NOTE: this issue-editor does not correctly show the pasted text .. at the error we see a '^' which points to the last '}' of the concerning code line.

make build ARCH=x86-64-modern

Default net: nn-62ef826d1a6d.nnue Downloading https://tests.stockfishchess.org/api/nn/nn-62ef826d1a6d.nnue

Config:

debug : 'no' sanitize: 'no' optimize: 'yes' arch : 'x86_64' comp : 'gcc' bits : '64' kernel : 'Linux' os : 'GNU/Linux' prefetch: 'yes' popcnt : 'yes' sse : 'yes' mmx : 'no' sse2 : 'yes' ssse3 : 'yes' sse41 : 'yes' avx2 : 'no' bmi2 : 'no' avx512 : 'no' vnni256 : 'no' vnni512 : 'no' neon : 'no'

Flags:

CXX : g++ CXXFLAGS: -Wall -Wcast-qual -fno-exceptions -std=c++17 -Wextra -Wshadow -pedantic -m64 -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_PREFETCH -msse -DUSE_POPCNT -msse3 -mpopcnt -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2 -flto LDFLAGS : -m64 -Wl,--no-as-needed -lpthread -Wall -Wcast-qual -fno-exceptions -std=c++17 -Wextra -Wshadow -pedantic -m64 -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_PREFETCH -msse -DUSE_POPCNT -msse3 -mpopcnt -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2 -flto -flto=jobserver

Testing config sanity. If this fails, try 'make help' ...

make ARCH=x86-64-modern COMP=gcc all make[1]: Entering directory '/home/roelof/Downloads/DON-master/src' g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -Wextra -Wshadow -pedantic -m64 -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_PREFETCH -msse -DUSE_POPCNT -msse3 -mpopcnt -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2 -flto -c -o main.o main.cpp g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -Wextra -Wshadow -pedantic -m64 -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_PREFETCH -msse -DUSE_POPCNT -msse3 -mpopcnt -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2 -flto -c -o bitbase.o bitbase.cpp g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -Wextra -Wshadow -pedantic -m64 -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_PREFETCH -msse -DUSE_POPCNT -msse3 -mpopcnt -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2 -flto -c -o bitboard.o bitboard.cpp g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -Wextra -Wshadow -pedantic -m64 -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_PREFETCH -msse -DUSE_POPCNT -msse3 -mpopcnt -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2 -flto -c -o cuckoo.o cuckoo.cpp g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -Wextra -Wshadow -pedantic -m64 -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_PREFETCH -msse -DUSE_POPCNT -msse3 -mpopcnt -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2 -flto -c -o endgame.o endgame.cpp g++ -Wall -Wcast-qual -fno-exceptions -std=c++17 -Wextra -Wshadow -pedantic -m64 -DUSE_PTHREADS -DNDEBUG -O3 -DIS_64BIT -DUSE_PREFETCH -msse -DUSE_POPCNT -msse3 -mpopcnt -DUSE_SSE41 -msse4.1 -DUSE_SSSE3 -mssse3 -DUSE_SSE2 -msse2 -flto -c -o evaluator.o evaluator.cpp evaluator.cpp: In member function ‘void Evaluator::{anonymous}::Evaluation::initialize()’: evaluator.cpp:364:68: internal compiler error: unexpected expression ‘std::clamp’ of kind overload 364 | std::clamp(sRank(kSq), RANK_2, RANK_7)) }; | ^ Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-9/README.Bugs for instructions. make[1]: [: evaluator.o] Error 1 make[1]: Leaving directory '/home/roelof/Downloads/DON-master/src' make: [Makefile:752: build] Error 2

ehsanrashid commented 3 years ago

@tissatussa please try new version it will compile.

Thanks

tissatussa commented 3 years ago

i still have the error (all my previous config lines are the same) :

Screenshot_2021-04-08_12-30-47

tissatussa commented 3 years ago

sorry, i still have the error .. I have Xubuntu 20.04 and it comes with default gcc version 9.3.0 :

$ gcc --version gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 Copyright (C) 2019 Free Software Foundation, Inc.

on https://ducciogasparri.it/2020/07/30/installing-c17-and-c20-on-ubuntu-and-amazon-linux/ i find it's possible to update gcc to gcc-10, but i have to manually switch libraries .. then i can do c++17 (and c++20 !?) .. so i found https://linuxize.com/post/how-to-install-gcc-on-ubuntu-20-04/ and i used the update-alternatives command .. now my active version is changed indeed :

$ gcc --version gcc (Ubuntu 10.2.0-5ubuntu1~20.04) 10.2.0 Copyright (C) 2020 Free Software Foundation, Inc.

but DON does still not compile, see error below :

Screenshot_2021-04-08_13-29-12

in the DON makefile i also tried to change "-std=c++17" into "-std=c++20" (as the article suggested), but a fatal error remains ..

tissatussa commented 3 years ago

now i have different errors : see attached PDF : don_errors.pdf

ehsanrashid commented 3 years ago

@tissatussa now check the latest code.. it has been fixed

tissatussa commented 3 years ago

=================================

tissatussa commented 3 years ago

At last we managed to compile DON on Linux ! I learned something about different versions of GCC next to eachother ..

ehsanrashid commented 3 years ago

@tissatussa check the latest version i have some new fix also.. hopefully it will compiler for AVX512 also.

thanks

tissatussa commented 3 years ago

how can i receive an automatic message from GitHub when you (or any other GitHub programmer) makes an update to the master ? I clicked the "Follow" button but it does not seem to work .. about any new version : can you give DON some version number ? Now only the date is mentioned with 'uci' command .. Regarding AVX512 : i can not test this, sorry ..

thanks and good luck !

tissatussa commented 3 years ago

hi, i just compiled your 210408 version and let (by using CuteChess) it play against ShashChess, the strongest engine i know (some special SF fork) -- i gave this start FEN to test engines in closed positions :

r1bqkb1r/pp3ppp/2np1n2/2p1p3/4P3/2N3PP/PPPP1PB1/R1BQK1NR w KQkq - 0 6

chess_closed_center_whitetomove

White to move. DON plays Black. The center is closed in an early stage, both players can try a pawn break, but some long term planning is needed : where to develop the pieces ? In this game White offers the Ra1 for Blacks' black-squared Bishop (the 'general') and gets a wild attack with a Knight.

[Event "engine vs engine"] [Site " https://lichess.org/XtJGHXxJ "] [Date "2021.04.08"] [White "ShashChess v15.1 NNUE"] [Black "DON 210408"] [Result "1-0"] [GameDuration "00:37:00"] [PlyCount "93"] [SetUp "1"] [TimeControl "40/900+5"] [FEN "r1bqkb1r/pp3ppp/2np1n2/2p1p3/4P3/2N3PP/PPPP1PB1/R1BQK1NR w KQkq - 0 6"]

  1. Nge2 g6 7. O-O Bg7 8. d3 O-O 9. f4 exf4 10. Bxf4 Nh5 11. Be3 Be5 12. g4 Ng7 13. Nd5 Bxb2 14. c3 Bxa1 15. Nf6+ Kh8 16. Qe1 g5 17. Bxg5 Ne6 18. Bh4 Ne7 19. Qc1 Ng8 20. Qxa1 h6 21. Ng3 Ng5 22. Ngh5 Re8 23. Nxe8 Qxe8 24. Bg3 c4 25. dxc4 Be6 26. Qd1 Nh7 27. Qd4+ f6 28. Bxd6 Rc8 29. c5 b6 30. e5 bxc5 31. Qf4 Qd7 32. exf6 Bf7 33. Ng3 Qe6 34. Ne4 Nf8 35. Qg3 Qe8 36. g5 Ng6 37. gxh6 Rd8 38. Qg5 Kh7 39. h4 Bc4 40. f7 Bxf7 41. h5 Rd7 42. Bf8 Be6 43. Nxc5 Rd6 44. Be4 Bf5 45. Bxf5 Rb6 46. hxg6+ Rxg6 47. Ne4 a6 48. Qxg6+ Qxg6+ 49. Ng5+ Kh8 50. Bxg6 Nxh6 51. Bxh6 a5 52. Rf8# 1-0

also see this video about it, which i made this evening : chess : forget her https://www.bitchute.com/video/5OvdJh1YYzRy/

so DON lost a nice game, but with White it played very well against ShashChess in this position, both engines evaluating 0.00 until around move 40 !