Failed Android build: "error: relocation overflow in R_ARM_THM_CALL"

I use Code IDE to build default project for Android
MacOS Yosemite
NDK - android-ndk-r9d
Code IDE - 1.0.1

/js-bindings/cocos2d-x/external/curl/prebuilt/android/armeabi/libcurl.a(url.o):function IsPipeliningPossible: error: relocation overflow in R_ARM_THM_CALL
/js-bindings/cocos2d-x/external/curl/prebuilt/android/armeabi/libcurl.a(url.o):function fix_hostname.isra.1: error: relocation overflow in R_ARM_THM_CALL


Build log
/Volumes/StorageSSD/dvlp/cocos2d_projects/MyProject/frameworks/runtime-src/proj.android/…/…/js-bindings/cocos2d-x/cocos/platform/android/…/…/2d/CCDrawingPrimitives.h:82:41: note: ‘init’ declared here
CC_DEPRECATED_ATTRIBUTE void CC_DLL init();
^
[armeabi] Compile++ thumb: cocos2dxandroid_static <= Java_org_cocos2dx_lib_Cocos2dxAccelerometer.cpp
1 warning generated.
[armeabi] Compile++ thumb: cocos2dxandroid_static <= Java_org_cocos2dx_lib_Cocos2dxBitmap.cpp
[armeabi] Compile++ thumb: cocos2dxandroid_static <= Java_org_cocos2dx_lib_Cocos2dxHelper.cpp
[armeabi] Compile++ thumb: cocos2dxandroid_static <= Java_org_cocos2dx_lib_Cocos2dxRenderer.cpp
[armeabi] Compile++ thumb: cocos2dxandroid_static <= JniHelper.cpp
[armeabi] Compile++ thumb: cocos2dxandroid_static <= TouchesJni.cpp
[armeabi] Compile thumb : cpufeatures <= cpu-features.c
[armeabi] StaticLibrary : libcocos2dxjsb.a
[armeabi] StaticLibrary : liblocalstorage.a
[armeabi] StaticLibrary : libcocostudio.a
[armeabi] StaticLibrary : libcocosbuilder.a
[armeabi] StaticLibrary : libcocos3d.a
[armeabi] StaticLibrary : libspine.a
[armeabi] StaticLibrary : libnetwork.a
[armeabi] StaticLibrary : libaudioengine.a
[armeabi] StaticLibrary : libui.a
[armeabi] StaticLibrary : libcocosdenshion.a
[armeabi] StaticLibrary : libprotobuf-lite.a
[armeabi] StaticLibrary : libextension.a
[armeabi] StaticLibrary : libcocos2dxinternal.a
[armeabi] StaticLibrary : libbox2d.a
[armeabi] StaticLibrary : libcpufeatures.a
[armeabi] StaticLibrary : libcocos2dandroid.a
[armeabi] SharedLibrary : libcocos2djs.so
/Volumes/StorageSSD/dvlp/cocos2d_projects/MyProject/frameworks/runtime-src/proj.android/…/…/js-bindings/cocos2d-x/external/curl/prebuilt/android/armeabi/libcurl.a(url.o):function IsPipeliningPossible: error: relocation overflow in R_ARM_THM_CALL
/Volumes/StorageSSD/dvlp/cocos2d_projects/MyProject/frameworks/runtime-src/proj.android/…/…/js-bindings/cocos2d-x/external/curl/prebuilt/android/armeabi/libcurl.a(url.o):function fix_hostname.isra.1: error: relocation overflow in R_ARM_THM_CALL
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [obj/local/armeabi/libcocos2djs.so] Error 1
make: Leaving directory `/Volumes/StorageSSD/dvlp/cocos2d_projects/MyProject/frameworks/runtime-src/proj.android’
Running command: compile
Building mode: debug
running: ‘/Volumes/StorageSSD/dvlp/tool/android/android_sdk/hidden/android-sdk-macosx/tools/android update project -t android-20 -p /Volumes/StorageSSD/dvlp/cocos2d_projects/MyProject/frameworks/runtime-src/proj.android’

running: ‘/Volumes/StorageSSD/dvlp/tool/android/android_sdk/hidden/android-sdk-macosx/tools/android update lib-project -p /Volumes/StorageSSD/dvlp/cocos2d_projects/MyProject/frameworks/runtime-src/proj.android/…/…/js-bindings/cocos2d-x/cocos/platform/android/java -t android-20’

building native
NDK build mode: release
running: ‘/Volumes/StorageSSD/dvlp/tool/android/android_sdk/hidden/android-ndk-r9d/ndk-build -C /Volumes/StorageSSD/dvlp/cocos2d_projects/MyProject/frameworks/runtime-src/proj.android -j3 NDK_MODULE_PATH=/Volumes/StorageSSD/dvlp/cocos2d_projects/MyProject/frameworks/runtime-src/proj.android/…/…/js-bindings:/Volumes/StorageSSD/dvlp/cocos2d_projects/MyProject/frameworks/runtime-src/proj.android/…/…/js-bindings/cocos2d-x:/Volumes/StorageSSD/dvlp/cocos2d_projects/MyProject/frameworks/runtime-src/proj.android/…/…/js-bindings/cocos2d-x/cocos:/Volumes/StorageSSD/dvlp/cocos2d_projects/MyProject/frameworks/runtime-src/proj.android/…/…/js-bindings/cocos2d-x/external’

Ndk build failed!


Solution:
Add
LOCAL_ARM_MODE := arm
to files
/runtime-scr/proj.android/jni/Android.mk
/js-bindings/bindings/Android.mk

Thanks for ucchen post

3 Likes

I have the same issue, please help!

i have same issue~~ why?

I tried with
Code IDE 1.0 + NDK - android-ndk-r10
Code IDE 1.0 + NDK - android-ndk-r9d

all times have this issue (((

when i build debug android package, it is ok, but build release android package, it is fail.

last i have found soluction, add “LOCAL_ARM_MODE := arm” to /runtime-scr/proj.android/jni/Android.mk /js-bindings/bindings/Android.mk. it will be compile success.

but i don’t know why use 32bit order set will be ok.

1 Like

thanks it’s work for me

@pandamicro @ludingping
why cocos2d-x js 3.1 rc0 compile android release version show this "error: relocation overflow in R_ARM_THM_CALL " and compile debug version is ok . after add “LOCAL_ARM_MODE := arm”, compile release version success. what different between arm and thumd ?

I found this topic
It’s seem very informative

ARM processors have 2 general instruction sets that they support: “ARM” and “Thumb”. Though there are different flavors of both, ARM instructions are 32 bits each and Thumb instructions are 16 bits. The main difference between the two is that ARM instructions have the possibility to do more in a single instruction than Thumb can. For example a single ARM instruction can add one register to another register, while performing a left shift on the second register. In Thumb one instruction would have to do the shift, then a second instruction would do the addition.

1 Like

i tried to make apk for HelloWorld application.

i tried to make app using with and without LOCAL_ARM_MODE := arm but could not get success.

Please help.
error files.zip (10.4 KB)

I fixed issue with next environment
MacOS Yosemite
NDK - android-ndk-r9d
Code IDE - 1.0.1

I found ndk-r10c in your log
Please try use android-ndk-r9d

Thanks Chapay.

I am able to build now.

After ading LOCAL_ARM_MODE := arm in files, i still have this problem…
My env : cocos2D-js 3.1, windows 8.1 64 bits, android ndk r9d.

cocos compile -p android works
cocos compile -p android -m release crash

Log :


[armeabi] StaticLibrary : libcocos2dxinternal.a
[armeabi] StaticLibrary : libbox2d.a
[armeabi] StaticLibrary : libcpufeatures.a
[armeabi] StaticLibrary : libcocos2dandroid.a
[armeabi] SharedLibrary : libcocos2djs.so
d:\Documents\Dev\cocos2d\myproj\frameworks\runtime-src\proj.android…/…/js-bindings/cocos2d-x/external/curl/prebuilt/android/armeabi/libcurl.a(url.o):function IsPipeliningPossible: error: relocation overflow in R_ARM_THM_CALL
d:\Documents\Dev\cocos2d\myproj\frameworks\runtime-src\proj.android…/…/js-bindings/cocos2d-x/external/curl/prebuilt/android/armeabi/libcurl.a(url.o):function fix_hostname.isra.1: error: relocation overflow in R_ARM_THM_CALL
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
make.exe: *** [obj/local/armeabi/libcocos2djs.so] Error 1
make.exe: Leaving directory `d:/Documents/Dev/cocos2d/myproj/frameworks/runtime-src/proj.android’
Ndk build failed!

I don’t know why :crying_cat_face:

EDIT : I created a project with cocos console and copy/past my old source in new project. Compilation with release mode works. Problem solved :sunny:

Ok, everyone.

We finally solved the problem, a external dependency libcurl haven’t been correctly compiled. So we have recompiled it and you can refer to this PR to have all necessary changes in external curl folder:

https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/pull/54/files

Actually we added -fPIC flag to compile lib curl to solve the problem.

Yet we still don’t know why this is happening on some devices and not on others.

Thank you !

Using ndk-r10c to solve issues with sscanf that make LabelBMFont and other freezes happen in Lollipop with r9d. I don’t think r9d is an option for me (though it does compile successfully there).

Using cocos2d-x fork as of yesterday:

/Users/Justin/Desktop/tools/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/ios:668: error: relocation overflow in R_ARM_THM_CALL
/Users/Justin/Desktop/tools/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/iosfwd:123: error: relocation overflow in R_ARM_THM_CALL
/Users/Justin/Desktop/tools/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/iosfwd:123: error: relocation overflow in R_ARM_THM_CALL
/Users/Justin/Desktop/tools/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:479: error: relocation overflow in R_ARM_THM_CALL
/Users/Justin/Desktop/tools/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/ios:734: error: relocation overflow in R_ARM_THM_CALL
/Users/Justin/Desktop/tools/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/ios:524: error: relocation overflow in R_ARM_THM_CALL
/Users/Justin/Desktop/tools/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:490: error: relocation overflow in R_ARM_THM_CALL
/Users/Justin/Desktop/tools/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/iosfwd:123: error: relocation overflow in R_ARM_THM_CALL
/Users/Justin/Desktop/tools/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/iosfwd:123: error: relocation overflow in R_ARM_THM_CALL
/Users/Justin/Desktop/tools/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:294: error: relocation overflow in R_ARM_THM_CALL
/Users/Justin/Desktop/tools/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:294: error: relocation overflow in R_ARM_THM_CALL
/Users/Justin/Desktop/tools/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:294: error: relocation overflow in R_ARM_THM_CALL
/Users/Justin/Desktop/tools/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:294: error: relocation overflow in R_ARM_THM_CALL
/Users/Justin/Desktop/tools/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/iosfwd:123: error: relocation overflow in R_ARM_THM_CALL
/Users/Justin/Desktop/tools/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/iosfwd:123: error: relocation overflow in R_ARM_THM_CALL
/Users/Justin/Desktop/tools/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/ios:524: error: relocation overflow in R_ARM_THM_CALL
/Users/Justin/Desktop/tools/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/ios:524: error: relocation overflow in R_ARM_THM_CALL
/Users/Justin/Desktop/tools/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/ostream:973: error: relocation overflow in R_ARM_THM_CALL
jni/../../cocos2d/cocos/platform/android/jni/TouchesJni.cpp:90: error: relocation overflow in R_ARM_THM_CALL
jni/../../cocos2d/cocos/ui/UILayout.cpp:51: error: relocation overflow in R_ARM_THM_CALL
jni/../../cocos2d/cocos/ui/UIScrollView.cpp:38: error: relocation overflow in R_ARM_THM_CALL
/Users/Justin/Desktop/tools/android-ndk-r10c/sources/cxx-stl/llvm-libc++/libcxx/include/map:1055: error: relocation overflow in R_ARM_THM_CALL
jni/../../cocos2d/cocos/./deprecated/CCDeprecated.cpp:578: error: relocation overflow in R_ARM_THM_CALL
jni/../../cocos2d/cocos/./deprecated/CCDeprecated.cpp:579: error: relocation overflow in R_ARM_THM_CALL
jni/../../cocos2d/cocos/./deprecated/CCDeprecated.cpp:580: error: relocation overflow in R_ARM_THM_CALL
jni/../../cocos2d/cocos/./deprecated/CCDeprecated.cpp:581: error: relocation overflow in R_ARM_THM_CALL
jni/../../cocos2d/cocos/./deprecated/CCDeprecated.cpp:582: error: relocation overflow in R_ARM_THM_CALL
jni/../../cocos2d/cocos/./deprecated/CCDeprecated.cpp:583: error: relocation overflow in R_ARM_THM_CALL
jni/../../cocos2d/cocos/./deprecated/CCDeprecated.cpp:584: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/iostream.cpp:34: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4685: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4675: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
make: Leaving directory `/Users/Justin/Desktop/dev/OneThousandWaysToKill/proj.android'
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
The Selected NDK toolchain version was 4.8 !
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4627: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4595: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4557: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4557: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4557: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4557: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4557: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4557: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4557: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4557: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4557: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4557: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4557: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4557: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4557: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4557: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4535: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4535: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4535: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4535: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4535: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4535: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4535: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4535: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4535: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4535: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4535: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4535: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4535: error: relocation overflow in R_ARM_THM_CALL
/tmp/ndk-user/tmp/build-libc++/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/locale.cpp:4535: error: relocation overflow in R_ARM_THM_CALL
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [obj/local/armeabi/libcocos2dcpp.so] Error 1

Those errors seem to trace back specifically to cocos2d-x code.

Even reverting my Application.mk to the default isn’t helping:

APP_STL := c++_static
NDK_TOOLCHAIN_VERSION=clang

APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char
APP_LDFLAGS := -latomic

# Tried using the following line
LOCAL_ARM_MODE := arm

ifeq ($(NDK_DEBUG),1)
  APP_CPPFLAGS += -DCOCOS2D_DEBUG=1
  APP_OPTIM := debug
else
  APP_CPPFLAGS += -DNDEBUG
  APP_OPTIM := release
endif

Any suggestions?

Have the same error message.

jni/…/…/cocos2d/cocos/platform/android/jni/TouchesJni.cpp:79: error: relocation overflow in R_ARM_THM_CALL

Can someone help?

I have the same issues in Cocos Engine 1.0 Preview with Cocos2d-x 3.3rc0.
C++ Helloworld, Android
NDK r10d
error of libcurl without fpic
already add LOCAL_ARM_MODE := arm to Android.mk in jni folder.

I copy external/curl folder of 3.3rc2 to 3.3rc0 and it works. :slight_smile:

cocos2d-js 3.2 rc0 has fixed this bug

@honghui_zhang Still a issue in cocos2d-js 3.3 when I build in Release mode. Debug work.

I used NDK r10d btw