Skip to content

How to build Android version openblas when armeabi-v7a-hard is no longer supported by ndk #1026

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

Closed
austingg opened this issue Dec 8, 2016 · 10 comments

Comments

@austingg
Copy link
Contributor

austingg commented Dec 8, 2016

Since the new ndk no longer supports armeabi-v7a-hard abi, how to build and use openblas in android or arm?

@martin-frbg
Copy link
Collaborator

See build script and documentation at the end of #963 please.

@austingg
Copy link
Contributor Author

austingg commented Dec 8, 2016

@martin-frbg great material. but that still armeabi-v7a-hard, I will try when use CFLAGS and LDFLAGS

@martin-frbg
Copy link
Collaborator

Sorry, I missed the significance of that aspect as I am far from being familiar with this platform.
It seems that the resolved issues concerning building with (beta versions of) NDK 12 were all about building for arm64 so their eventual success after fixing paths and cflags may be of little value to you.
Discussions in #853 suggest that a rewrite of at least the register part of the affected assembly routines would be required to restore compatibility with NDK12 and beyond for ARMV7, so it might be easier to stay with NDK11 until everybody wants to use aarch64 anyway.

@brada4
Copy link
Contributor

brada4 commented Dec 16, 2016

You can build ARMV5 target which has only C kernels and no assembly at all.

@austingg
Copy link
Contributor Author

thanks @martin-frbg and @ brada4. I successfully build the android version openblas on armeabi-v7a after I carefully reference the wiki.

@xiaodaxia
Copy link

xiaodaxia commented Jan 11, 2017

@austingg I had the same question with you and in your solution, you said carefully reference the wiki you successfully build openblas. Do you mean the wiki at the following location
https://github.com/xianyi/OpenBLAS/wiki/How-to-build-OpenBLAS-for-Android#linking-openblas-for-armv7?
I am a bit confused, as I also added flags like the wiki page,
CFLAGS += -mhard-float -D_NDK_MATH_NO_SOFTFP=1
LDFLAGS += -Wl,--no-warn-mismatch -lm_hard
I got the same link error which was solved by this issue#853. The linker always complain the error "uses VFP register arguments, output does not". However, the solution at that issue is too complicated, so I am writing to you for help.
I would like to know which modification to the Android.mk or Application.mk, or CFLAGS and LDFLAGS will make openblas work with android armeabi-v7a platform?

@austingg
Copy link
Contributor Author

austingg commented Jan 12, 2017

@xiaodaxia yes,I reference that wiki.
You may try TARGETS_CLFLAGS and TARGETS_LDFLAGS for a quick test.
if that failed, paste some code of your Android.mk to show how you link the openblas, then I can help you fix the problem.

@xiaodaxia
Copy link

xiaodaxia commented Jan 12, 2017

Thanks for your help! It did work.
The macro is TARGET_CFLAGS and TARGET_LDFLAGS, to be precise.
Thank you very much.

@austingg
Copy link
Contributor Author

@xiaodaxia great! I have updated the wiki for people who want to use openblas on Android.

@xianyi
Copy link
Collaborator

xianyi commented Jan 12, 2017

Thank you for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants