[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.
./make_standalone_toolchain.py
–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)
print("1")
remote.upload(path_dso_cpu)
print("2")
f2 = remote.load_module("cpu_lib.so")
print("3")
a = tvm.nd.array(a_np, ctx)
print("4")
b = tvm.nd.array(np.zeros(1024, dtype=A.dtype), ctx)
print("5")
time_f = f2.time_evaluator(f2.entry_name, ctx, number=10)
print("6")
cost = time_f(a, b).mean
print('%g secs/op\n' % cost)
np.testing.assert_equal(b.asnumpy(), a.asnumpy() + 1)

image

Make sure you have connected the device correctly.

My server IP is 192.168.1.34.
I use python -m tvm.exec.rpc_tracker --port 8088 to start the rpc tracker.
In my android phone, I set Address: 192.168.1.34, 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_HOST=0.0.0.0
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.

1 Like

glad to hear you solve it.