Description
When attempting to build an Android APK/AAB using NDK r27b (to satisfy Google Play's 16KB page alignment requirement), the compilation fails during the SDL2 bootstrap stage. The NDK r27b strictly forbids the use of ALooper_pollAll, which is still present in the SDL_androidsensor.c source of the current SDL2 bootstrap.
Environment
Buildozer version: 1.5.0 (or your current version)
Python-for-android version: Master branch (as seen in logs)
NDK version: r27b
Android API: 34
Python version: 3.11.15
Host OS: Linux (Ubuntu 24.04/22.04)
Log Error
/home/adonayre/avantier/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL/src/sensor/android/SDL_androidsensor.c:164:9: error: 'ALooper_pollAll' is unavailable: obsoleted in Android 1
164 | if (ALooper_pollAll(0, NULL, &events, (void **)&source) == LOOPER_ID_USER) {
Steps to Reproduce
Set android.ndk = 27b in buildozer.spec.
Add 16KB alignment flags:
android.extra_ldflags = -Wl,-z,common-page-size=16384 -Wl,-z,max-page-size=16384
android.extra_cflags = -O2 -DPAGE_SIZE=16384
Run buildozer android debug.
Additional Context
Google Play Console now requires 16KB page alignment for certain submissions. NDK r27b is the recommended version for this, but the SDL2 recipe needs to be patched to replace ALooper_pollAll with ALooper_pollOnce to be compatible with this NDK version's headers.
Thank for your help.
Description
When attempting to build an Android APK/AAB using NDK r27b (to satisfy Google Play's 16KB page alignment requirement), the compilation fails during the SDL2 bootstrap stage. The NDK r27b strictly forbids the use of ALooper_pollAll, which is still present in the SDL_androidsensor.c source of the current SDL2 bootstrap.
Environment
Log Error
/home/adonayre/avantier/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL/src/sensor/android/SDL_androidsensor.c:164:9: error: 'ALooper_pollAll' is unavailable: obsoleted in Android 1
164 | if (ALooper_pollAll(0, NULL, &events, (void **)&source) == LOOPER_ID_USER) {
Steps to Reproduce
Additional Context
Google Play Console now requires 16KB page alignment for certain submissions. NDK r27b is the recommended version for this, but the SDL2 recipe needs to be patched to replace ALooper_pollAll with ALooper_pollOnce to be compatible with this NDK version's headers.
Thank for your help.