Open webgeek1234 opened 3 years ago
Tagging @twinaphex to review this issue.
I think the solution is to just raise the minimum API for libretro builds, and eventually we should do the same for PPSSPP.
It's kinda silly that we still try to support API 9, while NDKs only support 16+ and nowadays I guess 21+ then - but it still somehow mostly works, heh.
Just to note: we don't ever call stpcpy()
. We're calling sprintf()
there with just "%s", but the compiler is presumably optimizing it to stpcpy. So removing stpcpy()
calls is probably not a possible remedy.
-[Unknown]
Ohhhh, so it's probably an ndk bug in r23, then. If the optimizer is busted and dropping in something that isn't supported. Awesome.
Platform
libretro / Retroarch
Compiler and build tool versions
NDK r23
Operating system version
Android
Build commands used
cmake -DLIBRETRO=ON -DANDROID_PLATFORM=android-16 -DCMAKE_TOOLCHAIN_FILE=$NDK_ROOT/build/cmake/android.toolchain.cmake -DANDROID_STL=c++_static -DANDROID_ABI="armeabi-v7a with NEON"
cmake -DLIBRETRO=ON -DANDROID_PLATFORM=android-16 -DCMAKE_TOOLCHAIN_FILE=$NDK_ROOT/build/cmake/android.toolchain.cmake -DANDROID_STL=c++_static -DANDROID_ABI="x86"
What happens
https://gitlab.incom.co/libretro/ppsspp/-/jobs/104347 - armv7 https://gitlab.incom.co/libretro/ppsspp/-/jobs/104350 - x86
According to https://android.googlesource.com/platform/bionic/+/master/docs/status.md, stpcpy was added in api 21. If I raise the minimum api to 21 (1), then the core compiles correctly. I am uncertain why it compiles for ndk <= r22 when targeting api 16. 64-bit targets are not affected because their minimum api is 21 period.
Don't know if the desired path will be to raise the minimum api or to change the stpcpy calls to something supported by lower ndk target apis.
1) https://gitlab.incom.co/libretro/ppsspp/-/blob/6c1f25f49513a58f67cc3e380f46499eaba1fbc7/.gitlab-ci.yml#L9
PPSSPP version affected
v1.11.3-1565-ga9f8608d6
Last working version
No response
Checklist
git submodule update --init --recursive
before building.