-
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
apk not build using crystax NDK #992
Comments
same issue but with other symbol PyDict_Next in the same module _clock.so |
Also encountering the same error; identical to @KarimReefat |
I think it is actually caused by either buildozer or python-for-android; because it is using cython in a python 2.7 virtualenv and yet we are targeting python 3; thus it should be compiled in a python3 virtual environment. |
Planning to modify P4A tonight to use either venv or virtualenv3 aka virtualenv but where |
Also of note Buildozer is also guilty of forcing python 2.7, so I wll probably have to modify it too Line Number 546: https://github.com/kivy/buildozer/blob/master/buildozer/__init__.py#L546 |
I've been using only crystax for a while, without issues, so I'm not sure what's wrong. The python3 build is quite idiosyncratic though and needs cleaning up, so it's good to have references to ways it's failing for people. The bit about using a python2.7 virtualenv for python3 builds needs to be fixed, but actually shouldn't in generally stop the build working, as only pure python modules are built this way and most are py2/py3 compatible in the same source code. I've been building python3 apks for a while without any problems of this nature (actually I forgot about this issue!). With the recent release of python 3.6, it's become particularly important to fix up the python3 build, and I've been doing some preliminary work on this recently. The overall plan is to actually carry the hostpython and targetpython builds, using the build scripts of crystax, rather than using only the prebuilt binaries. I hope that if this is done well, it should both allow support of multiple python versions (in fact, possible most/all recent ones) and make the build more robust for people on different systems. However, things like this always throw up problems, so it's hard to say exactly what will happen when. |
@inclement so do you think it is a recent change kivy clock that may be causing the issue then? I have Python 3.5.2. Can you paste your logcat.
And finally what exactly is hostpython doing; I am trying to close a gap in understanding that is why I am asking. |
@FeralBytes Probably not, the kivy clock module is just the first cython one that gets imported so normally it's the one that registers as broken even though they all are. This setup.py file in the python-for-android testapp builds folders should produce a working python3 build. To use it, you'll need to update the ndk-dir path to point to your own local ndk. You don't need to add hostpython3crystax, although it's a minor bug that it will apparently be allowed alongside python2 in the requirements. |
@inclement worked through getting that file setup for my enviroment; and finally got it to build APK; but upon launching the APK on android; it crashes again as soon as kivy is imported with a failure pointing at _clock.so . |
@inclement even tried with the Kivy Hello World Example.
Are you currently able to compile anything with Kivy? |
By pushing Kivy way back in GIT I was able to get the error to change to: Still working backwards. |
So that every one is aware; at this time; I have stopped trying Crystax builds and Py3. I just am using my code under Py2; since my code is compatable; that is except python-osc. So I am now going to either switch to Kivy-OSC of port python-osc 3to2. |
For me crystax builds are now working either using Buildozer or a P4A setup.py script. I am not sure what exactly changed; whether it be on my system or else where; but by starting from a basic (not crystax) build with p4a and slowing adding requirements everything began working. |
@FeralBytes I was implementing a feature for plyer and at that time apk was not building using android ndk so I was suggested to use crystax. After facing this issue, I somehow made my apk build using android ndk. So I continued my work on that feature and thought of looking into this issue sometime later. Now that you have got crystax builds working fine, if you suggest I will close this issue. Or we should wait for @KarimReefat's response? |
Well before closing it; do you know if your Crystax build is working again? If Crystax is again working for you; then yes close it; because something got fixed for all of us; but I don't know what. Though it seems the common fact was going back to regular apk build process and working from there. |
Just looking through this issue, does it actually have anything to do with the crystax NDK? Do builds specifically work when not using CrystaX, but fail when using it? The dlopen error appears to be caused by missing linker arguments under some circumstances, but it depends on the local environment in a way I don't understand. I may try some things at the weekend that could fix it. |
Yes @inclement , the builds were working fine when not using CrystaX NDK and py3. |
Okay. Do python2 builds work with crystax? The python2 and python3
builds are quite different internally, so this would be useful to know.
If it's only the python3 build that fails, I probably have a fix for it,
but I have to test some things.
…On 10/02/17 19:22, Sumit Madhwani wrote:
Yes @inclement <https://github.com/inclement> , the builds were working
fine when not using CrystaX NDK and py3.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#992 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABNQm8CEkO4rhjeFuYEpt5jhbjdIxDqGks5rbLjcgaJpZM4LsuMc>.
|
I have not tested it with py2. I will test it using py2 and will inform you till tomorrow. Will that be fine? |
No rush at all. Thanks!
…On 10/02/17 19:27, Sumit Madhwani wrote:
I have not tested it with py2. I will test it using py2 and will inform
you till tomorrow. Will that be fine?
If you want it urgently, I will do it now.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#992 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABNQmweXkXSD52TIJHUJmQWS-1KvjEpxks5rbLokgaJpZM4LsuMc>.
|
@inclement for me the regression in being able to build was for more than just Crystax; that is until at least I went all the way back to the old tool chain. Then as I built back up everything was working again. So I really don't know what went wrong at least in my case. |
I've just pushed ed1e1a8 which should (I hope) fix this problem. |
Please do not close this bug; I think I now know the issue. I think the real issue is; once you build with crystax all of the libs we depend on: "libSDL2.so", "libpython2.7.so" or "libpython3.5.so" depend on "libcrystax.so". The issue arises when you go back to a non-crystax build; and with enough debugging the error actually shows it's self rather than blowing up on Android as happened to me previously. Also if the dist name is the same for a Crystax and a Google build then the dist folder will also need to be removed because the dist will already contain the corrupted ".so" files and no build will occur. Alright now for the adb logcat output; but with out the full memory dump:
And this one shows that libpython is also affected:
|
Update the command must eliminate all of build so now passing to subprocess: ['rm', '-rf', os.path.join(os.path.expanduser('~'), '.local/share/python-for-android/build')] |
My tts apk is working fine with crystax ndk |
In fact, I wonder why author don't Because I got wrong when I try to build apk with it. |
Check my buildozer spec file. |
Thank you, I built successfully.
But is it normal to get a 19.6M .apk file?
…On May 24, 2017 2:21 AM, "IsaBostan" ***@***.***> wrote:
Check my buildozer spec file.
I hope it helps
https://github.com/rockcastle/Python-Kivy-Android-app?files=1
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#992 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQZPraeL6hTH6TO1e3fZ9rBcpbDnL9EKks5r8yOdgaJpZM4LsuMc>
.
|
I have similar sizes for my apps. |
CrystaX-built APKs are about 9MB larger than they need to be due to a bug in what is included. You can make them much smaller by locating the dist directory and deleting the |
And there has another problem, Buildozer currently does not support built
apk with python3crystax.
If you import something like flask, it'll get wrong due to python2.
#1041
2017-05-25 6:17 GMT+08:00 Alexander Taylor <[email protected]>:
… CrystaX-built APKs are about 9MB larger than they need to be due to a bug
in what is included. You can make them much smaller by locating the dist
directory and deleting the usr directory, which I think is in something
like dist_dir/crystax_python/site-packages. I'll check the exact path
when I next make a python3 APK.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#992 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQZPrdbZwzsCkG8ulU2W5P0PjWh9RyqRks5r9KyIgaJpZM4LsuMc>
.
|
Hi, |
@inclement that's super interesting, I would do anything to have my APKs 9M smaller! Edit: following up our discussion on IRC, it does not seem to be an issue anymore. For record the problem was |
Hello. |
@homdx thanks, that will be useful for anyone dropping by via google ❤️ @Malverick thanks for the report! I have been not involved in this discussion/ticket, but from what I can see this is mostly around CrystaX which is no longer needed: there is a regular I'll therefore close this for now, but feel absolutely free to poke me if there is still a problem with the particular issue you initially reported and I'll reopen - so far it's to my knowledge still undecided if/when CrystaX will be fully dropped, after all |
I am building apk using crystax NDK. I am following the same instructions as mentioned in python-for-android documentation.
I am getting following error for the line
from kivy.app import App
logs
The text was updated successfully, but these errors were encountered: