dshawul / Scorpio

Scorpio chess engine
Other
84 stars 18 forks source link

impossible to compile the last source code #13

Closed chris13300 closed 3 years ago

chris13300 commented 5 years ago

System : Win7 Pro 64 SP1, Xeon E5-1650v4, when i try this : C:\Users\xxxx\Scorpio\src>make COMP=win

I get that :

make ..\bin\scorpio strip make[1]: Entering directory `/c/Users/xxxxx/Scorpio/src' x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o attack.o attack.cpp x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o scorpio.o scorpio.cpp x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o eval.o eval.cpp x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o hash.o hash.cpp x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o moves.o moves.cpp x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o parallel.o parallel.cpp x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o probe.o probe.cpp x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o search.o search.cpp x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o mcts.o mcts.cpp mcts.cpp: In static member function 'static Node Node::Random_select(Node)': mcts.cpp:397:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] mcts.cpp: In static member function 'static Node Node::Best_select(Node, bool)': mcts.cpp:437:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o see.o see.cpp x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o magics.o magics.cpp x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o util.o util.cpp util.cpp: In member function 'void SEARCHER::print_pv(int)': util.cpp:467:24: warning: unknown conversion type character 'l' in format [-Wformat] util.cpp:467:24: warning: format '%d' expects argument of type 'int', but argument 6 has type 'long long int' [-Wformat]

util.cpp:467:24: warning: too many arguments for format [-Wformat-extra-args] util.cpp:472:28: warning: unknown conversion type character 'l' in format [-Wformat] util.cpp:472:28: warning: too many arguments for format [-Wformat-extra-args] x86_64-w64-mingw32-g++ -o ..\bin\scorpio attack.o scorpio.o eval.o hash.o moves.o parallel.o probe.o search.o mcts.o see .o magics.o util.o -lpthread -lm -static x86_64-w64-mingw32-strip ..\bin\scorpio make[1]: x86_64-w64-mingw32-strip: Command not found make[1]: [strip] Error 127 make[1]: Leaving directory `/c/Users/xxxx/Scorpio/src' make: [default] Error 2

dshawul commented 5 years ago

I think it built a binary for you, but it was not able to strip debugging code from binary because you do not have the strip tool installed.

chris13300 commented 5 years ago

I would like to test scorpio with my cluster (6 PCs, 80 Threads, win7, 64 bits) but i don't find it in the releases and i don't manage to compile the source with COMP=win nor COMP=gcc nor others. In the other hand, i have no problem with Texel Cluster (ms-mpi v7) or Toga Cluster (mpich2 v1.4). Could you add a mpich2 compile in the next releases ?

dshawul commented 5 years ago

To compile for a cluster try "-cluster" suffixes such as COMP=gcc-cluster or COMP=icpc-cluster. Look at the src/Makefile to see how to modify it for other compilers. I will try to add cluster compiles in the next release.

chris13300 commented 5 years ago

Don't understand why i can compile sources code of others chess engines but not scorpio 's. Yes, i will wait for the cluster compiles...

chris13300 commented 5 years ago

After update of mingw w64 to gcc 8.1 :

C:\Users\xxxxx\Scorpio\src>make COMP=win make ..\bin\scorpio strip make[1]: Entering directory /c/Users/xxxxx/Scorpio/src' x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o attack.o attack.cpp x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o scorpio.o scorpio.cpp x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o eval.o eval.cpp x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o hash.o hash.cpp hash.cpp: In static member function 'static void PROCESSOR::clear_hash_tables()': hash.cpp:46:81: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct tagPAWNHASH'; use assignment or value-initialization instead [-Wclass-memaccess] memset(proc->pawn_hash_tab,0,(pawn_hash_tab_mask + 1) * sizeof(PAWNHASH)); ^ In file included from hash.cpp:1: scorpio.h:351:16: note: 'struct tagPAWNHASH' declared here typedef struct tagPAWNHASH { ^~~~~~~~~~~ x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o moves.o moves.cpp x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o parallel.o parallel.cpp x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o probe.o probe.cpp x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o search.o search.cpp x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o mcts.o mcts.cpp x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o see.o see.cpp x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o magics.o magics.cpp x86_64-w64-mingw32-g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-u nused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-poin ter -flto -DPARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -D BOOK_CREATE -DEGBB -c -o util.o util.cpp x86_64-w64-mingw32-g++ -o ..\bin\scorpio attack.o scorpio.o eval.o hash.o moves.o parallel.o probe.o search.o mcts.o see .o magics.o util.o -lpthread -lm -static x86_64-w64-mingw32-strip ..\bin\scorpio make[1]: x86_64-w64-mingw32-strip: Command not found make[1]: *** [strip] Error 127 make[1]: Leaving directory/c/Users/xxxxx/Scorpio/src' make: *** [default] Error 2

dshawul commented 5 years ago

Again you don't have the strip command, i.e. x86_64-w64-mingw32-strip, installed but it has built the binary for you. If you are planning to compile for cluster do a "make COMP=gcc-cluster" under mysys or cygwin which have gcc. If you want just the standard binaries, you are better of using what is already provided as download

chris13300 commented 5 years ago

yes the binary exist but it crashes immediately at start. yes i am planning to use scorpio for cluster but you didn't add cluster binary in release section so users have to endure compilation torture to obtain cluster binary. yes i don't see any x86_64-w64-mingw32-strip.exe and i don't know why all others x86_64-w64-mingw32 commands exist here.

chris13300 commented 5 years ago

So if we install mingw64 from the soundforge packages, the command x86_64-w64-mingw32-strip.exe is missing. You have to use cygwin then select the packages mingw64, gcc, make.

From there, make COMP = win goes to the end but scorpio.exe crashes anyway. I tried make COMP = gcc but I have the following error :

C:\Downloads\Scorpio-3.0\src>make COMP=gcc make ../bin/scorpio strip make[1]: Entering directory '/cygdrive/c/Downloads/Scorpio-3.0/src' g++ -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-unused-result -Wno- unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-pointer -flto -DPARALL EL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -DBOOK_CREATE -DEGBB -c -o attack.o attack.cpp In file included from scorpio.h:48:0, from attack.cpp:1: my_types.h:43:14: fatal error: sys/syscall.h: No such file or directory

include <sys/syscall.h>

          ^~~~~~~~~~~~~~~

compilation terminated. make[1]: [Makefile:207: attack.o] Error 1 make[1]: Leaving directory '/cygdrive/c/Downloads/Scorpio-3.0/src' make: [Makefile:171: default] Error 2

Another try with COMP=gcc-cluster and the same error :

C:\Downloads\Scorpio-3.0\src>make COMP=gcc-cluster make ../bin/scorpio strip make[1]: Entering directory '/cygdrive/c/Downloads/Scorpio-3.0/src' "mpic++" -Wall -fstrict-aliasing -fno-exceptions -fno-rtti -Wno-unused-variable -Wno-unused-result -Wno-unused-result -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-psabi -std=c++11 -msse -Ofast -fomit-frame-pointer -flto -DP ARALLEL -DARC_64BIT -DHAS_POPCNT -DHAS_PREFETCH -DUSE_SPINLOCK -DTHREAD_POLLING -DLOG_FILE -DBOOK_PROBE -DBOOK_CREATE -D EGBB -DCLUSTER -c -o attack.o attack.cpp In file included from scorpio.h:48:0, from attack.cpp:1: my_types.h:43:14: fatal error: sys/syscall.h: No such file or directory

include <sys/syscall.h>

          ^~~~~~~~~~~~~~~

compilation terminated. make[1]: [Makefile:207: attack.o] Error 1 make[1]: Leaving directory '/cygdrive/c/Downloads/Scorpio-3.0/src' make: [Makefile:171: default] Error 2

It's really a hell to compile this source code