-
Notifications
You must be signed in to change notification settings - Fork 6.8k
How to compile Amalgamation for android? #7146
Comments
Would you like to submit a pr for the fopen fix? |
@ZaccurLi when I retry to use your method I got an error on OpenBLAS compilation :
how did you solve this problem ? |
I test it different ndk version : |
I made a Dockerfile to automate mxnet compilation for android and resume your process. |
Did you successfully run an android app with output library? I got following errors with version
|
not yet I'll test this week and give you feedback if it works (or not) |
hi @Corea indeed with @edmBernard we had the same log error after adding |
there is the same issue here : #7180 |
PR #7222 should fix this issue. Please try it out. |
thanks it work fine for me |
@arank
On 2017年9月13日, at 02:50, IceBo <[email protected]> wrote:
where should copy the libc++_shared.so to? I copy it to jniLibs/armeabi and write System.loadBinary("c++_shared"); in Predictor.java, but the app will stop when opening.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@ZaccurLi |
@Corea i have met the same problem 'can not find openblas.so', how did you solve it? thanks |
@zhulihuacmss |
How to compile Amalgamation for android?
Environment info
Operating System:
Ubuntu 14.04 64bit Desktop
NDK vesion:
android-ndk-r13b
orandroid-ndk-r14b
Compiler:
arm-linux-androideabi-clang++
MXNet version:
v0.10.0
orv0.9.3
MXNet commit hash : * master 799ed45
Error Message:
Steps to Compile
Prepare:
NDK Standalone ToolChain:
cd yourpath/android-ndk-r13b/build/tools python make_standalone_toolchain.py --arch arm --api 21 --install-dir yourpath/android-toolchain --stl=libc++
Download and Compile OpenBLAS
Compile:
Download Mxnet
Compile Amalgamation
1.move into mxnet/amalgamation and prepare compile toolchain
2.modify OpenBLAS path in mxnet/amalgamation/Makefile:(line 5)
3.add DEFS in mxnet/nnvm/amalgamation/Makefile:(line 2)
4.add
#define fopen64 std::fopen
toAmalgamation.py(line 130)
ormxnet_predict-all.cc(line 1)
4.1 In
Amalgamation.py
or
4.2 In
mxnet_predict-all.cc
5.compile amalgamation
Library
Output: jni_libmxnet_predict.so
copy jni_libmxnet_predict.so and libc++_shared.so to android project
The text was updated successfully, but these errors were encountered: