-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError when the apk launches with SDL2 bootstrap, kivy and python3crystax #658
Comments
Maybe it's a bug Can we apply a patch python3crystax? |
I'm not sure what's wrong here - it could maybe be the bug in python, but I know the python3 with crystax can work and the error isn't with any custom code which I haven't tested. There's currently a bug with python3crystax and kivy that could maybe manifest this way, involving being compiled with the wrong python. Could you try building with kivy 1.9.1 (not the master branch, as is the default) - I think you should be able to use 'kivy==1.9.1' in the requirements, though you'll also need to make sure everything is rebuilt (you can do |
Thank you for your answers.
|
Interesting that it's a different symbol it can't find. I think maybe it more generally has failed to find/load the python3 .so file. I haven't tried the build for a while, but I'll see if I can reproduce it (it could be a few days before I have time though). If you'd like to investigate, I'd start by checking the java bootstrap code and finding a way to check if it's loading python3.5m.so correctly. There may be a log message about this already, but I don't remember the format. If it isn't loading it, that is probably the problem. |
Yes you are right, i went a little fast, this is not the same result. and with kivy==1.9.1 I looked where the files .so point with my phone root and it seemed to be the right place but I may be wrong. |
It's the libpython3.5m.so that's important - did you find that one? And even if it's there (in the libs/armeabi folder), the important question is probably if it's loaded by the java bootstrap. |
I do not know if the libpython3.5m.so and finally fully charged by the bootstrap Java.
|
Perhaps we must add a few things as below to the bootstrap sdl2 _event.so) work ?
Have you a clues for to invest bootstrap sdl and libpython3.5m.so ? |
it is good it works :-) I added this to the setup.py file Kivy
and this to the setup.py file pyjnius:
|
I'm having the same problem with my kivy app on android (built on ubuntu), so it's great this is fixed! I'm using python-for-android - can someone please spare a few minutes to tell me how I merge the fix? |
@m-mcgowan This bug does not appear on distributions based on Archlinux. |
I think the bug comes from python-3.5 on Debian based, Debian ~$ python3.2 -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('PY_ENABLE_SHARED'))" ~$ python3.2 -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('BLDLIBRARY'))" Archlinx So I think it needs to be patched python3.5 for debian based but the easiest might be to add temporary patches recipes for Kivy and pyjnius. In recipes of kivy and pyjnius
set_extra_link_args_35.patch (in recipe kivy)
set_extra_link_args_35.patch (in recipe pyjnius)
what do you think ? |
Nice detective work. I don't have a debian-based install, but if you or anyone else would like to make a PR to fix it, it should be great to merge it. (I suspect the real issue is the way p4a calls python3, which is a bit hacky, so maybe eventually changing that would also fix things). |
Hi, However, as above, it just fails with an other error :
I tried to fix this by adding 'android' to the list of requirements, but that opened a new can of worm ☹. |
The exact same thing is happening here under Ubuntu 16.04. As with Debian, BLDLIBRARY is set to a static lib, and making the above patches to eliminate the |
I think this is probably fixed by ed1e1a8 |
I do not know if it actually works, but in my case it does not work with android 5.0. And I'd like to know why :-) (the apk works well with sdl2, Kivy, python 2)
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: