bctboi23 / CeeChess

UCI / Xboard compliant chess engine written in C
6 stars 1 forks source link

can't compile v1.3.2 on Linux #14

Open tissatussa opened 10 months ago

tissatussa commented 10 months ago

i get an error when compiling on Linux (i'm on Xubuntu 22.04) .. here's the terminal log :

$ make linux
gcc xboard.c CeeChess.c uci.c evaluate.c eval.h pvtable.c init.c bitboards.c hashkeys.c board.c data.c attack.c io.c movegen.c validate.c makemove.c perft.c search.c misc.c -o CeeChess-v1.3.2.exe -O3 -s -lm
/usr/bin/ld: /tmp/cc2Eie1i.o: in function `Console_Loop':
xboard.c:(.text+0x1040): undefined reference to `TuneEval'
collect2: error: ld returned 1 exit status
make: *** [makefile:6: linux] Error 1

it seems a simple problem, some functions / files are not included .. i tried to fix it, but i didn't succeed - i'm not into C though ..

i hope you can fix this, or explain how to solve this error on linux. btw. the makefile shows another version number for the windows .exe !?

bctboi23 commented 10 months ago

Sorry, this is currently because I’m doing some testing with the tuning method I’m using. I’m working on implementing BFGS rather than simple hill climbing, but I pushed the hill climbing code in case my BFGS implementation doesn’t work as I hope. I’ll push a fix for the makefile in a day or two, just getting back into this stuff!

a quick fix should be adding tuning.c to the list of C files in the gcc command, for the next update the makefile will do this automatically

bctboi23 commented 10 months ago

15 Should fix, let me know if you have any issues compiling with the new makefile. You should now be able to compile from the main directory using make alone, and the executable will be in the \bin directory. ~You will need to run make clean before remaking every time you modify a source file (modifications are not automatically detected for some reason, not sure why yet)~ This was an issue with the way I handled object files, this is no longer an issue

tissatussa commented 10 months ago

indeed the new makefile works on Linux, but i had to edit a minor detail : the folder-file seperator is for Windows ("\") but on Linux this should be "/" .. i remember i've seen a certain construct for this, to make it work on both OS, i guess you'll find it ..

another thing : the UCI command shows v1.3 but the compiled binary is called "CeeChess-v1.4.5.10-linux" (99 Kb).

bctboi23 commented 8 months ago

Sorry about the turnaround time on this issue, but v1.4 is coming out with a large increase in elo + some bugfixes, and the linux compile should work properly. I will test in a VM tomorrow to be sure, let me know if you have any compilation issues

tissatussa commented 8 months ago

@bctboi23 indeed your new 1.4 (pre-release) source code can be compiled on my Linux without errors, and the binary (size about 100 Kb) runs fine in CuteChess. I only get a few warnings during compilation. Here's a ZIPped log text from terminal, using my gcc (default) v11, along gcc-13 (the only change i did in the makefile) : compile-warnings.zip

tissatussa commented 8 months ago

i let v1.4 (pre-release) play a game with BitFoot v1.0 (rating 2400+) .. on the concerning GitHub page the author explains some about bitboards and how he used them, see https://github.com/zd3nik/Bitfoot .. i stumbled upon this, maybe it can help you !?