# Build failed: gio-2.0/lzma.h missing

**URL:** <https://hub.mender.io/t/build-failed-gio-2-0-lzma-h-missing/4675>\
**Category:** OpenWrt\
**Created:** [February 21, 2022, 4:42pm UTC](https://hub.mender.io/t/build-failed-gio-2-0-lzma-h-missing/4675 "2022-02-21T16:42:59Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [February 22, 2022, 12:21pm UTC](https://hub.mender.io/t/build-failed-gio-2-0-lzma-h-missing/4675/4 "2022-02-22T12:21:18Z")

</div>

Take a look at the below, it may be helpful, you may need to set some golang env vars. Sorry I don’t know much about golang.

> [@Go error occurred by attempting to build mender master branch via cross compiling](https://hub.mender.io/t/go-error-occurred-by-attempting-to-build-mender-master-branch-via-cross-compiling/1849/20):
>
> Then GOARCH=arm is needed. I also think that you have passed the wrong sysroot as argument, host instead of target. It should be something like this: make CGO\_CFLAGS="--sysroot=$SDKTARGETSYSROOT -I${LIBLZMA\_INSTALL\_PATH}/include" CGO\_LDFLAGS="--sysroot=$SDKTARGETSYSROOT -L${LIBLZMA\_INSTALL\_PATH}/lib" CGO\_ENABLED=1 GOOS=linux GOARCH=arm

---

_[View the full topic](https://hub.mender.io/t/build-failed-gio-2-0-lzma-h-missing/4675)._
