bykim555 commented on issue #13724:
URL:
https://github.com/apache/incubator-mxnet/issues/13724#issuecomment-737902428
1.first, i use ndk21,
android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin and
export CC=armv7a-linux-androideabi23-clang
export CXX=armv7a-linux-androideabi23-clang++
2.then i build openblas, everything is ok
3. and then i build my libmxnet_predict.so, many issues come out, i solved
them one by one
need to modify the 'makefile' in amalgamation, besides modify OpenBLAS path,
need to change your export PATH to the
android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin and
exportCC=armv7a-linux-androideabi23-clang, and export
XX=armv7a-linux-androideabi23-clang++, and add more include path in the CFLAGS:
-I../include -I${TPARTYDIR}/dmlc-core/include
-I${TPARTYDIR}/tvm/nnvm/include -I${TPARTYDIR}/mshadow
-I${TPARTYDIR}/dlpack/include -I${TPARTYDIR}/tvm/nnvm
-I${TPARTYDIR}/ps-lite/include,
also need to add c++11 support in the CFLAGS, "LDFLAGS+=
-Wl,--no-warn-mismatch -lm_hard" => LDFLAGS+= -Wl,--no-warn-mismatch -lm ....
after 'amalgamation.py' in amalgamation add blacklist = [ 'x86intrin.h'] ,
successfully build
then i push the libmxnet_predict.so and the test program to the deviece it
will run and failed in the thread_local variant which are is_train_ and
is_recording_, so i change them directly to bool false, then the test program
finnally work, but the result is different with PC, and it is definitely has
something with the support with ARM i guess, so could you please help verify
and fix this issue?
my error log is : E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.tistory.webnautes.useopencvwithndk_build, PID: 17645
java.lang.UnsatisfiedLinkError: dlopen failed: library
"E:/2020/WorkSpace/AndroidStudioProjects_backup/UseOpenCVwithndkbuild/app/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/libmxnet_predict.so"
not found
at java.lang.Runtime.loadLibrary(Runtime.java:372)
at java.lang.System.loadLibrary(System.java:1076)
at
com.tistory.webnautes.useopencvwithndk_build.MainActivity.<clinit>(MainActivity.java:48)
at java.lang.Class.newInstance(Native Method)
at android.app.Instrumentation.newActivity(Instrumentation.java:1095)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3083)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
at android.app.ActivityThread.access$1100(ActivityThread.java:221)
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at java.lang.reflect.Method.invoke(Native Method)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
I changed ndk version and api version... but error is same...
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]