| Summary: | SDL_wave.c fail to compile in armeabi with ndk r16b | ||
|---|---|---|---|
| Product: | SDL | Reporter: | hongruichen <chraac> |
| Component: | build | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | sylvain.becker |
| Version: | 2.0.7 | ||
| Hardware: | ARM | ||
| OS: | Android (All) | ||
armeabi is almost deprecated for android-ndk higher that r13b. either it doesn't compile (ICE), or it executes wrongly (using long long for instance). android people advices to use armeabi-v7a (or use r13b). So why we change the compiling scripts to exclude armeabi building target? APP_ABI in androidbuildlibs.sh was assigned to all which means build armeabi. Yes, that would be good idea, here's a patch, also for tha app_platform warning --- a/build-scripts/androidbuildlibs.sh Thu Jan 25 11:12:20 2018 -0800 +++ b/build-scripts/androidbuildlibs.sh Fri Jan 26 09:00:23 2018 +0100 @@ -68,7 +68,7 @@ NDK_OUT=$obj \ NDK_LIBS_OUT=$lib \ APP_BUILD_SCRIPT=Android.mk \ - APP_ABI="all" \ - APP_PLATFORM=android-12 \ + APP_ABI="armeabi-v7a x86 arm64-v8a" \ + APP_PLATFORM=android-14 \ APP_MODULES="SDL2 SDL2_main" \ $ndk_args Fixed, thanks! https://hg.libsdl.org/SDL/rev/a42b155124a3 |
And following is the compiling output: Android NDK: android-12 is unsupported. Using minimum supported version android-14. /cygdrive/c/android/ndk/android-ndk-r16b/build/core/setup-app.mk:81: Android NDK: Application targets deprecated ABI(s): mips64 armeabi mips /cygdrive/c/android/ndk/android-ndk-r16b/build/core/setup-app.mk:82: Android NDK: Support for these ABIs will be removed in a future NDK release. [arm64-v8a] Install : libSDL2.so => build/android/lib/arm64-v8a/libSDL2.so [mips64] Install : libSDL2.so => build/android/lib/mips64/libSDL2.so [x86_64] Install : libSDL2.so => build/android/lib/x86_64/libSDL2.so [armeabi] Compile thumb : SDL2 <= SDL_wave.c In file included from <built-in>:329: <command line>:4:9: warning: '__ANDROID_API__' macro redefined [-Wmacro-redefined] #define __ANDROID_API__ 14 ^ <built-in>:323:9: note: previous definition is here #define __ANDROID_API__ 12 ^ In file included from ./src/audio/SDL_wave.c:25: In file included from ./include\SDL_audio.h:31: In file included from ./include/SDL_stdinc.h:34: In file included from C:/android/ndk/android-ndk-r16b/sysroot/usr/include\sys/types.h:36: C:/android/ndk/android-ndk-r16b/sysroot/usr/include\linux/types.h:21:10: fatal error: 'asm/types.h' file not found #include <asm/types.h> ^~~~~~~~~~~~~ 1 warning and 1 error generated. make: *** [/cygdrive/c/android/ndk/android-ndk-r16b/build/core/build-binary.mk:533:build/android/obj/local/armeabi/objs/SDL2/src/audio/SDL_wave.o] 错误 1