[Android] How to build for arm64?

For people working on the C++ code.
Post Reply
riddiknuclear
New member
Posts: 3
Joined: Fri May 10, 2019 16:52

[Android] How to build for arm64?

by riddiknuclear » Post

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.

zing269
Member
Posts: 109
Joined: Sat Apr 30, 2016 19:10

Re: [Android] How to build for arm64?

by zing269 » Post

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.

riddiknuclear
New member
Posts: 3
Joined: Fri May 10, 2019 16:52

Re: [Android] How to build for arm64?

by riddiknuclear » Post

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?

zing269
Member
Posts: 109
Joined: Sat Apr 30, 2016 19:10

Re: [Android] How to build for arm64?

by zing269 » Post

In that case you need to modify Application.mk. Or find another repository that can build arm64 without modification.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests