Stockfish Compile error

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Sharaf_DG
Posts: 30
Joined: Fri Aug 02, 2013 11:03 am

Stockfish Compile error

Post by Sharaf_DG »

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Windows\System32>d:

D:\>cd D:\Chess\SRC\Master\src

D:\Chess\SRC\Master\src>make clean
rm -f stockfish stockfish.exe *.o .depend *~ core bench.txt *.gcda

D:\Chess\SRC\Master\src>---------------------------
'---------------------------' is not recognized as an internal or external comma
nd,
operable program or batch file.

D:\Chess\SRC\Master\src>Reload
'Reload' is not recognized as an internal or external command,
operable program or batch file.

D:\Chess\SRC\Master\src>---------------------------
'---------------------------' is not recognized as an internal or external comma
nd,
operable program or batch file.

D:\Chess\SRC\Master\src>D:\Chess\SRC\Master\src\Makefile
'D:\Chess\SRC\Master\src\Makefile' is not recognized as an internal or external
command,
operable program or batch file.

D:\Chess\SRC\Master\src>
D:\Chess\SRC\Master\src>This file has been modified by another program.
'This' is not recognized as an internal or external command,
operable program or batch file.

D:\Chess\SRC\Master\src>Do you want to reload it?
'Do' is not recognized as an internal or external command,
operable program or batch file.

D:\Chess\SRC\Master\src>---------------------------
'---------------------------' is not recognized as an internal or external comma
nd,
operable program or batch file.

D:\Chess\SRC\Master\src>Yes No
'Yes' is not recognized as an internal or external command,
operable program or batch file.

D:\Chess\SRC\Master\src>---------------------------
'---------------------------' is not recognized as an internal or external comma
nd,
operable program or batch file.

D:\Chess\SRC\Master\src>make profile-build ARCH=x86-64-modern COMP=mingw
make ARCH=x86-64-modern COMP=mingw config-sanity
make[1]: Entering directory `D:/Chess/SRC/Master/src'

Config:
debug: 'no'
optimize: 'yes'
arch: 'x86_64'
os: 'any'
bits: '64'
prefetch: 'yes'
bsfq: 'yes'
popcnt: 'yes'
sse: 'yes'
pext: 'no'

Flags:
CXX: g++
CXXFLAGS: -Wall -Wcast-qual -fno-exceptions -fno-rtti -Wextra -Wshadow -DNDEBUG
-O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT
LDFLAGS: -static-libstdc++ -static-libgcc

Testing config sanity. If this fails, try 'make help' ...

make[1]: Leaving directory `D:/Chess/SRC/Master/src'

Step 0/4. Preparing for profile build.
make ARCH=x86-64-modern COMP=mingw gcc-profile-prepare
make[1]: Entering directory `D:/Chess/SRC/Master/src'
make ARCH=x86-64-modern COMP=mingw gcc-profile-clean
make[2]: Entering directory `D:/Chess/SRC/Master/src'
make[2]: Leaving directory `D:/Chess/SRC/Master/src'
make[1]: Leaving directory `D:/Chess/SRC/Master/src'

Step 1/4. Building executable for benchmark ...
make ARCH=x86-64-modern COMP=mingw gcc-profile-make
make[1]: Entering directory `D:/Chess/SRC/Master/src'
make ARCH=x86-64-modern COMP=mingw \
EXTRACXXFLAGS='-fprofile-generate' \
EXTRALDFLAGS='-lgcov' \
all
make[2]: Entering directory `D:/Chess/SRC/Master/src'
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o
benchmark.o benchmark.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o
bitbase.o bitbase.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o
bitboard.o bitboard.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o
book.o book.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o
endgame.o endgame.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o
evaluate.o evaluate.cpp
In file included from position.h:26:0,
from endgame.h:26,
from material.h:23,
from evaluate.cpp:27:
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-8; Bitboard = long long unsigned int]':
evaluate.cpp:258:9: required from 'void {anonymous}::init_eval_info(const Posi
tion&, {anonymous}::EvalInfo&) [with Color Us = (Color)0u]'
evaluate.cpp:760:34: required from 'Value {anonymous}::do_evaluate(const Posit
ion&) [with bool Trace = true]'
evaluate.cpp:883:36: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-16; Bitboard = long long unsigned int]':
evaluate.cpp:720:5: required from 'int {anonymous}::evaluate_space(const Posit
ion&, const {anonymous}::EvalInfo&) [with Color Us = (Color)0u]'
evaluate.cpp:795:79: required from 'Value {anonymous}::do_evaluate(const Posit
ion&) [with bool Trace = true]'
evaluate.cpp:883:36: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o
main.o main.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o
material.o material.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o
misc.o misc.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o
movegen.o movegen.cpp
In file included from position.h:26:0,
from movegen.cpp:23:
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-8; Bitboard = long long unsigned int]':
movegen.cpp:127:9: required from 'ExtMove* {anonymous}::generate_pawn_moves(co
nst Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u;
GenType Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:262:5: required from 'ExtMove* {anonymous}::generate_all(const Pos
ition&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u; GenTyp
e Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:357:88: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-9; Bitboard = long long unsigned int]':
movegen.cpp:185:9: required from 'ExtMove* {anonymous}::generate_pawn_moves(co
nst Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u;
GenType Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:262:5: required from 'ExtMove* {anonymous}::generate_all(const Pos
ition&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u; GenTyp
e Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:357:88: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-7; Bitboard = long long unsigned int]':
movegen.cpp:186:9: required from 'ExtMove* {anonymous}::generate_pawn_moves(co
nst Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u;
GenType Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:262:5: required from 'ExtMove* {anonymous}::generate_all(const Pos
ition&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u; GenTyp
e Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:357:88: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o
movepick.o movepick.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o
notation.o notation.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o
pawns.o pawns.cpp
In file included from pawns.cpp:23:0:
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-7; Bitboard = long long unsigned int]':
pawns.cpp:105:5: required from 'Score {anonymous}::evaluate(const Position&, P
awns::Entry*) [with Color Us = (Color)1u]'
pawns.cpp:241:62: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-9; Bitboard = long long unsigned int]':
pawns.cpp:105:5: required from 'Score {anonymous}::evaluate(const Position&, P
awns::Entry*) [with Color Us = (Color)1u]'
pawns.cpp:241:62: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-8; Bitboard = long long unsigned int]':
pawns.cpp:153:13: required from 'Score {anonymous}::evaluate(const Position&,
Pawns::Entry*) [with Color Us = (Color)1u]'
pawns.cpp:241:62: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o
position.o position.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o
search.o search.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o
tbprobe.o tbprobe.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o
thread.o thread.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o
timeman.o timeman.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o
tt.o tt.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o
uci.o uci.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o
ucioption.o ucioption.cpp
g++ -o stockfish benchmark.o bitbase.o bitboard.o book.o endgame.o evaluate.o ma
in.o material.o misc.o movegen.o movepick.o notation.o pawns.o position.o search
.o tbprobe.o thread.o timeman.o tt.o uci.o ucioption.o -lgcov -static-libstdc++
-static-libgcc
make[2]: Leaving directory `D:/Chess/SRC/Master/src'
make[1]: Leaving directory `D:/Chess/SRC/Master/src'

Step 2/4. Running benchmark for pgo-build ...

Position: 1/30

Position: 2/30

Position: 3/30

Position: 4/30

Position: 5/30

Position: 6/30

Position: 7/30

Position: 8/30

Position: 9/30

Position: 10/30

Position: 11/30

Position: 12/30

Position: 13/30

Position: 14/30

Position: 15/30

Position: 16/30

Position: 17/30

Position: 18/30

Position: 19/30

Position: 20/30

Position: 21/30

Position: 22/30

Position: 23/30

Position: 24/30

Position: 25/30

Position: 26/30

Position: 27/30

Position: 28/30

Position: 29/30

Position: 30/30

===========================
Total time (ms) : 30033
Nodes searched : 44589615
Nodes/second : 1484687

Step 3/4. Building final executable ...
make ARCH=x86-64-modern COMP=mingw gcc-profile-use
make[1]: Entering directory `D:/Chess/SRC/Master/src'
make ARCH=x86-64-modern COMP=mingw \
EXTRACXXFLAGS='-fprofile-use' \
EXTRALDFLAGS='-lgcov' \
all
make[2]: Entering directory `D:/Chess/SRC/Master/src'
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o benc
hmark.o benchmark.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o bitb
ase.o bitbase.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o bitb
oard.o bitboard.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o book
.o book.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o endg
ame.o endgame.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o eval
uate.o evaluate.cpp
In file included from position.h:26:0,
from endgame.h:26,
from material.h:23,
from evaluate.cpp:27:
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-8; Bitboard = long long unsigned int]':
evaluate.cpp:258:9: required from 'void {anonymous}::init_eval_info(const Posi
tion&, {anonymous}::EvalInfo&) [with Color Us = (Color)0u]'
evaluate.cpp:760:34: required from 'Value {anonymous}::do_evaluate(const Posit
ion&) [with bool Trace = true]'
evaluate.cpp:883:36: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-16; Bitboard = long long unsigned int]':
evaluate.cpp:720:5: required from 'int {anonymous}::evaluate_space(const Posit
ion&, const {anonymous}::EvalInfo&) [with Color Us = (Color)0u]'
evaluate.cpp:795:79: required from 'Value {anonymous}::do_evaluate(const Posit
ion&) [with bool Trace = true]'
evaluate.cpp:883:36: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o main
.o main.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o mate
rial.o material.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o misc
.o misc.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o move
gen.o movegen.cpp
In file included from position.h:26:0,
from movegen.cpp:23:
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-8; Bitboard = long long unsigned int]':
movegen.cpp:127:9: required from 'ExtMove* {anonymous}::generate_pawn_moves(co
nst Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u;
GenType Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:262:5: required from 'ExtMove* {anonymous}::generate_all(const Pos
ition&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u; GenTyp
e Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:357:88: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-9; Bitboard = long long unsigned int]':
movegen.cpp:185:9: required from 'ExtMove* {anonymous}::generate_pawn_moves(co
nst Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u;
GenType Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:262:5: required from 'ExtMove* {anonymous}::generate_all(const Pos
ition&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u; GenTyp
e Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:357:88: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-7; Bitboard = long long unsigned int]':
movegen.cpp:186:9: required from 'ExtMove* {anonymous}::generate_pawn_moves(co
nst Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u;
GenType Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:262:5: required from 'ExtMove* {anonymous}::generate_all(const Pos
ition&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u; GenTyp
e Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:357:88: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o move
pick.o movepick.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o nota
tion.o notation.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o pawn
s.o pawns.cpp
In file included from pawns.cpp:23:0:
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-7; Bitboard = long long unsigned int]':
pawns.cpp:105:5: required from 'Score {anonymous}::evaluate(const Position&, P
awns::Entry*) [with Color Us = (Color)1u]'
pawns.cpp:241:62: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-9; Bitboard = long long unsigned int]':
pawns.cpp:105:5: required from 'Score {anonymous}::evaluate(const Position&, P
awns::Entry*) [with Color Us = (Color)1u]'
pawns.cpp:241:62: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-8; Bitboard = long long unsigned int]':
pawns.cpp:153:13: required from 'Score {anonymous}::evaluate(const Position&,
Pawns::Entry*) [with Color Us = (Color)1u]'
pawns.cpp:241:62: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o posi
tion.o position.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o sear
ch.o search.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o tbpr
obe.o tbprobe.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o thre
ad.o thread.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o time
man.o timeman.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o tt.o
tt.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o uci.
o uci.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse4.2 -mavx -DUSE_POPCNT -c -o ucio
ption.o ucioption.cpp
g++ -o stockfish benchmark.o bitbase.o bitboard.o book.o endgame.o evaluate.o ma
in.o material.o misc.o movegen.o movepick.o notation.o pawns.o position.o search
.o tbprobe.o thread.o timeman.o tt.o uci.o ucioption.o -lgcov -static-libstdc++
-static-libgcc
make[2]: Leaving directory `D:/Chess/SRC/Master/src'
make[1]: Leaving directory `D:/Chess/SRC/Master/src'

Step 4/4. Deleting profile data ...
make ARCH=x86-64-modern COMP=mingw gcc-profile-clean
make[1]: Entering directory `D:/Chess/SRC/Master/src'
make[1]: Leaving directory `D:/Chess/SRC/Master/src'

D:\Chess\SRC\Master\src>strip stockfish.exe

D:\Chess\SRC\Master\src>
Unusual reporting during compile since "Generalize shift_bb() to handle double pushes" patch
Is this normal/ okay
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Stockfish Compile error

Post by zullil »

Similar under Linux with g++-4.6. The resulting binary runs and produces the correct bench signature, so perhaps this is a harmless warning.

Code: Select all

louis@LZsT5610:~/Documents/Chess/Stockfish/src$ make profile-build ARCH=x86-64-modern
make ARCH=x86-64-modern COMP=gcc config-sanity
make[1]: Entering directory `/home/louis/Documents/Chess/Stockfish/src'

Config:
debug: 'no'
optimize: 'yes'
arch: 'x86_64'
os: 'any'
bits: '64'
prefetch: 'yes'
bsfq: 'yes'
popcnt: 'yes'
sse: 'yes'
pext: 'no'

Flags:
CXX: g++
CXXFLAGS: -Wall -Wcast-qual -fno-exceptions -fno-rtti  -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto
LDFLAGS:  -lpthread -Wall -Wcast-qual -fno-exceptions -fno-rtti  -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto

Testing config sanity. If this fails, try 'make help' ...

make[1]: Leaving directory `/home/louis/Documents/Chess/Stockfish/src'

Step 0/4. Preparing for profile build.
make ARCH=x86-64-modern COMP=gcc gcc-profile-prepare
make[1]: Entering directory `/home/louis/Documents/Chess/Stockfish/src'
make ARCH=x86-64-modern COMP=gcc gcc-profile-clean
make[2]: Entering directory `/home/louis/Documents/Chess/Stockfish/src'
make[2]: Leaving directory `/home/louis/Documents/Chess/Stockfish/src'
make[1]: Leaving directory `/home/louis/Documents/Chess/Stockfish/src'

Step 1/4. Building executable for benchmark ...
make ARCH=x86-64-modern COMP=gcc gcc-profile-make
make[1]: Entering directory `/home/louis/Documents/Chess/Stockfish/src'
make ARCH=x86-64-modern COMP=gcc \
	EXTRACXXFLAGS='-fprofile-generate' \
	EXTRALDFLAGS='-lgcov' \
	all
make[2]: Entering directory `/home/louis/Documents/Chess/Stockfish/src'
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o benchmark.o benchmark.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o bitbase.o bitbase.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o bitboard.o bitboard.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o book.o book.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o endgame.o endgame.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o evaluate.o evaluate.cpp
In file included from position.h:26:0,
                 from endgame.h:26,
                 from material.h:23,
                 from evaluate.cpp:27:
bitboard.h: In function ‘Bitboard shift_bb(Bitboard) [with Square Delta = (Square)-0x00000000000000008, Bitboard = long unsigned int]’:
evaluate.cpp:258:9:   instantiated from ‘void {anonymous}::init_eval_info(const Position&, {anonymous}::EvalInfo&) [with Color Us = (Color)0u]’
evaluate.cpp:760:5:   instantiated from ‘Value {anonymous}::do_evaluate(const Position&) [with bool Trace = true]’
evaluate.cpp:883:36:   instantiated from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In function ‘Bitboard shift_bb(Bitboard) [with Square Delta = (Square)-0x00000000000000010, Bitboard = long unsigned int]’:
evaluate.cpp:720:5:   instantiated from ‘int {anonymous}::evaluate_space(const Position&, const {anonymous}::EvalInfo&) [with Color Us = (Color)0u]’
evaluate.cpp:795:79:   instantiated from ‘Value {anonymous}::do_evaluate(const Position&) [with bool Trace = true]’
evaluate.cpp:883:36:   instantiated from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o main.o main.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o material.o material.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o misc.o misc.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o movegen.o movegen.cpp
In file included from position.h:26:0,
                 from movegen.cpp:23:
bitboard.h: In function ‘Bitboard shift_bb(Bitboard) [with Square Delta = (Square)-0x00000000000000008, Bitboard = long unsigned int]’:
movegen.cpp:127:9:   instantiated from ‘ExtMove* {anonymous}::generate_pawn_moves(const Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u, GenType Type = (GenType)2u, Bitboard = long unsigned int]’
movegen.cpp:262:5:   instantiated from ‘ExtMove* {anonymous}::generate_all(const Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u, GenType Type = (GenType)2u, Bitboard = long unsigned int]’
movegen.cpp:357:88:   instantiated from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In function ‘Bitboard shift_bb(Bitboard) [with Square Delta = (Square)-0x00000000000000009, Bitboard = long unsigned int]’:
movegen.cpp:185:9:   instantiated from ‘ExtMove* {anonymous}::generate_pawn_moves(const Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u, GenType Type = (GenType)2u, Bitboard = long unsigned int]’
movegen.cpp:262:5:   instantiated from ‘ExtMove* {anonymous}::generate_all(const Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u, GenType Type = (GenType)2u, Bitboard = long unsigned int]’
movegen.cpp:357:88:   instantiated from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In function ‘Bitboard shift_bb(Bitboard) [with Square Delta = (Square)-0x00000000000000007, Bitboard = long unsigned int]’:
movegen.cpp:186:9:   instantiated from ‘ExtMove* {anonymous}::generate_pawn_moves(const Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u, GenType Type = (GenType)2u, Bitboard = long unsigned int]’
movegen.cpp:262:5:   instantiated from ‘ExtMove* {anonymous}::generate_all(const Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u, GenType Type = (GenType)2u, Bitboard = long unsigned int]’
movegen.cpp:357:88:   instantiated from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o movepick.o movepick.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o notation.o notation.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o pawns.o pawns.cpp
In file included from pawns.cpp:23:0:
bitboard.h: In function ‘Bitboard shift_bb(Bitboard) [with Square Delta = (Square)-0x00000000000000007, Bitboard = long unsigned int]’:
pawns.cpp:105:5:   instantiated from ‘Score {anonymous}::evaluate(const Position&, Pawns::Entry*) [with Color Us = (Color)1u]’
pawns.cpp:241:62:   instantiated from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In function ‘Bitboard shift_bb(Bitboard) [with Square Delta = (Square)-0x00000000000000009, Bitboard = long unsigned int]’:
pawns.cpp:105:5:   instantiated from ‘Score {anonymous}::evaluate(const Position&, Pawns::Entry*) [with Color Us = (Color)1u]’
pawns.cpp:241:62:   instantiated from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In function ‘Bitboard shift_bb(Bitboard) [with Square Delta = (Square)-0x00000000000000008, Bitboard = long unsigned int]’:
pawns.cpp:153:13:   instantiated from ‘Score {anonymous}::evaluate(const Position&, Pawns::Entry*) [with Color Us = (Color)1u]’
pawns.cpp:241:62:   instantiated from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o position.o position.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o search.o search.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o thread.o thread.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o timeman.o timeman.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o tt.o tt.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o uci.o uci.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o ucioption.o ucioption.cpp
g++ -o stockfish benchmark.o bitbase.o bitboard.o book.o endgame.o evaluate.o main.o material.o misc.o movegen.o movepick.o notation.o pawns.o position.o search.o thread.o timeman.o tt.o uci.o ucioption.o -lgcov -lpthread -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto
make[2]: Leaving directory `/home/louis/Documents/Chess/Stockfish/src'
make[1]: Leaving directory `/home/louis/Documents/Chess/Stockfish/src'

Step 2/4. Running benchmark for pgo-build ...

Position: 1/30

Position: 2/30

Position: 3/30

Position: 4/30

Position: 5/30

Position: 6/30

Position: 7/30

Position: 8/30

Position: 9/30

Position: 10/30

Position: 11/30

Position: 12/30

Position: 13/30

Position: 14/30

Position: 15/30

Position: 16/30

Position: 17/30

Position: 18/30

Position: 19/30

Position: 20/30

Position: 21/30

Position: 22/30

Position: 23/30

Position: 24/30

Position: 25/30

Position: 26/30

Position: 27/30

Position: 28/30

Position: 29/30

Position: 30/30

===========================
Total time (ms) : 30002
Nodes searched  : 49204521
Nodes/second    : 1640041

Step 3/4. Building final executable ...
make ARCH=x86-64-modern COMP=gcc gcc-profile-use
make[1]: Entering directory `/home/louis/Documents/Chess/Stockfish/src'
make ARCH=x86-64-modern COMP=gcc \
	EXTRACXXFLAGS='-fprofile-use' \
	EXTRALDFLAGS='-lgcov' \
	all
make[2]: Entering directory `/home/louis/Documents/Chess/Stockfish/src'
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o benchmark.o benchmark.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o bitbase.o bitbase.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o bitboard.o bitboard.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o book.o book.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o endgame.o endgame.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o evaluate.o evaluate.cpp
In file included from position.h:26:0,
                 from endgame.h:26,
                 from material.h:23,
                 from evaluate.cpp:27:
bitboard.h: In function ‘Bitboard shift_bb(Bitboard) [with Square Delta = (Square)-0x00000000000000008, Bitboard = long unsigned int]’:
evaluate.cpp:258:9:   instantiated from ‘void {anonymous}::init_eval_info(const Position&, {anonymous}::EvalInfo&) [with Color Us = (Color)0u]’
evaluate.cpp:760:5:   instantiated from ‘Value {anonymous}::do_evaluate(const Position&) [with bool Trace = true]’
evaluate.cpp:883:36:   instantiated from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In function ‘Bitboard shift_bb(Bitboard) [with Square Delta = (Square)-0x00000000000000010, Bitboard = long unsigned int]’:
evaluate.cpp:720:5:   instantiated from ‘int {anonymous}::evaluate_space(const Position&, const {anonymous}::EvalInfo&) [with Color Us = (Color)0u]’
evaluate.cpp:795:79:   instantiated from ‘Value {anonymous}::do_evaluate(const Position&) [with bool Trace = true]’
evaluate.cpp:883:36:   instantiated from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o main.o main.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o material.o material.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o misc.o misc.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o movegen.o movegen.cpp
In file included from position.h:26:0,
                 from movegen.cpp:23:
bitboard.h: In function ‘Bitboard shift_bb(Bitboard) [with Square Delta = (Square)-0x00000000000000008, Bitboard = long unsigned int]’:
movegen.cpp:127:9:   instantiated from ‘ExtMove* {anonymous}::generate_pawn_moves(const Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u, GenType Type = (GenType)2u, Bitboard = long unsigned int]’
movegen.cpp:262:5:   instantiated from ‘ExtMove* {anonymous}::generate_all(const Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u, GenType Type = (GenType)2u, Bitboard = long unsigned int]’
movegen.cpp:357:88:   instantiated from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In function ‘Bitboard shift_bb(Bitboard) [with Square Delta = (Square)-0x00000000000000009, Bitboard = long unsigned int]’:
movegen.cpp:185:9:   instantiated from ‘ExtMove* {anonymous}::generate_pawn_moves(const Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u, GenType Type = (GenType)2u, Bitboard = long unsigned int]’
movegen.cpp:262:5:   instantiated from ‘ExtMove* {anonymous}::generate_all(const Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u, GenType Type = (GenType)2u, Bitboard = long unsigned int]’
movegen.cpp:357:88:   instantiated from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In function ‘Bitboard shift_bb(Bitboard) [with Square Delta = (Square)-0x00000000000000007, Bitboard = long unsigned int]’:
movegen.cpp:186:9:   instantiated from ‘ExtMove* {anonymous}::generate_pawn_moves(const Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u, GenType Type = (GenType)2u, Bitboard = long unsigned int]’
movegen.cpp:262:5:   instantiated from ‘ExtMove* {anonymous}::generate_all(const Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u, GenType Type = (GenType)2u, Bitboard = long unsigned int]’
movegen.cpp:357:88:   instantiated from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o movepick.o movepick.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o notation.o notation.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o pawns.o pawns.cpp
In file included from pawns.cpp:23:0:
bitboard.h: In function ‘Bitboard shift_bb(Bitboard) [with Square Delta = (Square)-0x00000000000000007, Bitboard = long unsigned int]’:
pawns.cpp:105:5:   instantiated from ‘Score {anonymous}::evaluate(const Position&, Pawns::Entry*) [with Color Us = (Color)1u]’
pawns.cpp:241:62:   instantiated from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In function ‘Bitboard shift_bb(Bitboard) [with Square Delta = (Square)-0x00000000000000009, Bitboard = long unsigned int]’:
pawns.cpp:105:5:   instantiated from ‘Score {anonymous}::evaluate(const Position&, Pawns::Entry*) [with Color Us = (Color)1u]’
pawns.cpp:241:62:   instantiated from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In function ‘Bitboard shift_bb(Bitboard) [with Square Delta = (Square)-0x00000000000000008, Bitboard = long unsigned int]’:
pawns.cpp:153:13:   instantiated from ‘Score {anonymous}::evaluate(const Position&, Pawns::Entry*) [with Color Us = (Color)1u]’
pawns.cpp:241:62:   instantiated from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o position.o position.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o search.o search.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o thread.o thread.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o timeman.o timeman.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o tt.o tt.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o uci.o uci.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto   -c -o ucioption.o ucioption.cpp
g++ -o stockfish benchmark.o bitbase.o bitboard.o book.o endgame.o evaluate.o main.o material.o misc.o movegen.o movepick.o notation.o pawns.o position.o search.o thread.o timeman.o tt.o uci.o ucioption.o -lgcov -lpthread -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -ansi -pedantic -Wno-long-long -Wextra -Wshadow -DNDEBUG -O3 -fno-tree-pre -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -flto
make[2]: Leaving directory `/home/louis/Documents/Chess/Stockfish/src'
make[1]: Leaving directory `/home/louis/Documents/Chess/Stockfish/src'

Step 4/4. Deleting profile data ...
make ARCH=x86-64-modern COMP=gcc gcc-profile-clean
make[1]: Entering directory `/home/louis/Documents/Chess/Stockfish/src'
make[1]: Leaving directory `/home/louis/Documents/Chess/Stockfish/src'
jpqy
Posts: 550
Joined: Thu Apr 24, 2008 9:31 am
Location: Belgium

Re: Stockfish Compile error

Post by jpqy »

Same here..a lot erros during compiling last source..problem should be already earlier happen..from patch: Generalise shift_bb() to handle double pushes
It makes a compile but will hurt his normal play i think..
Has to be fixed soon i hope!

bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-9; Bitboard = long long unsigned int]':
movegen.cpp:185:9: required from 'ExtMove* {anonymous}::generate_pawn_moves(co
nst Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u;
GenType Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:262:5: required from 'ExtMove* {anonymous}::generate_all(const Pos
ition&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u; GenTyp
e Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:357:88: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-7; Bitboard = long long unsigned int]':
movegen.cpp:186:9: required from 'ExtMove* {anonymous}::generate_pawn_moves(co
nst Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u;
GenType Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:262:5: required from 'ExtMove* {anonymous}::generate_all(const Pos
ition&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u; GenTyp
e Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:357:88: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o movepic
k.o movepick.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o notatio
n.o notation.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o pawns.o
pawns.cpp
In file included from pawns.cpp:23:0:
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-7; Bitboard = long long unsigned int]':
pawns.cpp:105:5: required from 'Score {anonymous}::evaluate(const Position&, P
awns::Entry*) [with Color Us = (Color)1u]'
pawns.cpp:241:62: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-9; Bitboard = long long unsigned int]':
pawns.cpp:105:5: required from 'Score {anonymous}::evaluate(const Position&, P
awns::Entry*) [with Color Us = (Color)1u]'
pawns.cpp:241:62: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-8; Bitboard = long long unsigned int]':
pawns.cpp:153:13: required from 'Score {anonymous}::evaluate(const Position&,
Pawns::Entry*) [with Color Us = (Color)1u]'
pawns.cpp:241:62: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o positio
n.o position.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o search.
o search.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o tbprobe
.o tbprobe.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o thread.
o thread.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o timeman
.o timeman.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o tt.o tt
.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o uci.o u
ci.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-generate -Wextra -Wsha
dow -DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o uciopti
on.o ucioption.cpp
g++ -o stockfish benchmark.o bitbase.o bitboard.o book.o endgame.o evaluate.o ma
in.o material.o misc.o movegen.o movepick.o notation.o pawns.o position.o search
.o tbprobe.o thread.o timeman.o tt.o uci.o ucioption.o -lgcov -static-libstdc++
-static-libgcc
make[2]: Leaving directory `/c/Users/jpqy/Stockfish/Temp/srcR'
make[1]: Leaving directory `/c/Users/jpqy/Stockfish/Temp/srcR'

Step 2/4. Running benchmark for pgo-build ...

Position: 1/30

Position: 2/30

Position: 3/30

Position: 4/30

Position: 5/30

Position: 6/30

Position: 7/30

Position: 8/30

Position: 9/30

Position: 10/30

Position: 11/30

Position: 12/30

Position: 13/30

Position: 14/30

Position: 15/30

Position: 16/30

Position: 17/30

Position: 18/30

Position: 19/30

Position: 20/30

Position: 21/30

Position: 22/30

Position: 23/30

Position: 24/30

Position: 25/30

Position: 26/30

Position: 27/30

Position: 28/30

Position: 29/30

Position: 30/30

===========================
Total time (ms) : 30122
Nodes searched : 21673147
Nodes/second : 719512

Step 3/4. Building final executable ...
make ARCH=x86-64-modern COMP=mingw gcc-profile-use
make[1]: Entering directory `/c/Users/jpqy/Stockfish/Temp/srcR'
make ARCH=x86-64-modern COMP=mingw \
EXTRACXXFLAGS='-fprofile-use' \
EXTRALDFLAGS='-lgcov' \
all
make[2]: Entering directory `/c/Users/jpqy/Stockfish/Temp/srcR'
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o benchmark.o
benchmark.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o bitbase.o bi
tbase.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o bitboard.o b
itboard.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o book.o book.
cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o endgame.o en
dgame.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o evaluate.o e
valuate.cpp
In file included from position.h:26:0,
from endgame.h:26,
from material.h:23,
from evaluate.cpp:27:
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-8; Bitboard = long long unsigned int]':
evaluate.cpp:258:9: required from 'void {anonymous}::init_eval_info(const Posi
tion&, {anonymous}::EvalInfo&) [with Color Us = (Color)0u]'
evaluate.cpp:760:34: required from 'Value {anonymous}::do_evaluate(const Posit
ion&) [with bool Trace = true]'
evaluate.cpp:883:36: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-16; Bitboard = long long unsigned int]':
evaluate.cpp:720:5: required from 'int {anonymous}::evaluate_space(const Posit
ion&, const {anonymous}::EvalInfo&) [with Color Us = (Color)0u]'
evaluate.cpp:795:79: required from 'Value {anonymous}::do_evaluate(const Posit
ion&) [with bool Trace = true]'
evaluate.cpp:883:36: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o main.o main.
cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o material.o m
aterial.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o misc.o misc.
cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o movegen.o mo
vegen.cpp
In file included from position.h:26:0,
from movegen.cpp:23:
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-8; Bitboard = long long unsigned int]':
movegen.cpp:127:9: required from 'ExtMove* {anonymous}::generate_pawn_moves(co
nst Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u;
GenType Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:262:5: required from 'ExtMove* {anonymous}::generate_all(const Pos
ition&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u; GenTyp
e Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:357:88: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-9; Bitboard = long long unsigned int]':
movegen.cpp:185:9: required from 'ExtMove* {anonymous}::generate_pawn_moves(co
nst Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u;
GenType Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:262:5: required from 'ExtMove* {anonymous}::generate_all(const Pos
ition&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u; GenTyp
e Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:357:88: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-7; Bitboard = long long unsigned int]':
movegen.cpp:186:9: required from 'ExtMove* {anonymous}::generate_pawn_moves(co
nst Position&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u;
GenType Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:262:5: required from 'ExtMove* {anonymous}::generate_all(const Pos
ition&, ExtMove*, Bitboard, const CheckInfo*) [with Color Us = (Color)1u; GenTyp
e Type = (GenType)2u; Bitboard = long long unsigned int]'
movegen.cpp:357:88: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o movepick.o m
ovepick.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o notation.o n
otation.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o pawns.o pawn
s.cpp
In file included from pawns.cpp:23:0:
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-7; Bitboard = long long unsigned int]':
pawns.cpp:105:5: required from 'Score {anonymous}::evaluate(const Position&, P
awns::Entry*) [with Color Us = (Color)1u]'
pawns.cpp:241:62: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-9; Bitboard = long long unsigned int]':
pawns.cpp:105:5: required from 'Score {anonymous}::evaluate(const Position&, P
awns::Entry*) [with Color Us = (Color)1u]'
pawns.cpp:241:62: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
bitboard.h: In instantiation of 'Bitboard shift_bb(Bitboard) [with Square Delta
= (Square)-8; Bitboard = long long unsigned int]':
pawns.cpp:153:13: required from 'Score {anonymous}::evaluate(const Position&,
Pawns::Entry*) [with Color Us = (Color)1u]'
pawns.cpp:241:62: required from here
bitboard.h:135:42: warning: left shift count is negative [enabled by default]
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o position.o p
osition.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o search.o sea
rch.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o tbprobe.o tb
probe.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o thread.o thr
ead.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o timeman.o ti
meman.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o tt.o tt.cpp
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o uci.o uci.cp
p
g++ -Wall -Wcast-qual -fno-exceptions -fno-rtti -fprofile-use -Wextra -Wshadow -
DNDEBUG -O3 -DIS_64BIT -msse -DUSE_BSFQ -msse3 -DUSE_POPCNT -c -o ucioption.o
ucioption.cpp
g++ -o stockfish benchmark.o bitbase.o bitboard.o book.o endgame.o evaluate.o ma
in.o material.o misc.o movegen.o movepick.o notation.o pawns.o position.o search
.o tbprobe.o thread.o timeman.o tt.o uci.o ucioption.o -lgcov -static-libstdc++
-static-libgcc
make[2]: Leaving directory `/c/Users/jpqy/Stockfish/Temp/srcR'
make[1]: Leaving directory `/c/Users/jpqy/Stockfish/Temp/srcR'

Step 4/4. Deleting profile data ...
make ARCH=x86-64-modern COMP=mingw gcc-profile-clean
make[1]: Entering directory `/c/Users/jpqy/Stockfish/Temp/srcR'
make[1]: Leaving directory `/c/Users/jpqy/Stockfish/Temp/srcR'

C:\Users\jpqy\Stockfish\Temp\srcR>
BeyondCritics
Posts: 396
Joined: Sat May 05, 2012 2:48 pm
Full name: Oliver Roese

Re: Stockfish Compile error

Post by BeyondCritics »

High quality code is generally warning free.

Moreover: negative shift counts are "undefined" in C/C++, the developers better clean that up.

Discussions about low level stockfish technicalities do not really belong into this forum i think, you can report such incidents regularly here:
http://support.stockfishchess.org/
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Stockfish Compile error

Post by zullil »

No warning with icc, though I didn't check which warnings (if any) were suppressed using compiler flags.
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Stockfish Compile error

Post by Sven »

I think the problem of Marco's original patch (which he reverted in the meantime due to the reported compiler warnings) may have come from applying the unary minus operator to an enumeration value in the expression "-Delta" (function shift_bb). Although the compiler should always use an unsigned type to represent an enumeration type with negative enumerators (as given in case of the "Square" enum), specific compilers seem to emit a warning in such cases, maybe to draw attention on the unary minus. The drawback of unary minus for enums is that you need to ensure that all positive enumerators of the enumeration type have a corresponding negative enumerator with exactly the negated value, and vice versa, otherwise the result may be UB. I don't know whether compilers check that in general but at least the "Square" enum type of SF does not match that condition due to the SQ_xxx constants (e.g. -SQ_A1 is not part of the "Square" type).

The following might be an improvement for the shift_bb function. It separates the three problems of negating a square delta, generalized shifting, and bitboard shifting with the appropriate masking of a/h file squares into three different functions. It also avoids magic numbers in the code. Marco won't like it since I did not run a test :-)

Code: Select all

template <Square Delta>
inline unsigned int neg_delta&#40;) &#123;
    switch &#40;Delta&#41; &#123;
        case DELTA_S&#58;   return DELTA_N;
        case DELTA_W&#58;   return DELTA_E;
        case DELTA_SE&#58;  return DELTA_NW;
        case DELTA_SS&#58;  return DELTA_NN;
        case DELTA_SW&#58;  return DELTA_NE;
    &#125;
&#125;

// generic shift left operation
template <typename T, Square Delta>
inline T & shift_left&#40;T const & arg&#41; &#123;
    return &#40;Delta < 0&#41; ? &#40;arg >> neg_delta<Delta>()) &#58; &#40;arg << Delta&#41;;
&#125;

// bitboard shift by a delta from a predefined set
template <Square Delta>
inline Bitboard shift_bb&#40;Bitboard b&#41; &#123;
    return &#40;Delta == DELTA_NE || Delta == DELTA_E || Delta == DELTA_SE&#41; ? shift_left<Bitboard, Delta>&#40;b & ~FileHBB&#41; &#58;
           &#40;Delta == DELTA_NW || Delta == DELTA_W || Delta == DELTA_SW&#41; ? shift_left<Bitboard, Delta>&#40;b & ~FileABB&#41; &#58;
                                                                          shift_left<BitBoard, Delta>&#40;b&#41;;
&#125;