-
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
Fixing wrong use of ar when building numpy #414
Conversation
This patch seems good in principle, but I had some issues with it. It's possible that they're related to how I tried it though (with the new p4a toolchain):
I'll keep testing, or this seems good to merge if someone else can confirm it works. Can you or anyone else confirm that this patch definitely works as it stands? |
If you are in the numpy build directory , you can apply the patches witth I'm working on recipes for gnuradio which requires numpy. |
I got it working (including further fixes) using the patch set at https://github.com/kivy/python-for-android/tree/revamp/pythonforandroid/recipes/numpy/patches, which includes the one from this issue (but a modified patch file) plus another to stop numpy trying to pull in system libraries. I still haven't tested this specific PR, but it looks good to me if someone else (or me when I get time) can run the build to check. |
It cleanly compiles with this patch set. |
I didn't merge this only because I'm not sure about hardcoding 'arm-linux-androideabi-ar' - can anyone on OS X comment on whether this is the correct binary name there? |
This one worked like a charm! Thanks @dl1ksv ! |
I've merged this into the old_toolchain branch. Thanks for the fixes, and sorry for the delay with it - I'm still worried about this not working on osx, but since nobody ever commented about it let's just fix it for everyone on linux at least (and maybe it works on osx anyway). |
Sorry I'm newbie how do I apply this patch to work with opencv? |
You ask on support channel https://github.com/kivy/python-for-android#support |
No, but I'm going to ask now. thank you. |
numpy does not build ( see issue 409 ).
#409
Though the correct version of ar is found
Found executable /usr/bin/gfortran
Found executable /opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld
Found executable /opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ar
Found executable /opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ranlib
the build process uses ar instead of arm-linux-androideabi-ar.
I fixed this by using $AR which is set by distribute.sh
In addition I found that lapack_lite.so and some other libs require linking against libm.so when running on android-21.
I fixed this, too.