Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't compile v1.3.2 on Linux #14

Open
tissatussa opened this issue Dec 22, 2023 · 6 comments
Open

can't compile v1.3.2 on Linux #14

tissatussa opened this issue Dec 22, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@tissatussa
Copy link

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
Copy link
Owner

bctboi23 commented Dec 22, 2023

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
Copy link
Owner

bctboi23 commented Dec 24, 2023

#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

@bctboi23 bctboi23 self-assigned this Dec 24, 2023
@bctboi23 bctboi23 added the bug Something isn't working label Dec 24, 2023
@tissatussa
Copy link
Author

tissatussa commented Dec 24, 2023

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
Copy link
Owner

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
Copy link
Author

@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
Copy link
Author

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 !?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants