Comments (6)
As the error message suggest: not a git repository. Did you download it with git clone?
from demolito.
Whoops, I saw the error message but did not "click" what it meant.... I normally just download the .zip and it works.
Anyway, did a git clone, then default makefile produced this:
~/chess/Demolito (master) $ make
clang -march=native -DPEXT -std=gnu11 -DNDEBUG -O3 -flto -Wfatal-errors -Wall -Wextra -Wshadow -DVERSION="2019-11-03" ./src/*.c -o demolito -s -lm -lpthread
./src/bitboard.c:106:12: fatal error: always_inline function '_pext_u64' requires target feature 'bmi2', but would be inlined into function 'slider_index' that is compiled without support for 'bmi2'
return _pext_u64(occ, mask);
^
1 error generated.
make: *** [makefile:20: all] Error 1
So I tried using gcc instead of clang, which produced this:
~/chess/Demolito (master) $ make
gcc -march=native -DPEXT -std=gnu11 -DNDEBUG -O3 -flto -Wfatal-errors -Wall -Wextra -Wshadow -DVERSION="2019-11-03" ./src/.c -o demolito -s -lm -lpthread
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include/immintrin.h:95,
from ./src/bitboard.c:20:
./src/bitboard.c: In function ‘slider_index’:
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include/bmi2intrin.h:76:1: error: inlining failed in call to always_inline ‘_pext_u64’: target specific option mismatch
_pext_u64 (unsigned long long __X, unsigned long long __Y)
^~~~~~~~~
compilation terminated due to -Wfatal-errors.
./src/search.c: In function ‘search_go’:
./src/search.c:617:43: warning: cast between incompatible function types from ‘void ()(Worker )’ {aka ‘void ()(struct )’} to ‘void * ()(void )’ [-Wcast-function-type]
pthread_create(&threads[i], NULL, (void()(void))iterate, &Workers[i]);
^
./src/uci.c: In function ‘go’:
./src/uci.c:146:34: warning: cast between incompatible function types from ‘int64_t ()()’ {aka ‘long int ()()’} to ‘void * ()(void )’ [-Wcast-function-type]
pthread_create(&Timer, NULL, (void()(void*))search_go, NULL);
^
make: *** [makefile:20: all] Error 1
Is this some issue with my system?
Thanks, Ian
from demolito.
march=native tells the compiler to auto detect CPU features. It turns out that your CPU doesn't have BMI2 instructions. That's ok, just remove -DPEXT and it should work. Demolito will use a fallback technique called magic bitboards instead of hardware instruction PEXT to compute attacks for sliding pieces. A bit slower, but still quite fast.
I should probably make my makefile smarter, and do the auto detect there. But with somany architectures, OS, compilers, libc, etc. it's a real pain.
from demolito.
Note that windows compiles are produced automatically with each commit, using appveyor. No need to compile for windows users.
from demolito.
Thanks, compiles and works.
Did produce these errors:
~/chess/Demolito (master) $ make
gcc -march=native -std=gnu11 -DNDEBUG -O3 -flto -Wfatal-errors -Wall -Wextra -Wshadow -DVERSION="2019-11-03" ./src/.c -o demolito -s -lm -lpthread
./src/search.c: In function ‘search_go’:
./src/search.c:617:43: warning: cast between incompatible function types from ‘void ()(Worker )’ {aka ‘void ()(struct )’} to ‘void * ()(void )’ [-Wcast-function-type]
pthread_create(&threads[i], NULL, (void()(void))iterate, &Workers[i]);
^
./src/uci.c: In function ‘go’:
./src/uci.c:146:34: warning: cast between incompatible function types from ‘int64_t ()()’ {aka ‘long int ()()’} to ‘void * ()(void )’ [-Wcast-function-type]
pthread_create(&Timer, NULL, (void()(void*))search_go, NULL);
Cheers, Ian
from demolito.
Yes, I know. These warnings are benign, and related to non standard function pointer casting, which are correct and done with intent.
from demolito.
Related Issues (20)
- fail low HOT 1
- mobility parametrization
- reduce more when eval is deteriorating
- adjust reduction for history HOT 1
- use pthreads directly HOT 1
- possible 'array out of bounds' in eval.c HOT 1
- encode move_is_capture() in move_t
- I am really sorry but i need help HOT 1
- NUMA
- OpenBench HOT 1
- Demolito playing chess variants, Musketeer Chess
- set default compiler to clang in the makefile HOT 1
- Problems compiling on Raspberry Pi 32 bit HOT 2
- (Question) Do you have linux compatible binaries? HOT 1
- Can't Compile with GCC HOT 1
- Artifacts older than 1 month are automatically deleted HOT 1
- Can you build a Korean chess engine? HOT 3
- index 6 out of bounds for type 'int[6]' HOT 4
- Please add ARMv9.2, SVE2, Dot Product and Neon support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from demolito.