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
I have a short, runnable example that reproduces the issue
I reproduced the problem with the latest development version (p4a.branch = develop)
I used the grave accent (aka backticks) to format code or logs when appropriated
Versions
Python: script default (3.8.1?)
OS: Kubuntu (64-bit) 21.04
Kivy: script default
Cython: 0.29.19
OpenJDK: openjdk version "1.8.0_292"; OpenJDK Runtime Environment (build .8.0_292-8u292-b10-0ubuntu1-b10); OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)
Target Android API: 30 (that's why I am using ndk version = 21d)
Description
I am trying to build a hello world app using p4a for Android x86_64. The build completes successfully and without any warnings. However, when the app launches, it crashes on splash screen. Specifically, the app crashes at set wchar paths.
When building for x86 (or arm), everything works as expected and the app finishes at "Python for android ended".
I replicated the issue using p4a from pip as well as the dev version (master).
Upon futher insepction, I noticed that the build for x86_64 does not have zlib.cpython-38.so whereas other archs do have this library. I am certain that the missing zlib is the cause for this crash, however, I don't know why it is not generated for x86_64
buildozer.spec
N/A; using p4a directly from terminal (see command below), although I've replicated this using buildozer and got the same result.
Command:
This command generates working app (x86)
p4a apk --private $HOME/Desktop/myapp --package=sdl.app.test --name "My SDL Application" --version 0.1 --bootstrap=sdl2 --requirements=python3,openssl --android-api 30 --ndk-version 21d --arch x86
Thanks to the hint by @83-p, p4a generated zlib for x86_64 and the app launched as expected without crashes
If arch is x86_64, the NDK library path will be /usr/lib64. Pillow recipes need to change ndk_lib_dir = join(self.ctx.ndk_platform, 'usr', 'lib') to ndk_lib_dir = join(self.ctx.ndk_platform, 'usr', 'lib64').
Please change zlib_lib_path = join(self.ctx.ndk_platform, 'usr', 'lib') to zlib_lib_path = join(self.ctx.ndk_platform, 'usr', 'lib64') for the Python3 recipe.
Other recipes also need to check the NDK library path.
To ensure that you changed all required recipes, use grep -r "'usr', 'lib'" ." and change all relevant files to 'lib64'
Perhaps p4a should automatically default to lib64 folder if arch is 64bit
Checklist
p4a.branch = develop
)Versions
Description
I am trying to build a hello world app using p4a for Android x86_64. The build completes successfully and without any warnings. However, when the app launches, it crashes on splash screen. Specifically, the app crashes at
set wchar paths
.When building for x86 (or arm), everything works as expected and the app finishes at "Python for android ended".
I replicated the issue using p4a from pip as well as the dev version (master).
Upon futher insepction, I noticed that the build for x86_64 does not have
zlib.cpython-38.so
whereas other archs do have this library. I am certain that the missing zlib is the cause for this crash, however, I don't know why it is not generated for x86_64buildozer.spec
N/A; using p4a directly from terminal (see command below), although I've replicated this using buildozer and got the same result.
Command:
This command generates working app (x86)
This doesn't (x86_64)
Logs
main.py
print("hello world")
.bashrc
The text was updated successfully, but these errors were encountered: