You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For SDL3, trying the example of building the test App “./create-android-project.py org.libsdl.testgles …/test/testgles.c” as described in the README-android.md. I’m running Arch Linux and have installed Android Studio and jdk21-openjdk. I get the same errors when trying to build it in Android Studio. Spent some time trying to debug the issue but didn't see anything out of order.
Below you can see the steps taken to build the test Android app, setting up a fresh build environment. For some reason, it's skipping the building of the SDL/src/test folder.
[howie@howieputer ~]$ export ANDROID_NDK_HOME=/home/howie/Android/Sdk/ndk
[howie@howieputer ~]$ export ANDROID_HOME=/home/howie/Android/Sdk
[howie@howieputer ~]$ export JAVA_HOME=/usr/lib/jvm/default
[howie@howieputer ~]$ cd Development/SDL/build-scripts/
[howie@howieputer build-scripts]$ ./create-android-project.py org.libsdl.testgles ../test/testgles.c
To build and install to a device for testing, run the following:
cd /home/howie/Development/SDL/build/org.libsdl.testgles
./gradlew installDebug
[howie@howieputer build-scripts]$ cd ../build/org.libsdl.testgles/
[howie@howieputer org.libsdl.testgles]$ ./gradlew installDebug
C++ build system [build] failed while executing:
/home/howie/Android/Sdk/ndk/27.0.12077973/ndk-build
NDK_PROJECT_PATH=null
APP_BUILD_SCRIPT=/home/howie/Development/SDL/build/org.libsdl.testgles/app/jni/Android.mk
NDK_APPLICATION_MK=/home/howie/Development/SDL/build/org.libsdl.testgles/app/jni/Application.mk
APP_ABI=arm64-v8a
NDK_ALL_ABIS=arm64-v8a
NDK_DEBUG=1
NDK_OUT=/home/howie/Development/SDL/build/org.libsdl.testgles/app/build/intermediates/cxx/Debug/4o424436/obj
NDK_LIBS_OUT=/home/howie/Development/SDL/build/org.libsdl.testgles/app/build/intermediates/cxx/Debug/4o424436/lib
APP_PLATFORM=android-19
SDL3
main
from /home/howie/Development/SDL/build/org.libsdl.testgles/app
ld.lld: error: undefined symbol: SDLTest_CommonCreateState
referenced by testgles.c:113 (app/jni/src/testgles.c:113)
/home/howie/Development/SDL/build/org.libsdl.testgles/app/build/intermediates/cxx/Debug/4o424436/obj/local/arm64-v8a/objs-debug/main/testgles.o:(SDL_main)
referenced by testgles.c:121 (app/jni/src/testgles.c:121)
/home/howie/Development/SDL/build/org.libsdl.testgles/app/build/intermediates/cxx/Debug/4o424436/obj/local/arm64-v8a/objs-debug/main/testgles.o:(SDL_main)
referenced by testgles.c:148 (app/jni/src/testgles.c:148)
/home/howie/Development/SDL/build/org.libsdl.testgles/app/build/intermediates/cxx/Debug/4o424436/obj/local/arm64-v8a/objs-debug/main/testgles.o:(SDL_main)
referenced by testgles.c:170 (app/jni/src/testgles.c:170)
/home/howie/Development/SDL/build/org.libsdl.testgles/app/build/intermediates/cxx/Debug/4o424436/obj/local/arm64-v8a/objs-debug/main/testgles.o:(SDL_main)
referenced by testgles.c:297 (app/jni/src/testgles.c:297)
/home/howie/Development/SDL/build/org.libsdl.testgles/app/build/intermediates/cxx/Debug/4o424436/obj/local/arm64-v8a/objs-debug/main/testgles.o:(SDL_main)
referenced by testgles.c:45 (app/jni/src/testgles.c:45)
/home/howie/Development/SDL/build/org.libsdl.testgles/app/build/intermediates/cxx/Debug/4o424436/obj/local/arm64-v8a/objs-debug/main/testgles.o:(quit)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/home/howie/Android/Sdk/ndk/27.0.12077973/build/core/build-binary.mk:661: /home/howie/Development/SDL/build/org.libsdl.testgles/app/build/intermediates/cxx/Debug/4o424436/obj/local/arm64-v8a/libmain.so] Error 1
Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
BUILD FAILED in 19s
16 actionable tasks: 16 executed
The text was updated successfully, but these errors were encountered:
GameCodingNinja
changed the title
Build errors when trying to compile sample Android App
SDL3: Build errors when trying to compile sample Android App
Mar 9, 2025
For SDL3, trying the example of building the test App “./create-android-project.py org.libsdl.testgles …/test/testgles.c” as described in the README-android.md. I’m running Arch Linux and have installed Android Studio and jdk21-openjdk. I get the same errors when trying to build it in Android Studio. Spent some time trying to debug the issue but didn't see anything out of order.
Below you can see the steps taken to build the test Android app, setting up a fresh build environment. For some reason, it's skipping the building of the SDL/src/test folder.
[howie@howieputer ~]$ export ANDROID_NDK_HOME=/home/howie/Android/Sdk/ndk
[howie@howieputer ~]$ export ANDROID_HOME=/home/howie/Android/Sdk
[howie@howieputer ~]$ export JAVA_HOME=/usr/lib/jvm/default
[howie@howieputer ~]$ cd Development/SDL/build-scripts/
[howie@howieputer build-scripts]$ ./create-android-project.py org.libsdl.testgles ../test/testgles.c
To build and install to a device for testing, run the following:
cd /home/howie/Development/SDL/build/org.libsdl.testgles
./gradlew installDebug
[howie@howieputer build-scripts]$ cd ../build/org.libsdl.testgles/
[howie@howieputer org.libsdl.testgles]$ ./gradlew installDebug
[Incubating] Problems report is available at: file:///home/howie/Development/SDL/build/org.libsdl.testgles/build/reports/problems/problems-report.html
FAILURE: Build failed with an exception.
Execution failed for task ':app:buildNdkBuildDebug[arm64-v8a]'.
C++ build system [build] failed while executing:
/home/howie/Android/Sdk/ndk/27.0.12077973/ndk-build
NDK_PROJECT_PATH=null
APP_BUILD_SCRIPT=/home/howie/Development/SDL/build/org.libsdl.testgles/app/jni/Android.mk
NDK_APPLICATION_MK=/home/howie/Development/SDL/build/org.libsdl.testgles/app/jni/Application.mk
APP_ABI=arm64-v8a
NDK_ALL_ABIS=arm64-v8a
NDK_DEBUG=1
NDK_OUT=/home/howie/Development/SDL/build/org.libsdl.testgles/app/build/intermediates/cxx/Debug/4o424436/obj
NDK_LIBS_OUT=/home/howie/Development/SDL/build/org.libsdl.testgles/app/build/intermediates/cxx/Debug/4o424436/lib
APP_PLATFORM=android-19
SDL3
main
from /home/howie/Development/SDL/build/org.libsdl.testgles/app
ld.lld: error: undefined symbol: SDLTest_CommonCreateState
ld.lld: error: undefined symbol: SDLTest_CommonArg
ld.lld: error: undefined symbol: SDLTest_CommonLogUsage
ld.lld: error: undefined symbol: SDLTest_CommonInit
ld.lld: error: undefined symbol: SDLTest_CommonEvent
ld.lld: error: undefined symbol: SDLTest_CommonQuit
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.12/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 19s
16 actionable tasks: 16 executed
The text was updated successfully, but these errors were encountered: