jmdha / motsog

1 stars 0 forks source link

can't compile on Linux #1

Closed tissatussa closed 4 months ago

tissatussa commented 4 months ago

see errors below. i tried to include the missing (?!) criterion.h in several ways, but i didn't succeed to compile .. i found the Criterion package and i read its info about how to install & use meson and ninja for that, but i'm confused ..

in fact a Jarlo binary file IS created (72.7 Kb) .. it seems the 'test-runner' isn't really needed ..

anyhow, the UCI output seems strange to me, and Jarlo gives no bestmove. In CuteChess (GUI) it crashes.

can you help ?

[ i'm on Xubuntu 22.04 ]

(base) roelof@roelof-HP-Elite-x2-1012-G2:~/Compiled/Jarlo-master$ cmake .
-- The C compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
-- Could NOT find Criterion (missing: CRITERION_LIBRARY CRITERION_INCLUDE_DIR) 
-- Configuring done (0.2s)
-- Generating done (0.0s)
-- Build files have been written to: /home/roelof/Compiled/Jarlo-master

then :

(base) roelof@roelof-HP-Elite-x2-1012-G2:~/Compiled/Jarlo-master$ make
[  3%] Building C object CMakeFiles/Jarlo.dir/bin/uci.c.o
[  7%] Building C object CMakeFiles/Jarlo.dir/src/chess/attacks.c.o
[ 10%] Building C object CMakeFiles/Jarlo.dir/src/chess/bitboard.c.o
[ 14%] Building C object CMakeFiles/Jarlo.dir/src/chess/board.c.o
[ 17%] Building C object CMakeFiles/Jarlo.dir/src/chess/move.c.o
[ 21%] Building C object CMakeFiles/Jarlo.dir/src/chess/move_gen.c.o
[ 25%] Building C object CMakeFiles/Jarlo.dir/src/chess/perft.c.o
[ 28%] Building C object CMakeFiles/Jarlo.dir/src/chess/position.c.o
[ 32%] Building C object CMakeFiles/Jarlo.dir/src/chess/types.c.o
[ 35%] Building C object CMakeFiles/Jarlo.dir/src/chess/zobrist.c.o
[ 39%] Building C object CMakeFiles/Jarlo.dir/src/search/mcts.c.o
[ 42%] Building C object CMakeFiles/Jarlo.dir/src/search/node.c.o
[ 46%] Linking C executable Jarlo
[ 46%] Built target Jarlo
[ 50%] Building C object CMakeFiles/test_runner.dir/test/test_runner.c.o
/home/roelof/Compiled/Jarlo-master/test/test_runner.c:1:10: fatal error: criterion/criterion.h: No such file or directory
    1 | #include <criterion/criterion.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/test_runner.dir/build.make:76: CMakeFiles/test_runner.dir/test/test_runner.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:111: CMakeFiles/test_runner.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
jmdha commented 4 months ago

Hi,

There seems to have been a bug in memory de allocation that caused a crash. This should be fixed now. The "strange" output is likely because it doesn't have any evaluation, as such the output is not based upon that.

The test runner is simply for test, which you can simply ignore. However, to install Criterion there is a guide on their github https://github.com/Snaipe/Criterion?tab=readme-ov-file#downloads. Which, assuming you XUbuntu is ubuntu based would leave you using

apt-get install libcriterion-dev
tissatussa commented 4 months ago

The "strange" output is likely because it doesn't have any evaluation, as such the output is not based upon that.

thanks for your answer. so Jarlo isn't complete : it seems a UCI engine, but can't be used ? Will you continue development ? Or did you write another engine yet ?

jmdha commented 4 months ago

Jarlo is "complete", and UCI compliable. See example run:

go wtime 1000
info simulations 100 sps 2439 nodes 39942 nps 974195 time 41 score cp 0.123457 pv a2a3
bestmove a2a3

I have another engine called Sunbird. However, I am not currently working on chess engines.

tissatussa commented 4 months ago

I have another engine called Sunbird. However, I am not currently working on chess engines.

well, i tried Sunbird and it plays well in CuteChess .. i see you did a last update on March 11 !?

jmdha commented 4 months ago

Yes?

tissatussa commented 4 months ago

Yes?

https://github.com/jamadaha/Sunbird/pull/16#event-12080229701