Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build problem: cannot find package "github.com/hashicorp/hcl/hcl/printer" #9176

Closed
6 tasks
christoph-conrads opened this issue Sep 1, 2021 · 2 comments
Closed
6 tasks

Comments

@christoph-conrads
Copy link

christoph-conrads commented Sep 1, 2021

Required information

  • Distribution: Debian 11
  • The output of "lxc info" or if that fails:
    • LXD version: 4.17

Issue description

LXD 4.17 does not build on Debian 11. make fails with the error shown in the console output below.

Steps to reproduce

john@db:/tmp $ wget -- 'https://github.com/lxc/lxd/releases/download/lxd-4.17/lxd-4.17.tar.gz'
john@db:/tmp $ tar -zxf ~/Downloads/lxd-4.17.tar.gz
john@db:/tmp $ cd lxd-4.17
john@db:/tmp/lxd-4.17$ make deps
[...]
john@d11:/tmp/lxd-4.17$ cat >../lxd-setup-env.sh
export CGO_CFLAGS="-I/home/john/go/deps/raft/include/ -I/home/john/go/deps/dqlite/include/"
export CGO_LDFLAGS="-L/home/john/go/deps/raft/.libs -L/home/john/go/deps/dqlite/.libs/"
export LD_LIBRARY_PATH="/home/john/go/deps/raft/.libs/:/home/john/go/deps/dqlite/.libs/"
export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
john@d11:/tmp/lxd-4.17$ source ../lxd-setup-env.sh 
john@db:/tmp/lxd-4.17$ make
go get -t -v -d ./...
[...]
github.com/hashicorp/hcl (download)
package github.com/hashicorp/hcl/hcl/printer: cannot find package "github.com/hashicorp/hcl/hcl/printer" in any of:
	/usr/lib/go-1.11/src/github.com/hashicorp/hcl/hcl/printer (from $GOROOT)
	/home/john/go/src/github.com/hashicorp/hcl/hcl/printer (from $GOPATH)
john@d11:/tmp/lxd-4.17$ go version
go version go1.15.9 linux/amd64

This seems to be hashicorp/hcl#449.

Information to attach

  • Any relevant kernel output (dmesg)
  • Container log (lxc info NAME --show-log)
  • Container configuration (lxc config show NAME --expanded)
  • Main daemon log (at /var/log/lxd/lxd.log or /var/snap/lxd/common/lxd/logs/lxd.log)
  • Output of the client with --debug
  • Output of the daemon with --debug (alternatively output of lxc monitor while reproducing the issue)
@stgraber
Copy link
Contributor

stgraber commented Sep 1, 2021

The instructions you see have been updated ahead of 4.18 which now uses gomod.
As you're building 4.17, you should look at the README that's included in that tarball instead.

The online version is at: https://github.com/lxc/lxd/tree/lxd-4.17#from-source-building-a-release

This should have the instructions on setting GOPATH such that the build can work.

@stgraber stgraber closed this as completed Sep 1, 2021
@christoph-conrads
Copy link
Author

Thank you, it is building now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants