| Summary: | Compile for Android using NDK r21 fails | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Ron Aaron <ron> |
| Component: | build | Assignee: | Sam Lantinga <slouken> |
| Status: | WAITING --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | blocker | ||
| Priority: | P2 | CC: | icculus |
| Version: | 2.0.10 | ||
| Hardware: | ARM | ||
| OS: | Android (All) | ||
It does compile with NDK r21 on Linux. I'm not seeing that either...? stream-mac:SDL valve$ export PATH=$HOME/android/android-ndk-r21:$PATH stream-mac:SDL valve$ ./build-scripts/androidbuildlibs.sh [armeabi-v7a] Compile thumb : SDL2 <= SDL_hints.c [armeabi-v7a] Compile thumb : SDL2 <= SDL.c [armeabi-v7a] Compile thumb : SDL2 <= SDL_dataqueue.c [armeabi-v7a] Compile thumb : SDL2 <= SDL_assert.c [armeabi-v7a] Compile thumb : SDL2 <= SDL_log.c Strange. Perhaps it's to do with the XCode or OS version? Unlikely I would think, since the NDK is its own thing. For reference, I'm on macOS 10.14.6 (Mojave), and XCode 11.3.1 Any chance you've run the configure or CMake scripts in this source tree on macOS, so it overwrote SDL_config.h with something macOS-specific? (or it picked up SDL_config.h from an installed copy in /usr/local or something?) This is trying to include the header for MMX support (mmintrin.h) which shouldn't happen on ARM Android, and SDL_cpuinfo.h decides to include that header based on something we'll set in SDL_config.h. --ryan. |
Compiling on macOS using the 'androidbuildlibs.sh' and NDK r21, the compiler gives: armeabi-v7a] Compile thumb : SDL2 <= SDL_hints.c [armeabi-v7a] Compile thumb : SDL2 <= SDL.c In file included from ./src/SDL.c:37: In file included from ./include/SDL.h:38: In file included from ./include/SDL_cpuinfo.h:86: In file included from /Users/ron/src/android-ndk-r21/toolchains/llvm/prebuilt/darwin-x86_64/lib64/clang/9.0.8/include/immintrin.h:14: /Users/ron/src/android-ndk-r21/toolchains/llvm/prebuilt/darwin-x86_64/lib64/clang/9.0.8/include/mmintrin.h:50:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size return (__m64)__builtin_ia32_vec_init_v2si(__i, 0); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/ron/src/android-ndk-r21/toolchains/llvm/prebuilt/darwin-x86_64/lib64/clang/9.0.8/include/mmintrin.h:129:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2); etc...