BimmerBass / Loki

C++17 chess engine
GNU General Public License v3.0
9 stars 2 forks source link

compile errors, but solved ! #35

Open tissatussa opened 2 years ago

tissatussa commented 2 years ago

at first i was unable to compile your v3.5.0 source code by 'make' .. [ using GCC version "Ubuntu 9.3.0-17ubuntu1~20.04" ]

so, i download your asset binary for linux and it works !

here's part of my terminal output when doing 'make' :

Loki_v3 5 0_make_errors

fortunately i was able to correct your code : the message says "did you forgot to '#include <cstddef>'", so i added that line to evaltable.h .. then compiling went OK without errors : i got a valid binary ! (size 342.5 KiB opposed to asset binary size 277.3 KiB) .. compiling only gave 1 warning, apparently corrected by GCC :

Loki_v3 5 0_make_warning

I'm happy i can run Loki in CuteChess !

I want to point out some other issues of your code (being minor though) :

ifeq ($(debug), no) # Set debug mode CXXFLAGS += -DNDEBUG endif

This is unclear to me .. i'm a coder but not a cpp programmer .. the option '-DNDEBUG' should be added when debug is no ? I changed this into yes (but no apparent difference in terminal output).

BimmerBass commented 2 years ago

Thank you for opening this issue! I haven't been working on Loki for a while, but this will be fixed when I get back to it.

Since Loki has been developed on Windows 10, I haven't really tested its compatibility with Linux. I have been informed that version 3.5 works on Ubuntu since it needed to, to be able to run on an OpenBench server, but I don't know about the current development version. I think the problem you were experiencing could also be fixed by adding #include <cstdint> to defs.h, but I will try your solution as well. The last warning you received doesn't actually matter since it's only used in a debugging method.

Regarding your other issues:

tissatussa commented 2 years ago

could also be fixed by adding #include <cstdint> to defs.h

NO ! I tried it, but this does not solve the error .. however, adding #include <cstddef> to evaltable.h DOES help ! Thanks and good luck !

Lecrapouille commented 2 years ago

The fix is to add #include <cstddef> solves for me on Linux Debian :)