Page 1 of 1

[Android] How to build for arm64?

PostPosted: Fri May 10, 2019 22:13
by riddiknuclear
Hello!

I'm trying to make a build with arm64 architecture but It doesn't work yet. Need help, please.

First of all I dipped into the main Makefile.mk and added:

Code: Select all
################################################################################
# toolchain config for arm64 new processors
################################################################################
TARGET_HOST = aarch64-linux-android
TARGET_ABI = arm64-v8a
TARGET_LIBDIR = arm64-v8a
TARGET_TOOLCHAIN = aarch64-linux-android
TARGET_CFLAGS_ADDON = -mfloat-abi=softfp -mfpu=vfpv3 -O3
TARGET_CXXFLAGS_ADDON = $(TARGET_CFLAGS_ADDON)
TARGET_ARCH = arm64
CROSS_CC = aarch64-linux-android-clang
CROSS_CXX = aarch64-linux-android-clang++
COMPILER_VERSION = clang
HAVE_LEVELDB = 0

################################################################################
# toolchain config for arm new processors
################################################################################
#TARGET_HOST = arm-linux
#TARGET_ABI = armeabi-v7a
#TARGET_LIBDIR = armeabi-v7a
#TARGET_TOOLCHAIN = arm-linux-androideabi-
#TARGET_CFLAGS_ADDON = -mfloat-abi=softfp -mfpu=vfpv3 -O3
#TARGET_CXXFLAGS_ADDON = $(TARGET_CFLAGS_ADDON)
#TARGET_ARCH = armv7
#CROSS_CC = clang
#CROSS_CXX = clang++
#COMPILER_VERSION = clang
#HAVE_LEVELDB = 0


The problem is to build deps for arm64. I've changed the minetest/build/android/deps/openal-soft/jni/Android.mk file:

Code: Select all
TARGET_ARCH_ABI  ?=arm64-v8a
#TARGET_ARCH_ABI  ?=armeabi-v7a


After this I got stuck with 'libvorbis-libogg-android':

Android NDK: ERROR:jni/Android.mk:ogg: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that jni/../deps/libvorbis-libogg-android/libs/arm64-v8a/libogg.so exists or that its path is correct


And I can't figure out how to build libvorbis-libogg-android for arm64-v8a.

Please help.

Re: [Android] How to build for arm64?

PostPosted: Sat May 11, 2019 00:24
by zing269
You may need to make the same type changes to the make files for the dependencies. It may also be the case that the make files for the deps do not have a working config for arm64.

Re: [Android] How to build for arm64?

PostPosted: Sat May 11, 2019 10:33
by riddiknuclear
zing269 wrote:You may need to make the same type changes to the make files for the dependencies. It may also be the case that the make files for the deps do not have a working config for arm64.


Yes, but I have no idea how to do this. For example there is no a makefile in the libvorbis-libogg-android folder.
What is possible to do here?

Re: [Android] How to build for arm64?

PostPosted: Sat May 11, 2019 17:34
by zing269
In that case you need to modify Application.mk. Or find another repository that can build arm64 without modification.