# Golang gotvm package build fails \[solved\]

**URL:** <https://discuss.tvm.apache.org/t/golang-gotvm-package-build-fails-solved/9805>\
**Category:** Troubleshooting\
**Created:** [April 23, 2021, 8:04am UTC](https://discuss.tvm.apache.org/t/golang-gotvm-package-build-fails-solved/9805 "2021-04-23T08:04:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![P2021](https://discuss.tvm.apache.org/letter_avatar_proxy/v4/letter/p/a183cd/32.png) [@P2021](https://discuss.tvm.apache.org/u/P2021)\
**Post date:** [April 23, 2021, 8:04am UTC](https://discuss.tvm.apache.org/t/golang-gotvm-package-build-fails-solved/9805/1 "2021-04-23T08:04:15Z")

</div>

**Error description** Trying to build the golang gototvm on Ubuntu 20.04 with go1.16.3 using provided Makefile in:

```
tvm/golang/Makefile 

```

Returns the following error:

In file included from /home/tvm/golang/…//include/tvm/runtime/container.h:31, from /home/tvm/golang/…//include/tvm/runtime/packed\_func.h:28, from /home/tvm/golang/…//include/tvm/runtime/device\_api.h:28, from /home/tvm/golang/…//src/runtime/c\_runtime\_api.cc:30, from tvm\_runtime\_pack.cc:24: /home/tvm/golang/…//3rdparty/dmlc-core/include/dmlc/logging.h:132:10: error: #include expects “FILENAME” or 132 | #include DMLC\_USE\_LOGGING\_LIBRARY

**Steps to reproduce:**

1. cd tvm/golang
2. make

---

<div class="post-metadata">

**Author:** ![P2021](https://discuss.tvm.apache.org/letter_avatar_proxy/v4/letter/p/a183cd/32.png) [@P2021](https://discuss.tvm.apache.org/u/P2021)\
**Post date:** [April 23, 2021, 8:48am UTC](https://discuss.tvm.apache.org/t/golang-gotvm-package-build-fails-solved/9805/2 "2021-04-23T08:48:15Z")

</div>

This was related to go bindings and is fixed here: Fix go bindings #7696[[GO] Fix go bindings by tkonolige · Pull Request #7696 · apache/tvm · GitHub](https://github.com/apache/tvm/pull/7696/files)

---

<div class="post-metadata">

**Author:** ![juierror](https://discuss.tvm.apache.org/letter_avatar_proxy/v4/letter/j/7ba0ec/32.png) [@juierror](https://discuss.tvm.apache.org/u/juierror)\
**Post date:** [May 27, 2021, 8:19am UTC](https://discuss.tvm.apache.org/t/golang-gotvm-package-build-fails-solved/9805/3 "2021-05-27T08:19:10Z")

</div>

@P2021 Have you ever seen some error like this when using go1.16.3?

> [@Gotvm build issue](https://discuss.tvm.apache.org/t/gotvm-build-issue/10082):
>
> I try to use gotvm in /golang folder. I do the document said, I run make and it look fine with this log ./gopath/src/gotvm/gotvm.a ./gopath/pkg/linux\_amd64/gotvm.a so, I run make samples next to make the sample and I get this error ./gopath/src/gotvm/gotvm.a ./gopath/pkg/linux\_amd64/gotvm.a ./sample/gotvm.a cp gopath/pkg/linux\_amd64/gotvm.a sample/ -rfa make -C sample make[1]: Entering directory '/home/siwa/tvm\_official/golang/sample' main..inittask: relocation target /home/siwa/tvm\_official/…
