# Error: VTARuntimeShutdown symbol is undefined

**URL:** <https://discuss.tvm.apache.org/t/error-vtaruntimeshutdown-symbol-is-undefined/6832>\
**Category:** Troubleshooting\
**Created:** [May 28, 2020, 3:05pm UTC](https://discuss.tvm.apache.org/t/error-vtaruntimeshutdown-symbol-is-undefined/6832 "2020-05-28T15:05:40Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![CloverCho](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/clovercho/32/1713_2.png) [@CloverCho](https://discuss.tvm.apache.org/u/CloverCho)\
**Post date:** [May 28, 2020, 3:05pm UTC](https://discuss.tvm.apache.org/t/error-vtaruntimeshutdown-symbol-is-undefined/6832/1 "2020-05-28T15:05:40Z")

</div>

Hi, I tried some tutorials(deploy\_detection, deploy\_classification, etc) using PYNQ Z1 Board.

However, I got the same problem for all the tutorials I ran, on RPC server.

```
 File "/home/xilinx/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 78, in cfun
    rv = local_pyfunc(*pyargs)
  File "/home/xilinx/tvm/vta/python/vta/exec/rpc_server.py", line 84, in server_shutdown
    runtime_dll[0].VTARuntimeShutdown()
  File "/usr/lib/python3.6/ctypes/ __init__.py", line 361, in __getattr__
    func = self. __getitem__ (name)
  File "/usr/lib/python3.6/ctypes/ __init__.py", line 366, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /home/xilinx/tvm/vta/python/vta/../../../build/libvta.so: undefined symbol: VTARuntimeShutdown

```

I searched this Error and found this error was recently solved on [VTA build and execution error with new 3rdparty vta-hw](https://discuss.tvm.ai/t/vta-build-and-execution-error-with-new-3rdparty-vta-hw/6341/10), but still I have the error.

My OS’s PYNQ v2.5, and I use the latest commit of TVM(a072da0588c542757d2815832b7f010f530b2428)

I would really appreciate if someone let me know why the error happened. Is there anyone who solved this error?

---

<div class="post-metadata">

**Author:** ![thierry](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/thierry/32/116_2.png) [@thierry](https://discuss.tvm.apache.org/u/thierry)\
**Post date:** [May 28, 2020, 4:24pm UTC](https://discuss.tvm.apache.org/t/error-vtaruntimeshutdown-symbol-is-undefined/6832/2 "2020-05-28T16:24:03Z")

</div>

Have you confirmed that both TVM installs (on pynq and on your host) are up to date?

---

<div class="post-metadata">

**Author:** ![CloverCho](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/clovercho/32/1713_2.png) [@CloverCho](https://discuss.tvm.apache.org/u/CloverCho)\
**Post date:** [May 29, 2020, 3:06am UTC](https://discuss.tvm.apache.org/t/error-vtaruntimeshutdown-symbol-is-undefined/6832/3 "2020-05-29T03:06:49Z")

</div>

Yes, both TVM are the same version(a072da0588c542757d2815832b7f010f530b2428), which is updated May 28, 2020.

---

<div class="post-metadata">

**Author:** ![thierry](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/thierry/32/116_2.png) [@thierry](https://discuss.tvm.apache.org/u/thierry)\
**Post date:** [May 29, 2020, 4:59pm UTC](https://discuss.tvm.apache.org/t/error-vtaruntimeshutdown-symbol-is-undefined/6832/4 "2020-05-29T16:59:51Z")

</div>

Ok, I’ll try to reproduce the tutorial on the latest TVM. Did you get the bug after updating TVM, or did you install from a fresh git clone?

---

<div class="post-metadata">

**Author:** ![CloverCho](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/clovercho/32/1713_2.png) [@CloverCho](https://discuss.tvm.apache.org/u/CloverCho)\
**Post date:** [May 30, 2020, 7:53am UTC](https://discuss.tvm.apache.org/t/error-vtaruntimeshutdown-symbol-is-undefined/6832/5 "2020-05-30T07:53:16Z")

</div>

I installed both TVM from a fresh git clone

Thank you for your attention!

---

<div class="post-metadata">

**Author:** ![tirumalnaidu](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/tirumalnaidu/32/2122_2.png) [@tirumalnaidu](https://discuss.tvm.apache.org/u/tirumalnaidu)\
**Post date:** [November 16, 2020, 3:48pm UTC](https://discuss.tvm.apache.org/t/error-vtaruntimeshutdown-symbol-is-undefined/6832/6 "2020-11-16T15:48:21Z")

</div>

I am facing same issue while running vta on de10 nano. Is this bug solved yet or not?

---

<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:** [November 18, 2020, 11:52pm UTC](https://discuss.tvm.apache.org/t/error-vtaruntimeshutdown-symbol-is-undefined/6832/7 "2020-11-18T23:52:40Z")

</div>

it would be great to add debug statements around the line [https://github.com/apache/incubator-tvm/blob/e561007f0c330e3d14c2bc8a3ef40fb741db9004/vta/python/vta/exec/rpc\_server.py#L84](https://github.com/apache/incubator-tvm/blob/e561007f0c330e3d14c2bc8a3ef40fb741db9004/vta/python/vta/exec/rpc_server.py#L84) to see what symbols are exposed. VTARuntimeShutdown is indeed defined in [https://github.com/apache/incubator-tvm/blob/main/vta/runtime/runtime.h#L74](https://github.com/apache/incubator-tvm/blob/main/vta/runtime/runtime.h#L74)

---

<div class="post-metadata">

**Author:** ![cee1](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/cee1/32/2320_2.png) [@cee1](https://discuss.tvm.apache.org/u/cee1)\
**Post date:** [February 7, 2021, 2:30am UTC](https://discuss.tvm.apache.org/t/error-vtaruntimeshutdown-symbol-is-undefined/6832/8 "2021-02-07T02:30:53Z")

</div>

I’ve encountered the same problem with commit ‘da42924a16c5e688bbb31facb3b17ba066b776df’ (2/2 2021)

Check the build directory, I found a ‘T’ symbol in CMakeFiles/vta.dir/vta/runtime/runtime.cc.o, but was not appeared within the final libvta.so

I tried to rerun the link command in CMakeFiles/vta.dir/link.txt, aka

‘/usr/bin/c++ -fPIC -std=c++14 -faligned-new -O2 -Wall -fPIC -shared -Wl,-soname,libvta.so -o libvta.so CMakeFiles/vta.dir/vta/runtime/device\_api.cc.o CMakeFiles/vta.dir/vta/runtime/runtime.cc.o CMakeFiles/vta.dir/3rdparty/vta-hw/src/pynq/pynq\_driver.cc.o -lcma’

This error disappeared.

---

<div class="post-metadata">

**Author:** ![shh8228](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/shh8228/32/3430_2.png) [@shh8228](https://discuss.tvm.apache.org/u/shh8228)\
**Post date:** [December 15, 2021, 8:27am UTC](https://discuss.tvm.apache.org/t/error-vtaruntimeshutdown-symbol-is-undefined/6832/10 "2021-12-15T08:27:02Z")

</div>

@cee1 It also worked for me. I ran test\_benchmark\_topi\_conv2d.py in the tutorial with PYNQ Z1 (v2.5). Thank you so much!

---

<div class="post-metadata">

**Author:** ![marshmallow](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/marshmallow/32/3457_2.png) [@marshmallow](https://discuss.tvm.apache.org/u/marshmallow)\
**Post date:** [December 23, 2021, 9:39am UTC](https://discuss.tvm.apache.org/t/error-vtaruntimeshutdown-symbol-is-undefined/6832/11 "2021-12-23T09:39:15Z")

</div>

thank you so much! It really works! I also successfully ran the test\_benchmark\_topi\_conv2d.py in the tutorial on PYNQ-Z2.

---

<div class="post-metadata">

**Author:** ![plt8](https://discuss.tvm.apache.org/letter_avatar_proxy/v4/letter/p/85f322/32.png) [@plt8](https://discuss.tvm.apache.org/u/plt8)\
**Post date:** [March 1, 2022, 5:40pm UTC](https://discuss.tvm.apache.org/t/error-vtaruntimeshutdown-symbol-is-undefined/6832/13 "2022-03-01T17:40:45Z")

</div>

@cee1 Thank you! It resolved this issue for me as well

---

<div class="post-metadata">

**Author:** ![imharish63](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/imharish63/32/3882_2.png) [@imharish63](https://discuss.tvm.apache.org/u/imharish63)\
**Post date:** [June 3, 2022, 6:47am UTC](https://discuss.tvm.apache.org/t/error-vtaruntimeshutdown-symbol-is-undefined/6832/15 "2022-06-03T06:47:49Z")

</div>

@cee1 . Thanks for your inputs its worked for me. I am using zcu104 with pynq image 2.6. After the build on the board side ,

1. I ran “sudo chmod 777 CMakeFiles/vta.dir/link.txt” otherwise it throws permission denied.
2. Then run “CMakeFiles/vta.dir/link.txt”

make sure that in the build directory you the following files :

1. CMakeFiles/vta.dir/vta/runtime/device\_api.cc.o
2. CMakeFiles/vta.dir/vta/runtime/runtime.cc.o
3. CMakeFiles/vta.dir/3rdparty/vta-hw/src/pynq/pynq\_driver.cc.o

in my case the last 3rd party directory was missing. if any thing missed in the directory then clean and remove everything from build directory expect " config.cmake" file.

then after build is complete rerun the link.txt file.

---

<div class="post-metadata">

**Author:** ![okkk](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/okkk/32/2934_2.png) [@okkk](https://discuss.tvm.apache.org/u/okkk)\
**Post date:** [June 22, 2022, 12:39pm UTC](https://discuss.tvm.apache.org/t/error-vtaruntimeshutdown-symbol-is-undefined/6832/16 "2022-06-22T12:39:15Z")

</div>

Hello, I am building the latest TVM0.9 on the pynq-z2 development board, and I get an error: VTARuntimeShutdown, I have repeated the build many times, but the same problem occurs. . . . . What do you mean by “run “CMakeFiles/vta.dir/link.txt””, can you elaborate? Looking forward to your reply! ! !

---

<div class="post-metadata">

**Author:** ![imharish63](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/imharish63/32/3882_2.png) [@imharish63](https://discuss.tvm.apache.org/u/imharish63)\
**Post date:** [September 12, 2022, 1:50pm UTC](https://discuss.tvm.apache.org/t/error-vtaruntimeshutdown-symbol-is-undefined/6832/17 "2022-09-12T13:50:59Z")

</div>

Dear @okkk ,

Hello, I hope you resolved it. I was not active that’s why i didn’t get back to you. If you have not resolved it simply run the command ‘CMakeFiles/vta.dir/link.txt’ from the build directory.

Kind Regards, Harish

---

<div class="post-metadata">

**Author:** ![denis](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/denis/32/4166_2.png) [@denis](https://discuss.tvm.apache.org/u/denis)\
**Post date:** [October 27, 2022, 3:47am UTC](https://discuss.tvm.apache.org/t/error-vtaruntimeshutdown-symbol-is-undefined/6832/18 "2022-10-27T03:47:19Z")

</div>

@cee1

Awesome! It worked for me. I ran test\_benchmark\_gemm.py and test\_benchmark\_topi\_conv2d.py in the tutorial with PYNQ Z1 (v2.6). Thanks 💯
