Mender 2.0.0 build failure cannot find --llzma

Hi,

I am trying to build the latest 2.0.0 release. I was using 1.6.0.

But the build failed with:
mender$ env CC=arm-linux-gnueabihf-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm make build
go build -ldflags “-X main.Version=2.1.0b1-build4”
# github.com/mendersoftware/mender/vendor/github.com/remyoudompheng/go-liblzma
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/…/…/…/…/arm-linux-gnueabihf/bin/ld: cannot find -llzma
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/…/…/…/…/arm-linux-gnueabihf/bin/ld: cannot find -llzma
collect2: error: ld returned 1 exit status
# github.com/mendersoftware/mender/vendor/golang.org/x/net/http2
vendor/golang.org/x/net/http2/server.go:220: s.RegisterOnShutdown undefined (type *http.Server has no field or method RegisterOnShutdown)
make: *** [mender] Error 2

I built 1.6.0 well with the system, any ideas?

Thanks,
Hunter

Hi @hunter and welcome to Mender Hub!

As the error message is saying, you need to cross-compile the liblzma dependency. In your case, using the same toolchain arm-linux-genueabihf-gcc. See mender README for details.

You need to install the lzma header and such on your build system. On my Ubuntu build system it is called lzma-dev.

Thanks for help, I appreciate it, it does resolved my issue.