Thanks Uly.Uly wrote:Thanks Jeremy, I have made a sister release thread at Rybka Forum.
Strange Stockfish behavior?
-
- Site Admin
- Posts: 1226
- Joined: Wed Jun 09, 2010 7:49 am
- Real Name: Jeremy Bernstein
- Location: Berlin, Germany
- Contact:
Re: Strange Stockfish behavior?
Re: Strange Stockfish behavior?
When I try to compile the source on Ubuntu 11.04 I get this error:
roy@ubuntu-vm1:~/chess/SF-2.1.1-PA-GTB$ make profile-build ARCH=x86-64
Makefile:1: *** missing separator. Stop.
roy@ubuntu-vm1:~/chess/SF-2.1.1-PA-GTB$
Any suggestions as to what is not quite right?
I downloaded the .7z file and extracted it into its own directory and tried to compile it. The "normal" Stockfish-2.1.1 compiles fine on this system, if that helps point towards anything in particular.
Thanks,
Roy
roy@ubuntu-vm1:~/chess/SF-2.1.1-PA-GTB$ make profile-build ARCH=x86-64
Makefile:1: *** missing separator. Stop.
roy@ubuntu-vm1:~/chess/SF-2.1.1-PA-GTB$
Any suggestions as to what is not quite right?
I downloaded the .7z file and extracted it into its own directory and tried to compile it. The "normal" Stockfish-2.1.1 compiles fine on this system, if that helps point towards anything in particular.
Thanks,
Roy
Re: Strange Stockfish behavior?
Code: Select all
00000000 EF BB BF 23 20 53 74 6F 63 6B 66 69 73 68 2C 20 ...# Stockfish,
Re: Strange Stockfish behavior?
So how do I get rid of those extra bytes? When I delete the first character of the file in vim, it deletes the # in '# Stockfish' ...
I tried deleting that and re-adding the # and recompiling -- same error as before.
I tried deleting that and re-adding the # and recompiling -- same error as before.
Re: Strange Stockfish behavior?
Yeah, I agree it's not easy to handle these strange byte codes with various text editors. Maybe put a newline after the #, then delete all the stuff above it, and re-type the first #. Or just delete the first line -- if you want, you could re-type it, and/or copy/paste this one in its place:
You could also use hexedit and change the first three bytes to 23 23 23 (all # characters).
If you don't build with USE_EGTB, then
Code: Select all
# Stockfish, a UCI chess playing engine derived from Glaurung 2.1
If you don't build with USE_EGTB, then
Code: Select all
search.cpp:433: error: 'UseGaviotaTb' was not declared in this scope
search.cpp:434: error: 'ProbeOnlyAtRoot' was not declared in this scope
-
- Site Admin
- Posts: 1226
- Joined: Wed Jun 09, 2010 7:49 am
- Real Name: Jeremy Bernstein
- Location: Berlin, Germany
- Contact:
Re: Strange Stockfish behavior?
This makefile error is usually the result of spaces in the makefile. Indented lines in makefiles need to start with tab characters. Sorry about that. I haven't actually tried using the makefile since updating the codebase to SF 2.1.1, although I made a couple of changes to it to reflect new and missing files, so I'm sure I introduced this problem. Please let me know if that fixes it, and I'll make that change for the next release.BB+ wrote:There are three "extra" bytes (EF BB BF) prior to the # Stockfish on the first line of the (primary) Makefile. They have something to do with "byte order" and/or identifying UTF-8: http://en.wikipedia.org/wiki/Byte_order_markCode: Select all
00000000 EF BB BF 23 20 53 74 6F 63 6B 66 69 73 68 2C 20 ...# Stockfish,
EDIT: sorry, Mark was right -- one of the issues is the BOM. I've removed it and will get the makefile working properly for BSD.
Jeremy
-
- Site Admin
- Posts: 1226
- Joined: Wed Jun 09, 2010 7:49 am
- Real Name: Jeremy Bernstein
- Location: Berlin, Germany
- Contact:
Re: Strange Stockfish behavior?
Oops. I'll fix that, too. ThanksBB+ wrote:If you don't build with USE_EGTB, thenCode: Select all
search.cpp:433: error: 'UseGaviotaTb' was not declared in this scope search.cpp:434: error: 'ProbeOnlyAtRoot' was not declared in this scope
EDIT: fixed in the source repository.
Jeremy
-
- Site Admin
- Posts: 1226
- Joined: Wed Jun 09, 2010 7:49 am
- Real Name: Jeremy Bernstein
- Location: Berlin, Germany
- Contact:
Re: Strange Stockfish behavior?
Attached is a fixed Makefile. If you want to build with the EGTBs (on by default, otherwise set line 66 in the Makefile to 'no'), you should first build libgtb.a in the egtb directory (the Makefile there is the default for unix -- I have a modified one which works on OSX if you need it) and then run 'make [ARCH]' for stockfish. Works for me here. Sorry again for the inconvenience.
EDIT: fixed makefile is here: viewtopic.php?f=5&t=1234&p=12770#p12770
EDIT: fixed makefile is here: viewtopic.php?f=5&t=1234&p=12770#p12770
Re: Strange Stockfish behavior?
Things are almost there now with the fixed Makefile. However there is an issue with EGTB. I added 'USE EGTB' to my command line for the make command and I get errors about egtb/gtb-probe.h no found. I created symlinks in egtb directory to ../gtb-probe.h (and a couple others if memory serves). However now I get this error:
... <snip> ...
g++ -o stockfish bitboard.o pawns.o material.o endgame.o egtb.o evaluate.o main.o misc.o move.o movegen.o movepick.o search.o position.o tt.o uci.o ucioption.o book.o bitbase.o thread.o benchmark.o timeman.o -L. -lpthread -static-libstdc++ -static-libgcc -lgcov -lgtb
/usr/bin/ld: cannot find -lgtb
collect2: ld returned 1 exit status
make[2]: *** [stockfish] Error 1
make[2]: Leaving directory `/home/roy/chess/SF-2.1.1-PA-GTB'
make[1]: *** [gcc-profile-make] Error 2
make[1]: Leaving directory `/home/roy/chess/SF-2.1.1-PA-GTB'
make: *** [profile-build] Error 2
roy@ubuntu-vm1:~/chess/SF-2.1.1-PA-GTB$
The unhappiness starts with: /usr/bin/ld: cannot find -lgtb
I'm not a Makefile guy and not a git person so pulling the source from the git repository is not something I'm knowledgeable about.
Thanks.
... <snip> ...
g++ -o stockfish bitboard.o pawns.o material.o endgame.o egtb.o evaluate.o main.o misc.o move.o movegen.o movepick.o search.o position.o tt.o uci.o ucioption.o book.o bitbase.o thread.o benchmark.o timeman.o -L. -lpthread -static-libstdc++ -static-libgcc -lgcov -lgtb
/usr/bin/ld: cannot find -lgtb
collect2: ld returned 1 exit status
make[2]: *** [stockfish] Error 1
make[2]: Leaving directory `/home/roy/chess/SF-2.1.1-PA-GTB'
make[1]: *** [gcc-profile-make] Error 2
make[1]: Leaving directory `/home/roy/chess/SF-2.1.1-PA-GTB'
make: *** [profile-build] Error 2
roy@ubuntu-vm1:~/chess/SF-2.1.1-PA-GTB$
The unhappiness starts with: /usr/bin/ld: cannot find -lgtb
I'm not a Makefile guy and not a git person so pulling the source from the git repository is not something I'm knowledgeable about.
Thanks.
-
- Site Admin
- Posts: 1226
- Joined: Wed Jun 09, 2010 7:49 am
- Real Name: Jeremy Bernstein
- Location: Berlin, Germany
- Contact:
Re: Strange Stockfish behavior?
1. cd src/egtbroyb wrote:Things are almost there now with the fixed Makefile. However there is an issue with EGTB. I added 'USE EGTB' to my command line for the make command and I get errors about egtb/gtb-probe.h no found. I created symlinks in egtb directory to ../gtb-probe.h (and a couple others if memory serves). However now I get this error:
... <snip> ...
g++ -o stockfish bitboard.o pawns.o material.o endgame.o egtb.o evaluate.o main.o misc.o move.o movegen.o movepick.o search.o position.o tt.o uci.o ucioption.o book.o bitbase.o thread.o benchmark.o timeman.o -L. -lpthread -static-libstdc++ -static-libgcc -lgcov -lgtb
/usr/bin/ld: cannot find -lgtb
collect2: ld returned 1 exit status
make[2]: *** [stockfish] Error 1
make[2]: Leaving directory `/home/roy/chess/SF-2.1.1-PA-GTB'
make[1]: *** [gcc-profile-make] Error 2
make[1]: Leaving directory `/home/roy/chess/SF-2.1.1-PA-GTB'
make: *** [profile-build] Error 2
roy@ubuntu-vm1:~/chess/SF-2.1.1-PA-GTB$
The unhappiness starts with: /usr/bin/ld: cannot find -lgtb
I'm not a Makefile guy and not a git person so pulling the source from the git repository is not something I'm knowledgeable about.
Thanks.
2. make (this will build the libgtb.a file that you need)
3. cd ..
4. make [ARCH]
that should be all you need to do. You don't need to add USE_EGTB to the command line, but you do have to build the static library libgtb first, and then just run the stockfish makefile. It Should Just Work©.
Jeremy