Open LocutusOfPenguin opened 7 years ago
Something else: Trying to compile Laser for Raspberry, doesnt work (out of the box). I get following error: syzygy/tbcore.c:393:1: error: narrowing conversion of ‘-1’ from ‘int’ to ‘char’ inside { } [-Wnarrowing] };
I changed "char" to "short" , and then this link error happening:
arm-linux-gnueabihf-gcc -O3 -flto -o laser bbinit.o board.o common.o eval.o evalhash.o hash.o search.o moveorder.o syzygy/tbprobe.o uci.o -lpthread /tmp/ccSJxa7x.s: Assembler messages: /tmp/ccSJxa7x.s:999: Error: Ungültige Anweisung »bsfq r2,r4« /tmp/ccSJxa7x.s:1142: Error: Ungültige Anweisung »bsfq r2,r4« lto-wrapper: fatal error: arm-linux-gnueabihf-gcc returned 1 exit status compilation terminated. /usr/lib/gcc-cross/arm-linux-gnueabihf/5/../../../../arm-linux-gnueabihf/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status Makefile:30: die Regel für Ziel „uci“ scheiterte make: *** [uci] Fehler 1
Im using a cross compiler from x86_64 to arm (ubuntu) but my friend on a Rasp (=directly) has similar problems.
Hi, Unfortunately, 960 will not be available for a while. I have been too busy to write such a large amount of code, and I plan on doing pondering before 960 support. I would say this December at the earliest.
For the compilation error, I have never tried compiling with anything other than MinGW, but the error probably comes from the inline assembly in common.cpp. Perhaps changing this to gcc intrinsics or setting USE_INLINE_ASM = false in common.h would help, at the cost of some NPS.
Hi Jeff, thanks for yr comments on UCI960!
for ubuntu (& its gcc), it works ...but not when i tried it on a raspberrypi. I changed the USE_INILINE_ASM = false , as you suggested, and i works now (as far i see).
What about this "char => short" change from me (see above)? If i do this, this narrow error disappears. Also there are warnings for KNOWN_WIN, TB_WIN (eval.h) => unused var
Jürgen
The offdiag array is actually from Ronald de Man's Syzygy code, but there should be no harm in changing char to short (or int).
I can't really explain the warnings, as KNOWN_WIN is used in eval.cpp and TB_WIN is used in search.cpp. Do the unused warnings stay even when all other warnings and errors are gone? Sometimes gcc gives unused warnings for const variables that are derived from other const variables (in this case both are derived from PIECE_VALUES[EG][PAWNS]) when it cannot complete the compilation.
This is on a RaspberryPi3 (your files - not changed):
make g++ -c -Wall -ansi -pedantic -std=c++11 -O3 -flto -x c++ bbinit.cpp -o bbinit.o g++ -c -Wall -ansi -pedantic -std=c++11 -O3 -flto -x c++ board.cpp -o board.o In file included from board.cpp:25:0: eval.h:69:11: warning: ‘KNOWN_WIN’ defined but not used [-Wunused-variable] const int KNOWN_WIN = PIECE_VALUES[EG][PAWNS] 75; ^ eval.h:70:11: warning: ‘TB_WIN’ defined but not used [-Wunused-variable] const int TB_WIN = PIECE_VALUES[EG][PAWNS] 125; ^ g++ -c -Wall -ansi -pedantic -std=c++11 -O3 -flto -x c++ common.cpp -o common.o g++ -c -Wall -ansi -pedantic -std=c++11 -O3 -flto -x c++ eval.cpp -o eval.o In file included from eval.cpp:25:0: eval.h:70:11: warning: ‘TB_WIN’ defined but not used [-Wunused-variable] const int TB_WIN = PIECE_VALUES[EG][PAWNS] 125; ^ g++ -c -Wall -ansi -pedantic -std=c++11 -O3 -flto -x c++ evalhash.cpp -o evalhash.o g++ -c -Wall -ansi -pedantic -std=c++11 -O3 -flto -x c++ hash.cpp -o hash.o g++ -c -Wall -ansi -pedantic -std=c++11 -O3 -flto -x c++ search.cpp -o search.o In file included from search.cpp:27:0: eval.h:69:11: warning: ‘KNOWN_WIN’ defined but not used [-Wunused-variable] const int KNOWN_WIN = PIECE_VALUES[EG][PAWNS] 75; ^ g++ -c -Wall -ansi -pedantic -std=c++11 -O3 -flto -x c++ moveorder.cpp -o moveorder.o g++ -c -Wall -ansi -pedantic -std=c++11 -O3 -flto -x c++ syzygy/tbprobe.cpp -o syzygy/tbprobe.o In file included from syzygy/tbprobe.cpp:44:0: syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] }; ^ syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] syzygy/tbcore.c:393:1: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘const char’ inside { } [-Wnarrowing] In file included from syzygy/tbprobe.cpp:32:0: syzygy/../eval.h:69:11: warning: ‘KNOWN_WIN’ defined but not used [-Wunused-variable] const int KNOWN_WIN = PIECE_VALUES[EG][PAWNS] 75; ^ g++ -c -Wall -ansi -pedantic -std=c++11 -O3 -flto -x c++ uci.cpp -o uci.o In file included from uci.cpp:31:0: eval.h:69:11: warning: ‘KNOWN_WIN’ defined but not used [-Wunused-variable] const int KNOWN_WIN = PIECE_VALUES[EG][PAWNS] 75; ^ eval.h:70:11: warning: ‘TB_WIN’ defined but not used [-Wunused-variable] const int TB_WIN = PIECE_VALUES[EG][PAWNS] * 125; ^ g++ -O3 -flto -o laser bbinit.o board.o common.o eval.o evalhash.o hash.o search.o moveorder.o syzygy/tbprobe.o uci.o -lpthread
when i fix the "tbcore.c" (short) these errors vanish..the others stay. This is NOT with ubunu, only with rasp.
You can simply ignore it, if y want..I just mentioned its not everywhere perfect. After all, this issue is for "uci960" :-)
Hi Jeff,
Thanks for #6 ! I'll include yr engine in my next picochess release.
for compile your newest code on raspPi (arm) i need to change this inline flag, and this tbcore stuff. Perhaps its interesting to see this: http://talkchess.com/forum/viewtopic.php?p=738162&highlight=#738162
Jürgen
Hello, im looking around for different uci engines for the project "picochess", which is also part of these DGT Pi chess clocks. Mainly, im searching for engines with UCI960 support and/or Levels.
Now: Your side saying "todo uci960" ...can y tell me if that's planed in near future, and if yes when this can be expected? Also what about level support (similar to SF).
Jürgen