# Network Compilation fails on RPi4 with RPC

**URL:** <https://discuss.tvm.apache.org/t/network-compilation-fails-on-rpi4-with-rpc/9854>\
**Category:** Troubleshooting\
**Created:** [April 29, 2021, 6:36am UTC](https://discuss.tvm.apache.org/t/network-compilation-fails-on-rpi4-with-rpc/9854 "2021-04-29T06:36:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![max1996](https://discuss.tvm.apache.org/letter_avatar_proxy/v4/letter/m/3da27b/32.png) [@max1996](https://discuss.tvm.apache.org/u/max1996)\
**Post date:** [April 29, 2021, 6:36am UTC](https://discuss.tvm.apache.org/t/network-compilation-fails-on-rpi4-with-rpc/9854/1 "2021-04-29T06:36:05Z")

</div>

Hi, I wanted to run a benchmark on the raspberry pi 4, using a RPCSession and the debug runtime. For this I am using the MXNet model zoo. However some of these networks cannot be compiled for the RPi4 as it fails with

```
RPCError: Error caught from RPC call:
RuntimeError: Compilation error:
/usr/bin/ld: BFD (GNU Binutils for Raspbian) 2.31.1 assertion fail ../../bfd/elf32-arm.c:9853
/usr/bin/ld: BFD (GNU Binutils for Raspbian) 2.31.1 assertion fail ../../bfd/elf32-arm.c:9853
/usr/bin/ld: BFD (GNU Binutils for Raspbian) 2.31.1 assertion fail ../../bfd/elf32-arm.c:9853
/usr/bin/ld: BFD (GNU Binutils for Raspbian) 2.31.1 assertion fail ../../bfd/elf32-arm.c:9853
collect2: error: ld returned 1 exit status

Command line: g++ -shared -fPIC -o /tmp/tmphyiku5p6/net.tar.so /tmp/tmphyiku5p6/net/devc.o /tmp/tmphyiku5p6/net/lib0.o

```

The networks are:

- resnet34\_v1
- resnet101\_v1
- resnet152\_v1
- resnet34\_v2
- resnet101\_v2
- resnet152\_v2
- vgg11
- vgg13
- vgg16
- vgg19
- vgg11\_bn
- vgg13\_bn
- vgg16\_bn
- vgg19\_bn

I suspect the reason could be the 32-bit operating system of the RPi4, but might be totally wrong here…

---

<div class="post-metadata">

**Author:** ![tqchen](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/tqchen/32/5_2.png) [@tqchen](https://discuss.tvm.apache.org/u/tqchen)\
**Post date:** [April 29, 2021, 12:21pm UTC](https://discuss.tvm.apache.org/t/network-compilation-fails-on-rpi4-with-rpc/9854/2 "2021-04-29T12:21:08Z")

</div>

Perhaps this is due to a different target triple? You might want to query your target triple via `g++ --verbose`. The target for 32bit and 64bit are different.

See [tvm/target.py at main · apache/tvm · GitHub](https://github.com/apache/tvm/blob/main/python/tvm/target/target.py#L326)

rasp4b and rasp4b64

---

<div class="post-metadata">

**Author:** ![max1996](https://discuss.tvm.apache.org/letter_avatar_proxy/v4/letter/m/3da27b/32.png) [@max1996](https://discuss.tvm.apache.org/u/max1996)\
**Post date:** [April 29, 2021, 12:35pm UTC](https://discuss.tvm.apache.org/t/network-compilation-fails-on-rpi4-with-rpc/9854/3 "2021-04-29T12:35:32Z")

</div>

I am using `target = tvm.target.arm_cpu("rasp4b")` to target the raspberry pi and it is working for the other test networks (resnet18, mobilenet, alexnet, …), but I will try it with the 64-bit beta OS and an verbose settings.

---

<div class="post-metadata">

**Author:** ![tqchen](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/tqchen/32/5_2.png) [@tqchen](https://discuss.tvm.apache.org/u/tqchen)\
**Post date:** [April 29, 2021, 10:35pm UTC](https://discuss.tvm.apache.org/t/network-compilation-fails-on-rpi4-with-rpc/9854/4 "2021-04-29T22:35:59Z")

</div>

Glad it works for you

---

<div class="post-metadata">

**Author:** ![max1996](https://discuss.tvm.apache.org/letter_avatar_proxy/v4/letter/m/3da27b/32.png) [@max1996](https://discuss.tvm.apache.org/u/max1996)\
**Post date:** [April 30, 2021, 8:22am UTC](https://discuss.tvm.apache.org/t/network-compilation-fails-on-rpi4-with-rpc/9854/5 "2021-04-30T08:22:33Z")

</div>

ok,

the problem seems to be the 32-bit operating system. I am not sure, if it is a TVM problem or a raspbian problem, as it worked with the rpi4b64 target and raspbian os in the 64-bit beta version.
