Skip to content
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

Problems with using arm version on Android #363

Closed
kurak38 opened this issue Apr 22, 2014 · 54 comments
Closed

Problems with using arm version on Android #363

kurak38 opened this issue Apr 22, 2014 · 54 comments

Comments

@kurak38
Copy link

kurak38 commented Apr 22, 2014

Hi,
I am using Download openblas-0.2.9-rc2-armv6.tar.gz (8.1 MB) (http://sourceforge.net/projects/openblas/files/v0.2.9-rc2-arm/) and I have problem with undefined references to:
shmget, shmat, shmdt, shctl, get_nprocs, pthread_atfork, stderr and _gfortran_compare_string.
I am using APP_STL := gnustl_static with LDLIBS : libgnustl_static.a and libsupc++.a. GNU STL from android-ndk-r9d version 4.8 of gcc.
The most problematic, I think, would be function with shared memory, while on Android there is no such thing to use.
Please give me any advice
Thanks in advance
Adam

@xianyi
Copy link
Collaborator

xianyi commented Apr 22, 2014

Hi @kurak38 ,

Sorry, we didn't provide 0.2.9.rc2 version for Android so far.

Please try our old version.
http://sourceforge.net/projects/openblas/files/v0.2.8-arm/openblas-v0.2.8-android-rc1.tar.gz/download

It's armv5tel ( single thread and without lapack ).

Xianyi

@kurak38
Copy link
Author

kurak38 commented Apr 22, 2014

hmm, but there is no lapacke.h and I need it

@xianyi
Copy link
Collaborator

xianyi commented Apr 22, 2014

@kurak38, Why do you need BLAS and LAPACK on Android?

1 similar comment
@xianyi
Copy link
Collaborator

xianyi commented Apr 22, 2014

@kurak38, Why do you need BLAS and LAPACK on Android?

@kurak38
Copy link
Author

kurak38 commented Apr 22, 2014

I'm porting some other library that requires both

@xianyi
Copy link
Collaborator

xianyi commented Apr 22, 2014

LAPACKE is a C wrapper for LAPACK, which also calls LAPACK fortran code. Thus, I thinks it need a Fortran compiler for Android.
I found a blog about Fortran on Android.
http://danilogiulianelli.blogspot.com/2013/02/how-to-build-gcc-fortran-cross-compiler.html

@kurak38
Copy link
Author

kurak38 commented Apr 22, 2014

Is it possible that you send me your source code? (kurak38@gmail.com)

@xianyi
Copy link
Collaborator

xianyi commented Apr 24, 2014

@kurak38 , I think the source code is on github.com.

We didn't have other codes for ARM.

@soumith
Copy link

soumith commented Apr 24, 2014

Interesting. i'd definitely want to cross-compile for android. We use it for running neural nets on Android.

@kurak38
Copy link
Author

kurak38 commented Apr 24, 2014

I have managed to compile it by taking advantage of https://github.com/simonlynen/android_libs to build only lapack. Then add it to openBlas for android mention before and it worked.

@soumith
Copy link

soumith commented Apr 30, 2014

@xianyi Are there instructions to compile the latest HEAD on android? or is it too complicated

@soumith
Copy link

soumith commented Apr 30, 2014

@xianyi I ask, because I want to compile for android with multithreads, rather than just a single-threaded version

@xianyi
Copy link
Collaborator

xianyi commented May 2, 2014

In OpenBLAS/GotoBLAS, it used some System V IPC functions in multi-threading implementation, which is not supported in Android NDK.
Thus, we need to eliminate these IPC callings.

@wernsaar , any suggestions?

@wernsaar
Copy link
Contributor

wernsaar commented May 2, 2014

On 02.05.2014 11:53, Zhang Xianyi wrote:

In OpenBLAS/GotoBLAS, it used some System V IPC functions in multi-threading implementation, which is not supported in Android NDK.
Thus, we need to eliminate these IPC callings.

@wernsaar , any suggestions?


Reply to this email directly or view it on GitHub:
#363 (comment)
Hi,

Android does not support System V IPC in the kernel, but has a mechanism
called ashmem. First we need a configuration option like
TARGET_OS = OS_ANDROID, where OS_ANDROID is a subtype of
OS_LINUX. Then we can implement ashmem in memory.c and some other
files.

Best regards

Werner

@sonicdebris
Copy link

Hi, any news about android support? I'm trying to build 0.2.8 for armv7 (I downloaded the sources from the 0.2.8 tag at: https://github.com/xianyi/OpenBLAS/tree/v0.2.8 )

Now I'm struggling to put together an android makefile, and I was wondering if the one used to build the armv5 version is available somewhere. Thanks!

@xianyi
Copy link
Collaborator

xianyi commented Feb 10, 2015

@wernsaar , could you answer this question?

@bhack
Copy link

bhack commented Jun 18, 2015

@xianyi We are interested in this at BVLC/caffe#2619. We are now relaying on eigen for this build but we want to recover openblas support.
/cc @sh1r0

@ibrahima
Copy link

I'm also interested in this. What is the intended result of a11555c ? Should it build and link correctly on Android?

@xianyi
Copy link
Collaborator

xianyi commented Jun 20, 2015

@ibrahima , so far, it can generate multi-threaded BLAS library by NDK cross compiler. However, I didn't test it on any Android phone. I think it should work.

@ibrahima
Copy link

Hmm, I was actually able to build libopenblas.so and run the tests from https://github.com/xianyi/OpenBLAS/wiki/User-Manual on my Nexus 5 but I had to fiddle a bit with different toolchains and flags. I think the current branch needs some more flags in Makefile.arm for Android to link properly. Also it's a bit tricky because I think some flags that I needed are due to Android 5.0/5.1 and may cause things to break on earlier versions.

Here's what I currently have in my Makefile.arm:

CCOMMON_OPT += -marm -mfpu=neon -mfloat-abi=hard -march=armv7-a -mhard-float -D_NDK_MATH_NO_SOFTFP=1 -Wl,--no-warn-mismatch -lm_hard -Wl,--hash-style=sysv -fPIE -Wl,-fPIE

but some of those flags might not be necessary because I ran into a lot of errors trying to get things working. I ended up using some ndk10 version of gcc 4.8 I think (not sure because I tried a lot of different toolchains and have different things floating around). I think a recent version of the NDK is needed for hardfloat support.

All of the above is provided as reference for anyone else trying this out; if I can clean up my changes and document it correctly I will try and submit a pull request that makes this easier. My actual end goal is to run https://github.com/scalanlp/breeze on Android with native BLAS and I'm still struggling with getting openblas loaded via JNI but at least now I know that the shared library works from C code.

@bhack
Copy link

bhack commented Jun 21, 2015

@ibrahima See also my comment at BVLC/caffe#2619 (comment)

@xianyi
Copy link
Collaborator

xianyi commented Jun 23, 2015

@ibrahima , Thank you for your work.

@bhack
Copy link

bhack commented Jun 25, 2015

@xianyi I've tried with
make TARGET=ARMV7

but there is some missing define in gemv.c

-c -O2 -DMAX_STACK_ALLOC=2048 -Wall -DF_INTERFACE_GFORT -fPIC -DNO_LAPACK -DNO_LAPACKE -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER= -marm -mfpu=neon  -mfloat-abi=hard -march=armv7-a -DASMNAME=sgemv -DASMFNAME=sgemv_ -DNAME=sgemv_ -DCNAME=sgemv -DCHAR_NAME=\"sgemv_\" -DCHAR_CNAME=\"sgemv\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX -o sgemv.o gemv.c
gemv.c: In function 'sgemv_':
gemv.c:242:41: error: 'GEMM_MULTITHREAD_THRESHOLD' undeclared (first use in this function)
   if ( MNK <= (24.0 * 24.0  * (double) (GEMM_MULTITHREAD_THRESHOLD*GEMM_MULTITHREAD_THRESHOLD) )  )

Update: i solved this with USE_THREAD=0

@bhack
Copy link

bhack commented Jun 26, 2015

@ibrahima What do you think of #562 (comment)?

@xianyi
Copy link
Collaborator

xianyi commented Jun 26, 2015

@bhack , interesting. I didn't meet GEMM_MULTITHREAD_THRESHOLD error before. Could you clone OpenBLAS to a new directory and make?

@xianyi
Copy link
Collaborator

xianyi commented Jun 26, 2015

@bhack , @ibrahima , For #562 (comment) issue, the ARMV5 target only uses C codes. Therefore, it can support softfp ABI by changing the compiler flag at Makefile.arm.

@bhack
Copy link

bhack commented Jun 27, 2015

@xianyi I think that the problem was with NDK cross compiling Openblas Makefile generate a binary getarch as an ELF 32-bit LSB executable, ARM so that cannot be executed by make script on a x86 host.
I've solved adding HOSTCC=gcc

@bhack
Copy link

bhack commented Jun 30, 2015

@xianyi I've builded the library under NDK. This is the readelf -A output. It is softfp on armv7a and VFPV3. Will this crash at runtime?

  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Applicazione
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-2
  Tag_FP_arch: VFPv3
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8 byte
  Tag_ABI_align_preserved: 8 byte, ad eccezione della foglia SP
  Tag_ABI_enum_size: int
  Tag_ABI_HardFP_use: SP and DP
  Tag_ABI_optimization_goals: Aggressive Speed
  Tag_CPU_unaligned_access: v6

@xianyi
Copy link
Collaborator

xianyi commented Jun 30, 2015

@bhack , which TARGET do you use? If you use ARMV7 target, I think it should crash.

@bhack
Copy link

bhack commented Jun 30, 2015

@xianyi Yes ARMV7. Do you want that I make a test to see if it crash?

  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7

@xianyi
Copy link
Collaborator

xianyi commented Jun 30, 2015

Yes, you can test it. Thank you

@bhack
Copy link

bhack commented Jun 30, 2015

@xianyi What kind of test do you suggest to run?

@xianyi
Copy link
Collaborator

xianyi commented Jun 30, 2015

You can try to run cblas_dgemm.
https://gist.github.com/xianyi/5783218

@bhack
Copy link

bhack commented Jun 30, 2015

Yes as i supposed go in segmentation fault on clblas_dgemm call.
We are still trying to figure out how to let opencv and openblas be linked together on Android. @xianyi If you can give some feedback at opencv/opencv#4163 will be appreciated.

@xianyi
Copy link
Collaborator

xianyi commented Jul 1, 2015

@bhack , I think I can add softfp ABI for OpenBLAS Android target. I need to learn how to generate the test binary and deploy on my android phone.

@bhack
Copy link

bhack commented Jul 1, 2015

It is quite easy to test. I've simply used the standalone toolchain to compile your example, uploaded the executable with adb push and run with adb shell after changing file permission. On the phone I think you need to have a rooted firmware but probably you can try with adb on the emulator.

@xianyi
Copy link
Collaborator

xianyi commented Jul 1, 2015

Thank you for your tip.

I can run the test on my android phone without root now. Put the C binary into /data/local folder.

adb push $yourfile /data/local 
adb shell

@bhack
Copy link

bhack commented Aug 3, 2015

There is some activity on opencv side at opencv/opencv#5098

@xianyi
Copy link
Collaborator

xianyi commented Aug 3, 2015

@bhack Thank you for the update.

@wyansfu
Copy link

wyansfu commented Sep 9, 2015

@xianyi @ibrahima I wonder how to cross compile OpenBLAS with NDK exactly. The first issue I can imagine is there's not Fortran compiler in NDK, are you using something else? Second, I ignore this anyway and follow the instructions in https://github.com/xianyi/OpenBLAS/wiki/User-Manual, i.e.

make CC="/cs/vml3/wyan/DownloadedSoftware/AndroidToolChain/arm-linux-androideabi-4.9APILevel8/bin/arm-linux-androideabi-gcc" HOSTCC=gcc TARGET=ARMV7

However, I get the output with error.

make[1]: Entering directory `/cs/vml3/wyan/DownloadedSoftware/OpenBLAS-0.2.14/interface'
/cs/vml3/wyan/DownloadedSoftware/AndroidToolChain/arm-linux-androideabi-4.9APILevel8/bin/arm-linux-androideabi-gcc -O2 -Wall -DF_INTERFACE_G77 -fPIC -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=8 -marm -mfpu=vfpv3  -mfloat-abi=hard -march=armv7-a -DASMNAME=saxpy -DASMFNAME=saxpy_ -DNAME=saxpy_ -DCNAME=saxpy -DCHAR_NAME=\"saxpy_\" -DCHAR_CNAME=\"saxpy\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX -c axpy.c -o saxpy.o
/cs/vml3/wyan/DownloadedSoftware/AndroidToolChain/arm-linux-androideabi-4.9APILevel8/bin/arm-linux-androideabi-gcc -O2 -Wall -DF_INTERFACE_G77 -fPIC -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=8 -marm -mfpu=vfpv3  -mfloat-abi=hard -march=armv7-a -DASMNAME=sswap -DASMFNAME=sswap_ -DNAME=sswap_ -DCNAME=sswap -DCHAR_NAME=\"sswap_\" -DCHAR_CNAME=\"sswap\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX -c swap.c -o sswap.o
/cs/vml3/wyan/DownloadedSoftware/AndroidToolChain/arm-linux-androideabi-4.9APILevel8/bin/arm-linux-androideabi-gcc -O2 -Wall -DF_INTERFACE_G77 -fPIC -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=8 -marm -mfpu=vfpv3  -mfloat-abi=hard -march=armv7-a -DASMNAME=scopy -DASMFNAME=scopy_ -DNAME=scopy_ -DCNAME=scopy -DCHAR_NAME=\"scopy_\" -DCHAR_CNAME=\"scopy\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX -c copy.c -o scopy.o
/cs/vml3/wyan/DownloadedSoftware/AndroidToolChain/arm-linux-androideabi-4.9APILevel8/bin/arm-linux-androideabi-gcc -O2 -Wall -DF_INTERFACE_G77 -fPIC -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=8 -marm -mfpu=vfpv3  -mfloat-abi=hard -march=armv7-a -DASMNAME=sscal -DASMFNAME=sscal_ -DNAME=sscal_ -DCNAME=sscal -DCHAR_NAME=\"sscal_\" -DCHAR_CNAME=\"sscal\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX -c scal.c -o sscal.o
/cs/vml3/wyan/DownloadedSoftware/AndroidToolChain/arm-linux-androideabi-4.9APILevel8/bin/arm-linux-androideabi-gcc -O2 -Wall -DF_INTERFACE_G77 -fPIC -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=8 -marm -mfpu=vfpv3  -mfloat-abi=hard -march=armv7-a -DASMNAME=sdot -DASMFNAME=sdot_ -DNAME=sdot_ -DCNAME=sdot -DCHAR_NAME=\"sdot_\" -DCHAR_CNAME=\"sdot\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX -c dot.c -o sdot.o
/cs/vml3/wyan/DownloadedSoftware/AndroidToolChain/arm-linux-androideabi-4.9APILevel8/bin/arm-linux-androideabi-gcc -O2 -Wall -DF_INTERFACE_G77 -fPIC -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=8 -marm -mfpu=vfpv3  -mfloat-abi=hard -march=armv7-a -DASMNAME=sdsdot -DASMFNAME=sdsdot_ -DNAME=sdsdot_ -DCNAME=sdsdot -DCHAR_NAME=\"sdsdot_\" -DCHAR_CNAME=\"sdsdot\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX -c sdsdot.c -o sdsdot.o
/cs/vml3/wyan/DownloadedSoftware/AndroidToolChain/arm-linux-androideabi-4.9APILevel8/bin/arm-linux-androideabi-gcc -O2 -Wall -DF_INTERFACE_G77 -fPIC -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=8 -marm -mfpu=vfpv3  -mfloat-abi=hard -march=armv7-a -DASMNAME=dsdot -DASMFNAME=dsdot_ -DNAME=dsdot_ -DCNAME=dsdot -DCHAR_NAME=\"dsdot_\" -DCHAR_CNAME=\"dsdot\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX -c dsdot.c -o dsdot.o
/cs/vml3/wyan/DownloadedSoftware/AndroidToolChain/arm-linux-androideabi-4.9APILevel8/bin/arm-linux-androideabi-gcc -O2 -Wall -DF_INTERFACE_G77 -fPIC -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=8 -marm -mfpu=vfpv3  -mfloat-abi=hard -march=armv7-a -DASMNAME=sasum -DASMFNAME=sasum_ -DNAME=sasum_ -DCNAME=sasum -DCHAR_NAME=\"sasum_\" -DCHAR_CNAME=\"sasum\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX -c asum.c -o sasum.o
In file included from scal.c:40:0:
../common.h:109:21: fatal error: sys/shm.h: No such file or directory
 #include <sys/shm.h>
                     ^
In file included from axpy.c:40:0:
../common.h:109:21: fatal error: sys/shm.h: No such file or directory
 #include <sys/shm.h>
                     ^
In file included from dsdot.c:40:0:
../common.h:109:21: fatal error: sys/shm.h: No such file or directory
 #include <sys/shm.h>
                     ^
In file included from swap.c:40:0:
../common.h:109:21: fatal error: sys/shm.h: No such file or directory
 #include <sys/shm.h>
                     ^
compilation terminated.
In file included from dot.c:40:0:
../common.h:109:21: fatal error: sys/shm.h: No such file or directory
 #include <sys/shm.h>
                     ^
In file included from copy.c:40:0:
../common.h:109:21: fatal error: sys/shm.h: No such file or directory
 #include <sys/shm.h>
                     ^
compilation terminated.
compilation terminated.
compilation terminated.
compilation terminated.
In file included from asum.c:40:0:
../common.h:109:21: fatal error: sys/shm.h: No such file or directory
 #include <sys/shm.h>
                     ^
In file included from sdsdot.c:40:0:
../common.h:109:21: fatal error: sys/shm.h: No such file or directory
 #include <sys/shm.h>
                     ^
compilation terminated.
make[1]: *** [sdot.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [sswap.o] Error 1
make[1]: *** [dsdot.o] Error 1
make[1]: *** [scopy.o] Error 1
make[1]: *** [sasum.o] Error 1
make[1]: *** [sscal.o] Error 1
compilation terminated.
compilation terminated.
make[1]: *** [saxpy.o] Error 1
make[1]: *** [sdsdot.o] Error 1
make[1]: Leaving directory `/cs/vml3/wyan/DownloadedSoftware/OpenBLAS-0.2.14/interface'
make: *** [libs] Error 1

I can find the missing shm.h somewhere in the toolchain folder, but it's not under sys. Should I modify the source? I'm using NDK r10e.

I also have tried to integrate the pre-compiled OpenBLAS from http://sourceforge.net/projects/openblas/files/v0.2.14/OpenBLAS-v0.2.14-armv7a.tar.gz/download into my C++ code which calls some cblas functions, but had the following error when trying to load the OpenBLAS shared library. My project is built using tools from taka-no-me/android-cmake#59 with ANDROID_ABI="armeabi-v7a-hard with NEON"

Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "libm.so.6" needed by "libopenblas_armv7p-r0.2.14.so"; caused by load_library(linker.cpp:745): library "libm.so.6" not found

Thank you very much.

@ibrahima
Copy link

ibrahima commented Sep 9, 2015

I don't have time to give a full explanation, but basically you need to build a standalone NDK toolchain (with headers from 5.0/5.1 IIRC) and modify the NDK source to build a gcc toolchain. I took the instructions from http://danilogiulianelli.blogspot.com/2013/02/how-to-build-gcc-fortran-cross-compiler.html and updated the patch for the latest version of the ndk.

These repos might help with building an up to date NDK toolchain with Fortran:

https://github.com/biotrump/ndk-r10e-build
https://github.com/biotrump/fortran-NDK

Hope that helps!

@wyansfu
Copy link

wyansfu commented Sep 9, 2015

@ibrahima Do you have the header problem I mentioned? Which API level do you use in the toolchain? Thank you.

@xianyi
Copy link
Collaborator

xianyi commented Sep 9, 2015

@wyansfu, could you try develop branch? I think it support android.

https://github.com/xianyi/OpenBLAS/wiki/How-to-build-OpenBLAS-for-Android

@ibrahima
Copy link

ibrahima commented Sep 9, 2015

@wyansfu I used the latest API level, I think some of the needed headers weren't added until 5.0 or 5.1.

@buffer51
Copy link
Contributor

@wyansfu I have managed to compile with multithreading and LAPACK, but that requires a Fortran compiler as @ibrahima mentionned. I'm putting instructions together, should not be long.

Did you try building without multithreading and LAPACK though (USE_THREAD=0 NO_LAPACK=1)? I had it working with NDK r10e out of the box. You should specify the Android sysroot for the GCC toolchain. Try CC="/path/to/ndk/toolchain/arm-linux-androideabi-4.9/prebuilt/.../bin/arm-linux-androideabi-gcc --sysroot=/path/to/ndk/platforms/android-21/arch-arm"

@wyansfu
Copy link

wyansfu commented Sep 15, 2015

@xianyi It compiles and works with your instructions. Thank you very much. There seems to be a bug in the makefile. For path with '-', the make command may fail, e.g.

make CC=/cs/vml3/wyan/DownloadedSoftware/AndroidToolChain/arm-linux-androideabi-4.9APILevel8/bin/arm-linux-androideabi-gcc HOSTCC=gcc TARGET=ARMV7 NO_LAPACK=1

reports

make[1]: /cs/vml3/wyan/DownloadedSoftware/AndroidToolChain/arm-linux-ar: Command not found
make[1]: *** [libs] Error 127
make[1]: Leaving directory `/cs/vml3/wyan/DownloadedSoftware/OpenBLAS-developcopy/interface'
make: *** [libs] Error 1

And I have to use

make CC=/cs/vml3/wyan/DownloadedSoftware/AndroidToolChain/arm-linux-androideabi-4.9APILevel8/bin/arm-linux-androideabi-gcc CROSS_SUFFIX=/cs/vml3/wyan/DownloadedSoftware/AndroidToolChain/arm-linux-androideabi-4.9APILevel8/bin/arm-linux-androideabi- HOSTCC=gcc TARGET=ARMV7 NO_LAPACK=1

@ibrahima @buffer51 I have not tried to compile the LAPACK since I'm not using it. But your posts are anyway very helpful, and I bet there are lots of people want to compile OpenBLAS with LAPACK. Thank you all the same.
@buffer51 I have tried to build without LAPACK according to the post of @xianyi, and it works. But I have not tried USE_THREAD=0.

@buffer51
Copy link
Contributor

@wyansfu If it works fine without the USE_THREAD=0 don't add it, it was just to disable multi-threading to be sure it compiled.

@xianyi xianyi closed this as completed Oct 29, 2015
@xylcbd
Copy link

xylcbd commented Dec 28, 2015

so,is there any andorid arm-based openbla binary package ? can I use openblas on android system? thx.

@grandLee
Copy link

@xianyi do you have the plan to compile the android version of 0.2.9.rc2,since we need the lapacke,but i'm not good at this,or could anyone give me some assist?thanks!

@buffer51
Copy link
Contributor

@grandLee Please see https://github.com/xianyi/OpenBLAS/wiki/How-to-build-OpenBLAS-for-Android for instructions to build OpenBLAS for Android, with lapacke.

@shenyuhit
Copy link

@xianyi
with "http://sourceforge.net/projects/openblas/files/v0.2.8-arm/openblas-v0.2.8-android-rc1.tar.gz/download" i can run my app on android is ok! but how can i build the libopenblas.a myself ?

i try build with the version 0.2.19,.
${ANDROID_NDK}/build/tools/make_standalone_toolchain.py --arch arm --api 21 --install-dir /tmp/my-android-toolchain
export PATH="/tmp/my-android-toolchain/bin:$PATH";make TARGET=ARMV7 HOSTCC=gcc CC=arm-linux-androideabi-gcc ARM_SOFT_FLOAT_ABI=1 NOFORTRAN=1 USE_THREAD=0

but my app is crash every time !

@buffer51
Copy link
Contributor

@shenyuhit Hi, do you mean that building OpenBLAS doesn't work (i.e. your make command) or that it does, but then when you use the generated libopenblas.a your app crashes?

@shenyuhit
Copy link

@buffer51 yes, my app crashes with the libopenblas.a generated by myself! Do you have any advise ?

@buffer51
Copy link
Contributor

Do you happen to have logs from the crashes?

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

No branches or pull requests