Chess2u
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Chess2uLog in

Compiling Chess Engines for Android with Termux

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Superbatil wrote:
Archimedes wrote:
AlexChess wrote:
@Archimedes could you please compile it for me for Android, and share on Chess engines for Android, until I learn how to do it by myself?

I see, you need a ready to go package. bigsmile

Extract the following zip archive to a folder of your choice on Windows (e. g. C:\Temp). Spaces in directory names are not allowed. Zip archive contains all necessary files (including the latest version of Android NDK). No need to do anything else.

https://pixeldrain.com/u/hmwcE6MJ

Start the batch file "ndk-build.bat" and you are on the way.


Sir Archimedes,
Can you give me a RubiChess config on Cecsa..
Thanks in advanced.

Don't know exactly what you mean. I do not plan integrating RubiChess in CECSA (there are no big speed improvements by using g++ or clang++ in combination with PGO on Termux).

There are existing already the files Android.mk and Application.mk for proper compiling with Android NDK. Just use them.

Or do you need a CECSA style makefile for RubiChess which can be used for compilation tasks (g++ or clang++) other than with Android NDK? If yes, i can provide such a makefile. CECSA style makefile means, they all have the same structure, you only have to change the first lines (until the bench command, if available). For C++ sources i use the makefile for Fire (see CECSA) as a template. I only have to change a few lines from the beginning. That's all.

CECSA style makefile for RubiChess:
https://pixeldrain.com/u/5dKV49gG

Examples:

Code:

make profile-build

Code:

make profile-build COMP=clang


Same syntax as the makefile from Stockfish.

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Archimedes wrote:
Superbatil wrote:
Archimedes wrote:
AlexChess wrote:
@Archimedes could you please compile it for me for Android, and share on Chess engines for Android, until I learn how to do it by myself?

I see, you need a ready to go package.  bigsmile

Extract the following zip archive to a folder of your choice on Windows (e. g. C:\Temp). Spaces in directory names are not allowed. Zip archive contains all necessary files (including the latest version of Android NDK). No need to do anything else.

https://pixeldrain.com/u/hmwcE6MJ

Start the batch file "ndk-build.bat" and you are on the way.


Sir Archimedes,
     Can you give me a RubiChess config on Cecsa..
  Thanks in advanced.

Don't know exactly what you mean. I do not plan integrating RubiChess in CECSA (there are no big speed improvements by using g++ or clang++ in combination with PGO on Termux).

There are existing already the files Android.mk and Application.mk for proper compiling with Android NDK. Just use them.

Or do you need a CECSA style makefile for RubiChess which can be used for compilation tasks (g++ or clang++) other than with Android NDK? If yes, i can provide such a makefile. CECSA style makefile means, they all have the same structure, you only have to change the first lines (until the bench command, if available). For C++ sources i use the makefile for Fire (see CECSA) as a template. I only have to change a few lines from the beginning. That's all.

CECSA style makefile for RubiChess:
https://pixeldrain.com/u/5dKV49gG

Examples:

Code:

make profile-build

Code:

make profile-build COMP=clang


Same syntax as the makefile from Stockfish.
After I used your "Makefile" of RubiChess, the chess engine cannot run on Droidfish while the nnue setting getting check. After untick nnue setting the RubiChess then he work.
Sorry for my bad english..hahaha😀

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Superbatil wrote:
After I used your "Makefile" of RubiChess, the chess engine cannot run on Droidfish while the nnue setting getting check. After untick nnue setting the RubiChess then he work.
Sorry for my bad english..hahaha😀

It's because RubiChess is missing its network file. Copy the network file to the logs directory and it will run. Or copy it to another location and change the uci settings accordingly.

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Archimedes wrote:
Superbatil wrote:
After I used your "Makefile" of RubiChess, the chess engine cannot run on Droidfish while the nnue setting getting check. After untick nnue setting the RubiChess then he work.
Sorry for my bad english..hahaha😀

It's because RubiChess is missing its network file. Copy the network file to the logs directory and it will run. Or copy it to another location and change the uci settings accordingly.


Rubichess complied almost 1mb. I think it is embedded of network but if I untick the nnue option, only then does he work.

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Sir Archimedes please convert ndk-build(.)bat (script)
to use in termux..Thanks again..

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Superbatil wrote:
Sir Archimedes please convert ndk-build(.)bat (script)
to use in termux..Thanks again..

Install Android NDK as described here and you can start ndk-build from every directory. No need to create an extra script.

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Sir Archimedes, thanks for giving an idea about compiling chess engine src..
Sir another favor about Makefile of Weiss and Zahak.Thanks

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
I love this thread ..v knowledgeable

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Sir Archimedes, my problem is for direct compiling of ndk in termux..

"</data/data/com.termux/files/usr/lib/android-ndk>/ndk-build
bash: /ndk-build: Read-only file system"

.....but my ndk-build file is rwx-rwx-rwx
My question is why bash said Read-only?

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Superbatil wrote:
Sir Archimedes, my problem is for direct compiling of ndk in termux..

"</data/data/com.termux/files/usr/lib/android-ndk>/ndk-build
bash: /ndk-build: Read-only file system"

.....but my ndk-build file is rwx-rwx-rwx
My question is why bash said Read-only?

Don't know exactly what you have done. When you start Termux and enter

Code:

ndk-build

What output do you get?

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Superbatil wrote:
Sir Archimedes, thanks for giving an idea about compiling chess engine src..
Sir another favor about Makefile of Weiss and Zahak.Thanks

Zahak is written in the go language. You have to install the go compiler. Weiss needs some modification for proper compiling to Android. A makefile could be easily created, based of one of my CECSA makefiles, but you have to change something in the source code.

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Archimedes wrote:
Superbatil wrote:
Sir Archimedes, my problem is for direct compiling of ndk in termux..

"</data/data/com.termux/files/usr/lib/android-ndk>/ndk-build
bash: /ndk-build: Read-only file system"

.....but my ndk-build file is rwx-rwx-rwx
My question is why bash said Read-only?

Don't know exactly what you have done. When you start Termux and enter

Code:

ndk-build

What output do you get?


This is my out......

~/.../Moonfish/jni $ ls
Android.mk Application src

inside jni folder I call this directory

$ </data/data/com.termux/files/usr/lib/android-ndk>/ndk-build

...and the result is

$ </data/data/com.termux/files/usr/lib/android-ndk>/ndk-build
bash: /ndk-build: Read-only file system"

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
The two files inside jni directory must have the names: Android.mk and Application.mk.

It is a bad idea to copy the source directory inside the jni directory. Should be outside.

Your ndk-build command is wrong, must be:

Code:

/data/data/com.termux/files/usr/lib/android-ndk/ndk-build

However, it is better to put the path to ndk to .bashrc as already described here. No need to enter the full path to ndk when starting ndk-build.

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Archimedes wrote:
The two files inside jni directory must have the names: Android.mk and Application.mk.

It is a bad idea to copy the source directory inside the jni directory. Should be outside.

Your ndk-build command is wrong, must be:

Code:

/data/data/com.termux/files/usr/lib/android-ndk/ndk-build

However, it is better to put the path to ndk to .bashrc as already described here. No need to enter the full path to ndk when starting ndk-build.


~/.../Moonfish $ ls
Android.mk Application Application.mk

~/.../Moonfish $ /data/data/com.termux/files/usr/lib/android-ndk>/ndk-build

...After

~/.../Moonfish $
/data/data/com.termux/files/home/android-ndk-r23b/ndk-build
ERROR: Unknown host CPU architecture: aarch64

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Superbatil wrote:
Archimedes wrote:
The two files inside jni directory must have the names: Android.mk and Application.mk.

It is a bad idea to copy the source directory inside the jni directory. Should be outside.

Your ndk-build command is wrong, must be:

Code:

/data/data/com.termux/files/usr/lib/android-ndk/ndk-build

However, it is better to put the path to ndk to .bashrc as already described here. No need to enter the full path to ndk when starting ndk-build.


~/.../Moonfish $ ls
Android.mk Application  Application.mk

~/.../Moonfish $
/data/data/com.termux/files/home/android-ndk-r23b/ndk-build

...After

~/.../Moonfish $
/data/data/com.termux/files/home/android-ndk-r23b/ndk-build  
ERROR: Unknown host CPU architecture: aarch64

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Superbatil wrote:

/data/data/com.termux/files/home/android-ndk-r23b/ndk-build  
ERROR: Unknown host CPU architecture: aarch64

Android NDK is from https://github.com/Lzhiyong/termux-ndk/releases/tag/ndk-r23?

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Archimedes wrote:
Superbatil wrote:

/data/data/com.termux/files/home/android-ndk-r23b/ndk-build  
ERROR: Unknown host CPU architecture: aarch64

Android NDK is from https://github.com/Lzhiyong/termux-ndk/releases/tag/ndk-r23?




[/quote]
~/.../src/Crystal $ /data/data/com.termux/files/usr/lib/NdkDir/ndk-build
fcntl(): Permission denied
WARNING: linker: /data/data/com.termux/files/usr/lib/NdkDir/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-12: unsupported flags DT_FLAGS_1=0x8000001
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/NdkDir/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "posix_spawn" referenced by "/data/data/com.termux/files/usr/lib/NdkDir/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-12"...
Android NDK: ERROR:/data/data/com.termux/files/usr/lib/NdkDir/sources/cxx-stl/llvm-libc++abi/Android.mk:unwind: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that /lib/linux/aarch64/libunwind.a exists or that its path is correct
/data/data/com.termux/files/usr/lib/NdkDir/build/core/prebuilt-library.mk:45: *** Android NDK: Aborting . Stop.


I think that the ndk compiler by Lzhiyong is not compatible on my Android Nougat (7.0). He said on the github is his ndk compiler is compatible on Android 9 and up..So sad...

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Superbatil wrote:

~/.../src/Crystal $ /data/data/com.termux/files/usr/lib/NdkDir/ndk-build
fcntl(): Permission denied

Looks good so far. However, i'm wondering from what directory you start ndk-build.

To test, wether your configuration of Android NDK is working, extract the following archive (a ready to go Stockfish package) to your home directory, change to the jni folder and type ndk-build.

https://pixeldrain.com/u/f6cpZeii

If it works, your Installation of Android NDK is okay so far.

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Archimedes wrote:
Superbatil wrote:

~/.../src/Crystal $ /data/data/com.termux/files/usr/lib/NdkDir/ndk-build
fcntl(): Permission denied

Looks good so far. However, i'm wondering from what directory you start ndk-build.

To test, wether your configuration of Android NDK is working, extract the following archive (a ready to go Stockfish package) to your home directory, change to the jni folder and type ndk-build.

https://pixeldrain.com/u/f6cpZeii

If it works, your Installation of Android NDK is okay so far.


"ex#1"

~$ ls
src jni
~ $ ndk-build -B
ndk-build: command not found

or

~$ ls
src jni
~ $ ndk-build
ndk-build: command not found

"ex#2"

~$ cd jni

~/jni $ ls
Android.mk Application.mk

~/jni $ ndk-build -B
ndk-build: command not found

or

~/jni $ ndk-build
ndk-build: command not found

if I used full path
then.......

~/jni $ /data/data/com.termux/files/usr/lib/android-ndk/ndk-build
fcntl(): Permission denied
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"...
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"...
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"...
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"...
[arm64-v8a] Compile++ : Stockfish <= benchmark.cpp
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"...
make: *** [/data/data/com.termux/files/usr/lib/android-ndk/build/core/build-binary.mk:478: /data/data/com.termux/files/home/obj/local/arm64-v8a/objs/Stockfish/__/src/benchmark.o] Aborted
~/jni $

or

~/jni $ cd ~ $ /data/data/com.termux/files/usr/lib/android-ndk/ndk-build -B
fcntl(): Permission denied CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"... CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"...
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"...
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"...
[arm64-v8a] Executable : Stockfish
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"...
make: *** [/data/data/com.termux/files/usr/lib/android-ndk/build/core/build-binary.mk:738: obj/local/arm64-v8a/Stockfish] Aborted
~ $

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Please add the path for Android NDK to the search path.

Code:

export PATH=$PATH:/data/data/com.termux/files/usr/lib/android-ndk

Afterwards, you can use ndk-build.

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Archimedes wrote:
Please add the path for Android NDK to the search path.

Code:

export PATH=$PATH:/data/data/com.termux/files/usr/lib/android-ndk

Afterwards, you can use ndk-build.


After adding on cecsa.sh of berserk this is the result....


CECSA
Chess Engine Compiler Script for Android
Version 2022.02.17

Compile Berserk for Android? y

fcntl(): Permission denied
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"...
[arm64-v8a] Compile : Berserk <= attacks.c
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"...
make: *** [/data/data/com.termux/files/usr/lib/android-ndk/build/core/build-binary.mk:476: /data/data/com.termux/files/home/Cecsa/src/Berserk/obj/local/arm64-v8a/objs/Berserk/__/src/attacks.o] Aborted

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Archimedes wrote:
Please add the path for Android NDK to the search path.

Code:

export PATH=$PATH:/data/data/com.termux/files/usr/lib/android-ndk

Afterwards, you can use ndk-build.


same as this one....

~/jni $ export PATH=$PATH:/data/data/com.termux/files/usr/lib/android-ndk
~/jni $ ndk-build
fcntl(): Permission denied
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"...
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"...
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"...
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"...
[arm64-v8a] Compile++ : Stockfish <= benchmark.cpp
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"...
make: *** [/data/data/com.termux/files/usr/lib/android-ndk/build/core/build-binary.mk:478: /data/data/com.termux/files/home/obj/local/arm64-v8a/objs/Stockfish/__/src/benchmark.o] Aborted
~/jni $

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Can I ask how to compile an engine in termux for armv7? I cannot find Shashchess 16 here in this forum so I want to do it by myself since I want to use a specific 20mb net.

Source:
https://github.com/amchess/ShashChess/releases/tag/16

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Superbatil wrote:

same as this one....

~/jni $ export PATH=$PATH:/data/data/com.termux/files/usr/lib/android-ndk
~/jni $ ndk-build
fcntl(): Permission denied
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"...
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"...
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"...
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"...
[arm64-v8a] Compile++ : Stockfish <= benchmark.cpp
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++.real": cannot locate symbol "strtof_l" referenced by "/data/data/com.termux/files/usr/lib/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-9"...
make: *** [/data/data/com.termux/files/usr/lib/android-ndk/build/core/build-binary.mk /data/data/com.termux/files/home/obj/local/arm64-v8a/objs/Stockfish/__/src/benchmark.o] Aborted
~/jni $

Don't know what the problem is. What version of Android NDK you are using? If Android NDK is not working on Termux, for whatever reason, use it on Windows or Linux. It's the same principle. wink

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
GsauceCries wrote:
Can I ask how to compile an engine in termux for armv7? I cannot find Shashchess 16 here in this forum so I want to do it by myself since I want to use a specific 20mb net.

Source:
https://github.com/amchess/ShashChess/releases/tag/16

There are different ways to do that: g++, clang++ or Android NDK. At first, you need an installation of one of this compilers. ShashChess is not the easiest starting point, to learn, how to compile on Termux. Additional there are some changes to the source code necessary. Do you have experience with compilations on Termux (e. g. Stockfish)? However, i can provide a makefile or files for Android NDK for proper compiling.

http://outskirts.altervista.org/forum/viewtopic.php?f=40&t=2685

descriptionCompiling Chess Engines for Android with Termux - Page 2 EmptyRe: Compiling Chess Engines for Android with Termux

more_horiz
Permissions in this forum:
You cannot reply to topics in this forum