kivy / kivy/python-for-android
When building python3.14 user should be forced to upgrade to ndk_target_24 and api_target_24 instead of throwing an error that is not understood.
- Dominant language
- Python
- Stars
- 8.9k
- Forks
- 2k
- Avg merge
- 12h 20m
- Merged PRs (30d)
- 9
Description
I got this error while building python3.14
```c
/home/kengo/PycharmProjects/parkkly/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_23/python3/Python/remote_debugging.c:48:19: error: call to undeclared function 'pwritev'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
48 | written = pwritev(handle->memfd, local, 1, offset);
| ^
```
After some research I discovered that:
> This means the compiler encountered a call to pwritev() but couldn't find its prototype.
In modern C (C99+), calling undeclared functions is no longer allowed.
And it could be fixed by patching `Python/remote_debugging.c` to include
```c
#include
```
Which I think should be a good option to still support lower android versions.
But then again I discovered that:
> Android NDK only supports pwritev() from API level 24 (Android 7.0, Nougat) and above.
Contributor guide
Research direction
Start with Python/remote_debugging.c and reproduce the python3.14 build using ndk_target_23 and api_target_23. Trace where python-for-android handles these target settings; done means the build clearly requires ndk_target_24 and api_target_24 instead of emitting the unexplained pwritev() error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, python
- Domain
- build-system, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100