[SOLVED] Compilation error: clang70: error: linker command failed


Remote device: Coolpad 5267, ARMv7 Processor rev 5(v7l), installed TVM RPC, Android 6.0.1
Local machine: Intel® Xeon® CPU E5-2620 v3 @ 2.40GHz, built tvm previously

I have used NDK to generate standalone toolchain for my device.
–arch arm --api 23 --install-dir /opt/android-toolchain-armv7

In the file android_rpc_test.py, I set arch = “armv7l”.
However, when I run it, it show me that.


Try to add ‘-mfloat-abi=soft’ in your llvm target


Thank you! It works, however it stops for a long time at remote. upload (path_dso_cpu).

print('Run CPU test ...')
ctx = remote.cpu(0)
f2 = remote.load_module("cpu_lib.so")
a = tvm.nd.array(a_np, ctx)
b = tvm.nd.array(np.zeros(1024, dtype=A.dtype), ctx)
time_f = f2.time_evaluator(f2.entry_name, ctx, number=10)
cost = time_f(a, b).mean
print('%g secs/op\n' % cost)
np.testing.assert_equal(b.asnumpy(), a.asnumpy() + 1)



Make sure you have connected the device correctly.


My server IP is
I use python -m tvm.exec.rpc_tracker --port 8088 to start the rpc tracker.
In my android phone, I set Address:, Port 8088 and Key android to start the RPC.
I use python -m tvm.exec.query_rpc_tracker --port 8088 to query. It shows me that.

Before I run the test, I have done these;
export TVM_TRACKER_PORT=8088
export TVM_NDK_CC=/opt/android-toolchain-arm/bin/arm-linux-androideabi-g++


I have almost no experience using TVM on Android. Maybe @eqy @yzhliu @merrymercy could give some comments.


Thank you for you help.
@eqy @yzhliu Would you mind helping me to solve this problem?


At apps/android_rpc/app/src/main/jni
cp make/config.mk .
And then, I modify the config.mk.
APP_ABI = armeabi-v7a
And use gradle clean build to generate the apk file again.
I use the new apk file to install TVM RPC.
And the problem that stops for a long time at remote. upload (path_dso_cpu) solve.


glad to hear you solve it.