2016-07-07 4 views
4

У меня есть последняя версия Cocos2dx, которая является v3.12 и последней ndk r12b на Mac OSx El Captain. Я пробовал бесчисленное количество раз, чтобы построить свой проект для платформы Android, и я продолжаю получать сообщение об ошибке «перераспределения ресурсов в R_ARM_THM_CALL». И библиотеки не заканчиваются связыванием. Как исправить эту ошибку? Нужна ли мне, возможно, предыдущая версия cocos2dx или ndk?Cocos2dx build issue

Пожалуйста, помогите.

Вот все сообщение об ошибке:

/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./2d/CCNode.cpp:903: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/Android/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/regex.h:2109: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/Android/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/regex.h:2109: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/Android/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/regex.h:515: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/Android/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/regex.h:515: error: relocation overflow in R_ARM_THM_CALL 
[x86] SharedLibrary : libMyGame.so 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./platform/CCGLView.cpp:44: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/CCAffineTransform.cpp:73: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/CCAffineTransform.cpp:74: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/Mat4.cpp:968: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/Mat4.cpp:974: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/Quaternion.cpp:26: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/Vec4.cpp:306: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/Vec4.cpp:307: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/Vec4.cpp:308: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/Vec4.cpp:309: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/Vec4.cpp:310: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./math/Vec4.cpp:311: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCGLProgramState.cpp:46: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTextureCache.cpp:634: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCFrameBuffer.cpp:36: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./2d/CCCamera.cpp:42: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/Android/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/iostream:74: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/external/bullet/LinearMath/btQuickprof.cpp:21: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/external/bullet/LinearMath/btQuickprof.cpp:433: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/external/bullet/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp:623: error: relocation overflow in R_ARM_THM_CALL 
/Volumes/Android/buildbot/src/android/ndk-r12-release/toolchain/gcc/gcc-4.9/libstdc++-v3/libsupc++/eh_globals.cc:117: error: relocation overflow in R_ARM_THM_CALL 
/Volumes/Android/buildbot/src/android/ndk-r12-release/out/build/tmp/build-65800/build-gnustl/static-armeabij4.9/include/arm-linux-androideabi/bits/gthr-default.h:778: error: relocation overflow in R_ARM_THM_CALL 
/Volumes/Android/buildbot/src/android/ndk-r12-release/out/build/tmp/build-65800/build-gnustl/static-armeabij4.9/include/ext/concurrence.h:219: error: relocation overflow in R_ARM_THM_CALL 
/Volumes/Android/buildbot/src/android/ndk-r12-release/out/build/tmp/build-65800/build-gnustl/static-armeabij4.9/include/ext/atomicity.h:49: error: relocation overflow in R_ARM_THM_CALL 
/Volumes/Android/buildbot/src/android/ndk-r12-release/out/build/tmp/build-65800/build-gnustl/static-armeabij4.9/include/bits/basic_string.h:249: error: relocation overflow in R_ARM_THM_CALL 
/Volumes/Android/buildbot/src/android/ndk-r12-release/out/build/tmp/build-65800/build-gnustl/static-armeabij4.9/include/ext/atomicity.h:49: error: relocation overflow in R_ARM_THM_CALL 
/Volumes/Android/buildbot/src/android/ndk-r12-release/out/build/tmp/build-65800/build-gnustl/static-armeabij4.9/include/bits/basic_string.h:249: error: relocation overflow in R_ARM_THM_CALL 
/Volumes/Android/buildbot/src/android/ndk-r12-release/out/build/tmp/build-65800/build-gnustl/static-armeabij4.9/include/ext/atomicity.h:49: error: relocation overflow in R_ARM_THM_CALL 
/Volumes/Android/buildbot/src/android/ndk-r12-release/out/build/tmp/build-65800/build-gnustl/static-armeabij4.9/include/bits/basic_string.h:249: error: relocation overflow in R_ARM_THM_CALL 
/Volumes/Android/buildbot/src/android/ndk-r12-release/toolchain/gcc/gcc-4.9/libstdc++-v3/src/c++11/system_error.cc:65: error: relocation overflow in R_ARM_THM_CALL 
/Volumes/Android/buildbot/src/android/ndk-r12-release/toolchain/gcc/gcc-4.9/libstdc++-v3/src/c++11/system_error.cc:66: error: relocation overflow in R_ARM_THM_CALL 
/Volumes/Android/buildbot/src/android/ndk-r12-release/out/build/tmp/build-65800/build-gnustl/static-armeabij4.9/include/ext/atomicity.h:49: error: relocation overflow in R_ARM_THM_CALL 
/Volumes/Android/buildbot/src/android/ndk-r12-release/out/build/tmp/build-65800/build-gnustl/static-armeabij4.9/include/bits/basic_string.h:249: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./base/CCValue.cpp:33: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./base/CCValue.cpp:33: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./base/CCValue.cpp:33: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./base/CCValue.cpp:33: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./base/CCValue.cpp:34: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./base/CCValue.cpp:34: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./base/CCValue.cpp:34: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./base/CCValue.cpp:34: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./base/CCValue.cpp:36: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:63: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:63: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:64: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:64: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:65: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:65: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:66: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:66: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:67: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:67: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:68: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:68: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:69: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:69: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:70: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:70: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:71: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:71: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:74: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:74: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:75: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:75: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:76: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:76: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:77: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:77: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:81: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:81: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:85: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:85: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:97: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:97: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:102: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:102: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:107: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:107: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCTexture2D.cpp:116: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./2d/CCFontAtlasCache.cpp:36: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./2d/CCFontAtlasCache.cpp:36: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./2d/CCFontAtlasCache.cpp:36: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./2d/CCFontAtlasCache.cpp:36: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./2d/CCFontFreeType.cpp:50: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./2d/CCFontFreeType.cpp:50: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./2d/CCFontFreeType.cpp:50: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./2d/CCFontFreeType.cpp:50: error: relocation overflow in R_ARM_THM_CALL 
/Users/moshe/developer/CrossPlatformDev/com.game.mathymaddy/proj.android/../cocos2d/cocos/./renderer/CCVertexAttribBinding.cpp:46: error: relocation overflow in R_ARM_THM_CALL 
clang++: error: linker command failed with exit code 1 (use -v to see invocation) 
+0

Здесь есть информация, чтобы ознакомиться с http://discuss.cocos2d-x.org/t/failed-android-build-error-relocation-overflow-in-r-arm-thm-call/17932/8 – TankorSmash

+0

Я уже проверил это, ничего не работает :( –

ответ

2

Попробуйте NDK r11c:

http://dl.google.com/android/repository/android-ndk-r11c-darwin-x86_64.zip

Также убедитесь, что у вас есть следующие строки в вашем Android.mk:

LOCAL_ARM_MODE := arm

Это работал у меня (и у меня также были те же ошибки с NDK r12b). Надеюсь это поможет!

+0

плохо проверить это –

+0

и какая версия cocos2d-x? –

1

Это ошибка в NDKr12 при использовании

APP_ABI: = armeabi

в вашем aplication.mk файл. here - проблема, которая открылась в github проекта cocos2d и here - это проблема, которую открывает разработчик cocos2d-x на github проекта NDK. Но, как насчет решения? Вы можете изменить свой APP_ABI от armeabi до armeabi-v7a и скомпилируйте ваш проект без указанной ошибки.

+0

Это все еще ошибка в NDKr14b. – Paamand

+0

@Paamand и NDKr15 :( –