Ok got it. I prefer PM because I don't want to look "silly", with my dump questions..
I've downloaded android-ndk-r20b-windows-x86_64, unzipped it, and rename the folder to "0", so directory is now "D:\Downloads\0".petero2 wrote: ↑Sun Jul 26, 2020 9:18 am but here are some more things I found out:
I also got crashes when using NDK r21d, so I used version r20b instead. I suspect this is related to the -fopenmp flag and I also suspect you only need this flag to run the training code, but I have not tested this.
For recent NDK versions you no longer need to create a standalone toolchain. You can run the compiler directly from the bin directory created when unpacking the NDK zip file, e.g. something like d:\android-ndk-r20b\toolchains\llvm\prebuilt\windows_something\bin. It may still work to create a standalone toolchain though, I have not tested that.
You don't need to change the Makefile when using your bat file because it is invoking the compiler directly so the Makefile is not used.
First i created standalone toolchain, it didn't work, i got this errors.
Code: Select all
Generating 64 bit engine for ARM-Android.
C:\Users\User\AppData\Local\Temp\lto-llvm-f2f5b6.o: In function `Eval::NNUE::Fea
tureTransformer::RefreshAccumulator(Position const&) const':
ld-temp.o:(.text._ZNK4Eval4NNUE18FeatureTransformer18RefreshAccumulatorERK8Posit
ion[_ZNK4Eval4NNUE18FeatureTransformer18RefreshAccumulatorERK8Position]+0x40): u
ndefined reference to `Eval::NNUE::Features::HalfKP<(Eval::NNUE::Features::Side)
0>::AppendActiveIndices(Position const&, Color, Eval::NNUE::Features::IndexList*
)'
ld-temp.o:(.text._ZNK4Eval4NNUE18FeatureTransformer18RefreshAccumulatorERK8Posit
ion[_ZNK4Eval4NNUE18FeatureTransformer18RefreshAccumulatorERK8Position]+0x50): u
ndefined reference to `Eval::NNUE::Features::HalfKP<(Eval::NNUE::Features::Side)
0>::AppendActiveIndices(Position const&, Color, Eval::NNUE::Features::IndexList*
)'
C:\Users\User\AppData\Local\Temp\lto-llvm-f2f5b6.o: In function `Eval::evaluate(
Position const&)':
ld-temp.o:(.text._ZN4Eval8evaluateERK8Position+0x98): undefined reference to `Ev
al::NNUE::Features::HalfKP<(Eval::NNUE::Features::Side)0>::AppendActiveIndices(P
osition const&, Color, Eval::NNUE::Features::IndexList*)'
ld-temp.o:(.text._ZN4Eval8evaluateERK8Position+0xc4): undefined reference to `Ev
al::NNUE::Features::HalfKP<(Eval::NNUE::Features::Side)0>::AppendChangedIndices(
Position const&, Color, Eval::NNUE::Features::IndexList*, Eval::NNUE::Features::
IndexList*)'
ld-temp.o:(.text._ZN4Eval8evaluateERK8Position+0xec): undefined reference to `Ev
al::NNUE::Features::HalfKP<(Eval::NNUE::Features::Side)0>::AppendActiveIndices(P
osition const&, Color, Eval::NNUE::Features::IndexList*)'
ld-temp.o:(.text._ZN4Eval8evaluateERK8Position+0x108): undefined reference to `E
val::NNUE::Features::HalfKP<(Eval::NNUE::Features::Side)0>::AppendChangedIndices
(Position const&, Color, Eval::NNUE::Features::IndexList*, Eval::NNUE::Features:
:IndexList*)'
C:\Users\User\AppData\Local\Temp\lto-llvm-f2f5b6.o: In function `Eval::NNUE::Tes
tCommand(Position&, std::__ndk1::basic_istream<char, std::__ndk1::char_traits<ch
ar> >&)':
ld-temp.o:(.text._ZN4Eval4NNUE11TestCommandER8PositionRNSt6__ndk113basic_istream
IcNS3_11char_traitsIcEEEE+0x53c): undefined reference to `Eval::NNUE::Features::
HalfKP<(Eval::NNUE::Features::Side)0>::AppendActiveIndices(Position const&, Colo
r, Eval::NNUE::Features::IndexList*)'
ld-temp.o:(.text._ZN4Eval4NNUE11TestCommandER8PositionRNSt6__ndk113basic_istream
IcNS3_11char_traitsIcEEEE+0x55c): undefined reference to `Eval::NNUE::Features::
HalfKP<(Eval::NNUE::Features::Side)0>::AppendChangedIndices(Position const&, Col
or, Eval::NNUE::Features::IndexList*, Eval::NNUE::Features::IndexList*)'
ld-temp.o:(.text._ZN4Eval4NNUE11TestCommandER8PositionRNSt6__ndk113basic_istream
IcNS3_11char_traitsIcEEEE+0x580): undefined reference to `Eval::NNUE::Features::
HalfKP<(Eval::NNUE::Features::Side)0>::AppendActiveIndices(Position const&, Colo
r, Eval::NNUE::Features::IndexList*)'
ld-temp.o:(.text._ZN4Eval4NNUE11TestCommandER8PositionRNSt6__ndk113basic_istream
IcNS3_11char_traitsIcEEEE+0x594): undefined reference to `Eval::NNUE::Features::
HalfKP<(Eval::NNUE::Features::Side)0>::AppendChangedIndices(Position const&, Col
or, Eval::NNUE::Features::IndexList*, Eval::NNUE::Features::IndexList*)'
C:\Users\User\AppData\Local\Temp\lto-llvm-f2f5b6.o: In function `Eval::NNUE::(an
onymous namespace)::TestFeatures(Position&)::$_1::operator()(Position const&) co
nst':
ld-temp.o:(.text._ZZN4Eval4NNUE12_GLOBAL__N_112TestFeaturesER8PositionENK3$_1clE
RKS2_+0x2ec): undefined reference to `Eval::NNUE::Features::HalfKP<(Eval::NNUE::
Features::Side)0>::AppendActiveIndices(Position const&, Color, Eval::NNUE::Featu
res::IndexList*)'
ld-temp.o:(.text._ZZN4Eval4NNUE12_GLOBAL__N_112TestFeaturesER8PositionENK3$_1clE
RKS2_+0x2fc): undefined reference to `Eval::NNUE::Features::HalfKP<(Eval::NNUE::
Features::Side)0>::AppendActiveIndices(Position const&, Color, Eval::NNUE::Featu
res::IndexList*)'
clang80++: error: linker command failed with exit code 1 (use -v to see invocati
on)
Press any key to continue . . .
Code: Select all
Generating 64 bit engine for ARM-Android.
'D:\Downloads\0\toolchains\llvm\prebuilt\windows-x86_64\x86_64-linux-android\bin
\clang++' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .
My flags
Code: Select all
echo Generating 64 bit engine for ARM-Android.
set "compiler_options=-m64 -march=armv8-a -DIS_64BIT -fPIE -Wl,-pie -lm -DEVAL_NNUE -DENABLE_TEST_CMD -fopenmp -O3 -flto -DUSE_POPCNT -static-libstdc++ -std=c++17 -fno-strict-aliasing -fno-strict-overflow -ffunction-sections -fdata-sections -Wl,--gc-sections -Wl,-s"