lightvector / KataGo

GTP engine and self-play learning in Go
https://katagotraining.org/
Other
3.47k stars 561 forks source link

Could I compile KataGo without Git? #789

Closed HackYardo closed 1 year ago

HackYardo commented 1 year ago

I download a local offline GPTChat, it's heavy and huge, so I want to save my disk space and compile KataGo from .zip, i.e. master.zip, rather than .git. But I get error:

$ make
[  0%] Generating program/gitinfoupdated.h
fatal: not a git repository (or any of the parent directories): .git
make[2]: *** [CMakeFiles/katago.dir/build.make:82: program/gitinfoupdated.h] Error 128
make[2]: *** Deleting file 'program/gitinfoupdated.h'
make[1]: *** [CMakeFiles/Makefile2:94: CMakeFiles/katago.dir/all] Error 2
make: *** [Makefile:103: all] Error 2

Why compile software via git commands? I try to solve it:

$ cd ..
$ git init
$ cd cpp/
$ make
[  0%] Generating program/gitinfoupdated.h
fatal: bad revision 'HEAD'
make[2]: *** [CMakeFiles/katago.dir/build.make:82: program/gitinfoupdated.h] Error 128
make[2]: *** Deleting file 'program/gitinfoupdated.h'
make[1]: *** [CMakeFiles/Makefile2:94: CMakeFiles/katago.dir/all] Error 2
make: *** [Makefile:103: all] Error 2

Could I compile KG without Git?

lightvector commented 1 year ago

Yep, do -DNO_GIT_REVISION=1 when you run cmake.

HackYardo commented 1 year ago

Sorry I didn't see the _GIT_REVISION flag in Compiling.md before. Thanks for your comment.