-
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
Numpy recipe broken (atlas, blas, lapack, -lcrystax) #1074
Comments
@KeyWeeUsr I remember discussing this a while ago, but I've lost the logs - did you say that the numpy recipe still does work if not using the crystax ndk? |
Afaik, yes, with the default Android SDK+NDK downloaded by buildozer (r9c, v21 I guess?). Here's the linked discussion on #kivy-dev. |
I've confirmed that the numpy recipe does work with the normal Android NDK, but not with the crystax one. However, I can't work out what's actually wrong, as numpy fails when trying to Since the recipe does work as well as it used to, I'm moving this issue to the 0.6 milestone instead, and doing a release as it stands. |
Hello,
I attach my error log. Normally, I should be able to use the numpy recipe with these NDK-SDK, no? |
@edouardmulliez The last time I tried with the latest buildozer & p4a numpy worked just fine. However I used the default SDK+NDK downloaded by buildozer (not Crystax, nor downloaded it myself), so perhaps that's the reason why? |
I think I'm using the default SDK+NDK downloaded by buildozer (I did not download any SDK/NDK myself). I just used the one present in the Virtual machine directly. |
@KeyWeeUsr I'm using the default SDK+NDK downloaded by buildozer, that's why I don't understand the errors I'm encountering. |
@edouardmulliez I'm getting the exact same error with the same settings you described- did anything end up fixing it for you? |
@sachgali |
@edouardmulliez See https://stackoverflow.com/questions/48072091/buildozer-numpy-runtimeerror-broken-toolchain-cannot-link-a-simple-c-program/48080592#48080592 (Note: I haven't tested this solution yet) |
@sachgali The solution you proposed is working for me, thanks a lot! |
Greetings! I installed gfortran and cmake for Numpy and Opencv and some missing stuffs... I replaced (as sudo!) android.py (this is my folder /usr/local/lib/python2.7/dist-packages/buildozer/targets/) (Create apk error) as this brilliant tip https://github.com/ibobalo/buildozer/blob/4b52cf354cc9913bc00a99ba652224f22266daab/buildozer/targets/android.py tanks to @ibobalo! I replaced init.py in the recipes Numpy folder (in my case /home/kivy/.local/lib/python2.7/site-packages/pythonforandroid/recipes/numpy/) as great tip #1209 thanks @mahomahomaho! So I modified the buildozer.spec file adding: All those things made my project compile, but when I transfer the apk to the android, if main.py has import numpy or cv2 it doesn't work but if the requirements in the spec is kivy,numpy and opencv but i only import kivy (in main.py) it works (without any call to Numpy or Opencv)!!! thanks! |
@cpkc I would discourage using sudo in anything related with p4a and buildozer. I run everyting as separate user, called 'bdozer', and all I have buildozer pip-installed to it's local pip packages. Anyway - not importing numpy or cv2 sounds like broken install. Did you try to rm -rf ~/.buildozer ./.buildozer and build it again? BTW - did you try to do |
Greetings All! @mahomahomaho, it's too slow deploying in my machine!!! This Hello World with numpy bellow works fine! import kivy from kivy.app import App import numpy class MyApp(App):
if name == 'main': but if I introduce cv or cv2 doesn't work! import kivy from kivy.app import App import numpy class MyApp(App):
if name == 'main': Thanks! |
Greetings! Suddenly works Hello World: import kivy from kivy.app import App import numpy import cv2 class MyApp(App):
if name == 'main': Here is the spec (I modified for numpy and opencv == master) Thanks @mahomahomaho and All! |
Can you guys give #882 (comment) a try and give some update? |
The numpy recipe currently seems to be working well. |
I found a similar result (atlas, blas) from #1040, yet the error was different. Maybe this is what @inclement's error was. I wonder how to fix it, because I can compile Kivy, pyjnius and some other packages, yet when trying to make a pandas recipe it breaks (pandas package requires numpy).
The error is rather strange though, because iirc, the
libcrystax.so
exists on android, so we create it somewhere here (or fetch from crystax, +/- shouldn't matter in this case), so it should be able to see it, right? It doesn't make sense to me as Kivy itself surely sees thelibcrystax.so
and even the numpy'sget_libs()
is patched so that its code shouldn't even be called(return []
). I checked and the patching went correctly, so... for now I have no clue about how to fix it. I'll look at the same case with using Android NDK as a replacement, though I don't think it's only about-lcrystax
flag (foundlibcrystax.so
in all crystax apps).The text was updated successfully, but these errors were encountered: