Life In 19x19 http://www.lifein19x19.com/ |
|
Compile Pachi 11 on Windows http://www.lifein19x19.com/viewtopic.php?f=18&t=12583 |
Page 1 of 1 |
Author: | Hane [ Sun Jan 03, 2016 8:22 pm ] |
Post subject: | Compile Pachi 11 on Windows |
Compile Pachi 11 on Windows If you want to compile Pachi 11 with MinGW on Windows, try to follow these instructions: - download and install mingw32-base and mingw32-pthreads-w32 dev - there is a conflict between unistd.h and pthread.h, which causes the redefinition of 'struct timespec' solution is to find mingw\include\parts\time.h, add #define HAVE_STRUCT_TIMESPEC just after the timespec structure, and arrange #include <unistd.h> and #include <pthread.h> in your header such that #include <unistd.h> is before #include <pthread.h> - for regex.h, I simply comment out the line #include <regex.h> and all the relevant code of regex.h in chat.c - the original Makefile fails, I don't know why, I use my own version of Makefile: NAME=pachi CXX=gcc CXXFLAGS= -O3 -std=gnu99 -frename-registers -pthread -w DEPS=make.dep CXXSRCS=$(wildcard *.c) $(wildcard distributed/*.c) $(wildcard joseki/*.c) $(wildcard montecarlo/*.c) $(wildcard patternplay/*.c) $(wildcard patternscan/*.c) $(wildcard playout/*.c) $(wildcard random/*.c) $(wildcard replay/*.c) $(wildcard tactics/*.c) $(wildcard t-unit/*.c) $(wildcard uct/*.c) $(wildcard uct/policy/*.c) HSRCS=$(wildcard *.h) $(wildcard distributed/*.h) $(wildcard joseki/*.h) $(wildcard montecarlo/*.h) $(wildcard patternplay/*.h) $(wildcard patternscan/*.h) $(wildcard playout/*.h) $(wildcard random/*.h) $(wildcard replay/*.h) $(wildcard tactics/*.h) $(wildcard t-unit/*.h) $(wildcard uct/*.h) $(wildcard uct/policy/*.h) OBJS=$(CXXSRCS:.cpp=.o) .PHONY: all clean all: $(NAME) $(DEPS) $(NAME): $(OBJS) $(CXX) $(CXXFLAGS) -o $@ $^ -lws2_32 -lpthread clean: rm -f *.o make.dep include $(DEPS) make.dep: $(CXXSRCS) $(HSRCS) $(CXX) -MM $(CXXSRCS) > make.dep - with this Makefile you have to setup a correct path for the include files, for example, for those files inside the directory "uct", "tactics" ... you have to change #include "board.h" to #include "../board.h", #include "uct/uct.h" to #include "../uct/uct.h" for those files inside the directory "uct\policy" you have to change #include "board.h" to #include "../../board.h", #include "uct/tree.h" to #include "../../uct/tree.h" - run mingw32-make on Makefile, run Pachi command line options : pachi.exe -d 0 threads=1,pondering=0 |
Author: | Bodhi [ Thu Apr 21, 2016 11:33 am ] |
Post subject: | Re: Compile Pachi 11 on Windows |
Well, the 11.00 Binary for Windows can be downloaded at http://pachi.or.cz/. |
Author: | Sneegurd [ Fri Apr 22, 2016 4:27 am ] |
Post subject: | Re: Compile Pachi 11 on Windows |
Still it is helpful for all reasons why people want to create their own binaries ![]() |
Author: | Bodhi [ Fri Apr 22, 2016 10:12 am ] |
Post subject: | Re: Compile Pachi 11 on Windows |
Sure - I mentioned that just for those who are confusing when trying to compile something by themselve ![]() |
Author: | avysk [ Sat Jun 04, 2016 2:21 am ] |
Post subject: | Re: Compile Pachi 11 on Windows |
I've compiled my own 64-bit version on Windows 10 in a very easy way. The steps are below. 1. Install msys2: https://msys2.github.io/ (when you'll follow the instructions, at some moment you will see the message that you need to change shortcuts for running msys; pay attention and comply!). Do follow instructions to the end! 2. When done, run Mingw64-win64-shell with one of the shortcuts you've just modified. 3. In msys shell install mingw64, for example, like this: pacman -S mingw-w64-x86_64-clang 4. Install make: pacman -S make 5. Install git: pacman -S git 6. Clone pachi sources: git clone https://github.com/pasky/pachi.git 7. Modify Makefile in the sources in the following manner: first, un-comment "WIN=1" line; then add "WIN_HAVE_NO_REGEX_SUPPORT=1" line after it. 8. Run make. It should build perfectly. 9. Now copy built pachi.exe and /mingw64/bin/libwinpthread-1.dll to some directory. 10. Optionally, download book.dat and pattern files, and put them to the same directory. 11. Those I the options I use to run pachi.exe (from Drago): "-d 0 -t 30 -f book.dat threads=2,maximize_score,max_tree_size=3072". Please notice, that with 32 bit version you cannot use so big tree size. Also notice, that if you make it bigger (say 4096) the whole thing just breaks, replying almost instantly with almost random moves ![]() 12. Enjoy! Disclaimer: I've built pachi on Windows before, but in a much more complicated manner which I cannot remember now. With this version I didn't play enough so maybe there are problems lurking somewhere. You're warned. |
Page 1 of 1 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |