canonical / lxd

Powerful system container and virtual machine manager
https://canonical.com/lxd
GNU Affero General Public License v3.0
4.32k stars 925 forks source link

Compiling LXD from source fails #10419

Closed ich777 closed 2 years ago

ich777 commented 2 years ago

Issue description

I'm trying to comple LXD from source and followed the directions from here but I've had no success so far.

Steps to reproduce

  1. Download the release tarball: wget https://linuxcontainers.org/downloads/lxd/lxd-5.1.tar.gz
  2. Extract the tarball tar -xvf lxd-5.1.tar.gz
  3. Change directory cd lxd-5.1
  4. Issue make deps

Output:

cd "/root/LXD/lxd-5.1/vendor/raft" && \
    autoreconf -i && \
    ./configure && \
    make
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'ac'.
libtoolize: copying file 'ac/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:9: installing 'ac/compile'
configure.ac:11: installing 'ac/config.guess'
configure.ac:11: installing 'ac/config.sub'
configure.ac:7: installing 'ac/install-sh'
configure.ac:7: installing 'ac/missing'
Makefile.am: installing 'ac/depcomp'
parallel-tests: installing 'ac/test-driver'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 3458764513820540925
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for UV... yes
checking for LZ4... yes
checking whether to build with code coverage support... no
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking for unistd.h... (cached) yes
checking linux/io_uring.h usability... yes
checking linux/io_uring.h presence... yes
checking for linux/io_uring.h... yes
checking linux/aio_abi.h usability... yes
checking linux/aio_abi.h presence... yes
checking for linux/aio_abi.h... yes
checking for zfs... no
checking for size_t... yes
checking for ssize_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking whether UV_FS_O_CREAT is declared... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking if gcc supports flag -std=c11 in envvar CFLAGS... yes
checking if gcc supports flag -g in envvar CFLAGS... yes
checking if gcc supports flag --mcet in envvar CFLAGS... no
checking if gcc supports flag -fcf-protection in envvar CFLAGS... yes
checking if gcc supports flag --param=ssp-buffer-size=4 in envvar CFLAGS... yes
checking if gcc supports flag -pipe in envvar CFLAGS... yes
checking if gcc supports flag -fno-strict-aliasing in envvar CFLAGS... yes
checking if gcc supports flag -fdiagnostics-color in envvar CFLAGS... yes
checking if gcc supports flag -fexceptions in envvar CFLAGS... yes
checking if gcc supports flag -fstack-clash-protection in envvar CFLAGS... yes
checking if gcc supports flag -fstack-protector-strong in envvar CFLAGS... yes
checking if gcc supports flag -fasynchronous-unwind-tables in envvar CFLAGS... yes
checking if gcc supports flag -fdiagnostics-show-option in envvar CFLAGS... yes
checking if gcc supports flag -Wall in envvar CFLAGS... yes
checking if gcc supports flag -Wextra in envvar CFLAGS... yes
checking if gcc supports flag -Wpedantic in envvar CFLAGS... yes
checking if gcc supports flag -Wimplicit-fallthrough=5 in envvar CFLAGS... yes
checking if gcc supports flag -Wcast-align in envvar CFLAGS... yes
checking if gcc supports flag -Wstrict-prototypes in envvar CFLAGS... yes
checking if gcc supports flag -Wlogical-op in envvar CFLAGS... yes
checking if gcc supports flag -Wmissing-include-dirs in envvar CFLAGS... yes
checking if gcc supports flag -Wold-style-definition in envvar CFLAGS... yes
checking if gcc supports flag -Winit-self in envvar CFLAGS... yes
checking if gcc supports flag -Wfloat-equal in envvar CFLAGS... yes
checking if gcc supports flag -Wsuggest-attribute=noreturn in envvar CFLAGS... yes
checking if gcc supports flag -Wformat=2 in envvar CFLAGS... yes
checking if gcc supports flag -Wendif-labels in envvar CFLAGS... yes
checking if gcc supports flag -Wdate-time in envvar CFLAGS... yes
checking if gcc supports flag -Wnested-externs in envvar CFLAGS... yes
checking if gcc supports flag -Wconversion in envvar CFLAGS... yes
checking if gcc supports flag -Werror=implicit-function-declaration in envvar CFLAGS... yes
checking if gcc supports flag -Wunused-but-set-variable in envvar CFLAGS... yes
checking if gcc supports flag -Werror=return-type in envvar CFLAGS... yes
checking if gcc supports flag -Werror=incompatible-pointer-types in envvar CFLAGS... yes
checking if gcc supports flag -Wshadow in envvar CFLAGS... yes
checking if gcc supports flag -Werror=overflow in envvar CFLAGS... yes
checking if gcc supports flag -Werror=shift-count-overflow in envvar CFLAGS... yes
checking if gcc supports flag -Werror=shift-overflow=2 in envvar CFLAGS... yes
checking if gcc supports flag -Warray-bounds in envvar CFLAGS... yes
checking if gcc supports flag -Wrestrict in envvar CFLAGS... yes
checking if gcc supports flag -Wreturn-local-addr in envvar CFLAGS... yes
checking if gcc supports flag -Wstringop-overflow in envvar CFLAGS... yes
checking if gcc supports flag -z in envvar LDFLAGS... no
checking if gcc supports flag relro in envvar LDFLAGS... no
checking if gcc supports flag -z in envvar LDFLAGS... (cached) no
checking if gcc supports flag now in envvar LDFLAGS... no
checking if gcc supports flag -fstack-protector-strong in envvar LDFLAGS... yes
checking if gcc supports flag --param=ssp-buffer-size=4 in envvar LDFLAGS... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating raft.pc
config.status: creating Makefile
config.status: executing depfiles commands
config.status: executing libtool commands
make[1]: Entering directory '/root/LXD/lxd-5.1/vendor/raft'
  CC       src/libraft_la-byte.lo
  CC       src/libraft_la-client.lo
  CC       src/libraft_la-compress.lo
  CC       src/libraft_la-configuration.lo
  CC       src/libraft_la-convert.lo
  CC       src/libraft_la-election.lo
  CC       src/libraft_la-entry.lo
  CC       src/libraft_la-err.lo
  CC       src/libraft_la-heap.lo
  CC       src/libraft_la-log.lo
  CC       src/libraft_la-membership.lo
  CC       src/libraft_la-progress.lo
  CC       src/libraft_la-raft.lo
  CC       src/libraft_la-recv.lo
  CC       src/libraft_la-recv_append_entries.lo
  CC       src/libraft_la-recv_append_entries_result.lo
  CC       src/libraft_la-recv_request_vote.lo
  CC       src/libraft_la-recv_request_vote_result.lo
  CC       src/libraft_la-recv_install_snapshot.lo
  CC       src/libraft_la-recv_timeout_now.lo
  CC       src/libraft_la-replication.lo
  CC       src/libraft_la-snapshot.lo
  CC       src/libraft_la-start.lo
  CC       src/libraft_la-state.lo
  CC       src/libraft_la-syscall.lo
  CC       src/libraft_la-tick.lo
  CC       src/libraft_la-tracing.lo
  CC       src/libraft_la-fixture.lo
  CC       src/libraft_la-uv.lo
  CC       src/libraft_la-uv_append.lo
  CC       src/libraft_la-uv_encoding.lo
  CC       src/libraft_la-uv_finalize.lo
  CC       src/libraft_la-uv_fs.lo
  CC       src/libraft_la-uv_ip.lo
  CC       src/libraft_la-uv_list.lo
  CC       src/libraft_la-uv_metadata.lo
  CC       src/libraft_la-uv_os.lo
  CC       src/libraft_la-uv_prepare.lo
  CC       src/libraft_la-uv_recv.lo
  CC       src/libraft_la-uv_segment.lo
  CC       src/libraft_la-uv_send.lo
  CC       src/libraft_la-uv_snapshot.lo
  CC       src/libraft_la-uv_tcp.lo
  CC       src/libraft_la-uv_tcp_listen.lo
  CC       src/libraft_la-uv_tcp_connect.lo
  CC       src/libraft_la-uv_truncate.lo
  CC       src/libraft_la-uv_writer.lo
  CCLD     libraft.la
make[1]: Leaving directory '/root/LXD/lxd-5.1/vendor/raft'
# dqlite
cd "/root/LXD/lxd-5.1/vendor/dqlite" && \
    autoreconf -i && \
    PKG_CONFIG_PATH="/root/LXD/lxd-5.1/vendor/raft" ./configure && \
    make CFLAGS="-I/root/LXD/lxd-5.1/vendor/raft/include/" LDFLAGS="-L/root/LXD/lxd-5.1/vendor/raft/.libs/"
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'ac'.
libtoolize: copying file 'ac/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:9: installing 'ac/compile'
configure.ac:12: installing 'ac/config.guess'
configure.ac:12: installing 'ac/config.sub'
configure.ac:6: installing 'ac/install-sh'
configure.ac:6: installing 'ac/missing'
Makefile.am: installing 'ac/depcomp'
parallel-tests: installing 'ac/test-driver'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... none needed
checking for gcc option to accept ISO Standard C... (cached) none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking whether gcc is Clang... no
checking whether pthreads work with "-pthread" and "-lpthread"... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 3458764513820540925
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether to build with code coverage support... no
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for unistd.h... (cached) yes
checking for size_t... yes
checking for ssize_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint8_t... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for SQLITE... yes
checking for UV... yes
checking for RAFT... yes
checking if gcc supports flag -std=c11 in envvar CFLAGS... yes
checking if gcc supports flag -g in envvar CFLAGS... yes
checking if gcc supports flag --mcet in envvar CFLAGS... no
checking if gcc supports flag -fcf-protection in envvar CFLAGS... yes
checking if gcc supports flag --param=ssp-buffer-size=4 in envvar CFLAGS... yes
checking if gcc supports flag -pipe in envvar CFLAGS... yes
checking if gcc supports flag -fno-strict-aliasing in envvar CFLAGS... yes
checking if gcc supports flag -fdiagnostics-color in envvar CFLAGS... yes
checking if gcc supports flag -fexceptions in envvar CFLAGS... yes
checking if gcc supports flag -fstack-clash-protection in envvar CFLAGS... yes
checking if gcc supports flag -fstack-protector-strong in envvar CFLAGS... yes
checking if gcc supports flag -fasynchronous-unwind-tables in envvar CFLAGS... yes
checking if gcc supports flag -fdiagnostics-show-option in envvar CFLAGS... yes
checking if gcc supports flag -Wall in envvar CFLAGS... yes
checking if gcc supports flag -Wextra in envvar CFLAGS... yes
checking if gcc supports flag -Wimplicit-fallthrough=5 in envvar CFLAGS... yes
checking if gcc supports flag -Wcast-align in envvar CFLAGS... yes
checking if gcc supports flag -Wstrict-prototypes in envvar CFLAGS... yes
checking if gcc supports flag -Wlogical-op in envvar CFLAGS... yes
checking if gcc supports flag -Wmissing-include-dirs in envvar CFLAGS... yes
checking if gcc supports flag -Wold-style-definition in envvar CFLAGS... yes
checking if gcc supports flag -Winit-self in envvar CFLAGS... yes
checking if gcc supports flag -Wfloat-equal in envvar CFLAGS... yes
checking if gcc supports flag -Wsuggest-attribute=noreturn in envvar CFLAGS... yes
checking if gcc supports flag -Wformat=2 in envvar CFLAGS... yes
checking if gcc supports flag -Wshadow in envvar CFLAGS... yes
checking if gcc supports flag -Wendif-labels in envvar CFLAGS... yes
checking if gcc supports flag -Wdate-time in envvar CFLAGS... yes
checking if gcc supports flag -Wnested-externs in envvar CFLAGS... yes
checking if gcc supports flag -Wconversion in envvar CFLAGS... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating dqlite.pc
config.status: creating Makefile
config.status: executing depfiles commands
config.status: executing libtool commands
make[1]: Entering directory '/root/LXD/lxd-5.1/vendor/dqlite'
  CC       src/bind.lo
  CC       src/client.lo
  CC       src/command.lo
  CC       src/conn.lo
  CC       src/db.lo
  CC       src/dqlite.lo
  CC       src/error.lo
  CC       src/format.lo
  CC       src/fsm.lo
  CC       src/gateway.lo
  CC       src/leader.lo
  CC       src/lib/buffer.lo
  CC       src/lib/transport.lo
  CC       src/logger.lo
  CC       src/message.lo
  CC       src/metrics.lo
  CC       src/config.lo
  CC       src/query.lo
  CC       src/registry.lo
  CC       src/request.lo
  CC       src/response.lo
  CC       src/server.lo
  CC       src/stmt.lo
  CC       src/tracing.lo
  CC       src/transport.lo
  CC       src/translate.lo
  CC       src/tuple.lo
  CC       src/vfs.lo
  CCLD     libdqlite.la
copying selected object files to avoid basename conflicts...
make[1]: Leaving directory '/root/LXD/lxd-5.1/vendor/dqlite'
# environment

Please set the following in your environment (possibly ~/.bashrc)
export CGO_CFLAGS="-I/root/LXD/lxd-5.1/vendor/raft/include/ -I/root/LXD/lxd-5.1/vendor/dqlite/include/"
export CGO_LDFLAGS="-L/root/LXD/lxd-5.1/vendor/raft/.libs -L/root/LXD/lxd-5.1/vendor/dqlite/.libs/"
export LD_LIBRARY_PATH="/root/LXD/lxd-5.1/vendor/raft/.libs/:/root/LXD/lxd-5.1/vendor/dqlite/.libs/"
export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
  1. Set the environment variables from the output from build deps
  2. Issue make

Output:

CC="cc" CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)" go install -v -tags "libsqlite3"  ./...
client/connection.go:17:2: cannot find package "github.com/lxc/lxd/shared" in any of:
    /usr/local/go/src/github.com/lxc/lxd/shared (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/shared (from $GOPATH)
client/events.go:8:2: cannot find package "github.com/lxc/lxd/shared/api" in any of:
    /usr/local/go/src/github.com/lxc/lxd/shared/api (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/shared/api (from $GOPATH)
client/interfaces.go:12:2: cannot find package "github.com/lxc/lxd/shared/cancel" in any of:
    /usr/local/go/src/github.com/lxc/lxd/shared/cancel (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/shared/cancel (from $GOPATH)
client/interfaces.go:13:2: cannot find package "github.com/lxc/lxd/shared/ioprogress" in any of:
    /usr/local/go/src/github.com/lxc/lxd/shared/ioprogress (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/shared/ioprogress (from $GOPATH)
client/connection.go:18:2: cannot find package "github.com/lxc/lxd/shared/logger" in any of:
    /usr/local/go/src/github.com/lxc/lxd/shared/logger (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/shared/logger (from $GOPATH)
client/connection.go:19:2: cannot find package "github.com/lxc/lxd/shared/simplestreams" in any of:
    /usr/local/go/src/github.com/lxc/lxd/shared/simplestreams (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/shared/simplestreams (from $GOPATH)
client/lxd_instances.go:20:2: cannot find package "github.com/lxc/lxd/shared/tcp" in any of:
    /usr/local/go/src/github.com/lxc/lxd/shared/tcp (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/shared/tcp (from $GOPATH)
client/lxd_containers.go:17:2: cannot find package "github.com/lxc/lxd/shared/units" in any of:
    /usr/local/go/src/github.com/lxc/lxd/shared/units (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/shared/units (from $GOPATH)
fuidshift/main_shift.go:9:2: cannot find package "github.com/lxc/lxd/shared/idmap" in any of:
    /usr/local/go/src/github.com/lxc/lxd/shared/idmap (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/shared/idmap (from $GOPATH)
fuidshift/main.go:8:2: cannot find package "github.com/lxc/lxd/shared/version" in any of:
    /usr/local/go/src/github.com/lxc/lxd/shared/version (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/shared/version (from $GOPATH)
lxc/config.go:12:2: cannot find package "github.com/lxc/lxd/client" in any of:
    /usr/local/go/src/github.com/lxc/lxd/client (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/client (from $GOPATH)
lxc/action.go:10:2: cannot find package "github.com/lxc/lxd/lxc/config" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxc/config (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxc/config (from $GOPATH)
lxc/action.go:11:2: cannot find package "github.com/lxc/lxd/lxc/utils" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxc/utils (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxc/utils (from $GOPATH)
lxc/list.go:17:2: cannot find package "github.com/lxc/lxd/lxd/instance/instancetype" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/instance/instancetype (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/instance/instancetype (from $GOPATH)
lxc/action.go:14:2: cannot find package "github.com/lxc/lxd/shared/cmd" in any of:
    /usr/local/go/src/github.com/lxc/lxd/shared/cmd (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/shared/cmd (from $GOPATH)
lxc/action.go:15:2: cannot find package "github.com/lxc/lxd/shared/i18n" in any of:
    /usr/local/go/src/github.com/lxc/lxd/shared/i18n (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/shared/i18n (from $GOPATH)
lxc/cluster.go:19:2: cannot find package "github.com/lxc/lxd/shared/termios" in any of:
    /usr/local/go/src/github.com/lxc/lxd/shared/termios (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/shared/termios (from $GOPATH)
lxc-to-lxd/transfer.go:15:2: cannot find package "github.com/lxc/lxd/lxd/migration" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/migration (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/migration (from $GOPATH)
lxc-to-lxd/transfer.go:16:2: cannot find package "github.com/lxc/lxd/lxd/rsync" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/rsync (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/rsync (from $GOPATH)
lxc-to-lxd/main_netcat.go:12:2: cannot find package "github.com/lxc/lxd/shared/eagain" in any of:
    /usr/local/go/src/github.com/lxc/lxd/shared/eagain (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/shared/eagain (from $GOPATH)
lxc-to-lxd/main_migrate.go:19:2: cannot find package "github.com/lxc/lxd/shared/osarch" in any of:
    /usr/local/go/src/github.com/lxc/lxd/shared/osarch (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/shared/osarch (from $GOPATH)
lxd/instances_post.go:19:2: cannot find package "github.com/lxc/lxd/lxd/archive" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/archive (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/archive (from $GOPATH)
lxd/api_internal.go:23:2: cannot find package "github.com/lxc/lxd/lxd/backup" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/backup (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/backup (from $GOPATH)
lxd/daemon.go:33:2: cannot find package "github.com/lxc/lxd/lxd/bgp" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/bgp (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/bgp (from $GOPATH)
lxd/devices.go:17:2: cannot find package "github.com/lxc/lxd/lxd/cgroup" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/cgroup (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/cgroup (from $GOPATH)
lxd/api.go:10:2: cannot find package "github.com/lxc/lxd/lxd/cluster" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/cluster (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/cluster (from $GOPATH)
lxd/api.go:11:2: cannot find package "github.com/lxc/lxd/lxd/cluster/request" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/cluster/request (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/cluster/request (from $GOPATH)
lxd/api_1.0.go:14:2: cannot find package "github.com/lxc/lxd/lxd/config" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/config (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/config (from $GOPATH)
lxd/daemon.go:35:2: cannot find package "github.com/lxc/lxd/lxd/daemon" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/daemon (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/daemon (from $GOPATH)
lxd/api.go:12:2: cannot find package "github.com/lxc/lxd/lxd/db" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/db (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/db (from $GOPATH)
lxd/api_cluster.go:24:2: cannot find package "github.com/lxc/lxd/lxd/db/cluster" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/db/cluster (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/db/cluster (from $GOPATH)
lxd/api_internal.go:26:2: cannot find package "github.com/lxc/lxd/lxd/db/query" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/db/query (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/db/query (from $GOPATH)
lxd/devices.go:18:2: cannot find package "github.com/lxc/lxd/lxd/device" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/device (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/device (from $GOPATH)
lxd/api_internal.go:27:2: cannot find package "github.com/lxc/lxd/lxd/device/config" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/device/config (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/device/config (from $GOPATH)
lxd/daemon.go:38:2: cannot find package "github.com/lxc/lxd/lxd/dns" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/dns (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/dns (from $GOPATH)
lxd/daemon.go:39:2: cannot find package "github.com/lxc/lxd/lxd/endpoints" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/endpoints (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/endpoints (from $GOPATH)
lxd/daemon.go:40:2: cannot find package "github.com/lxc/lxd/lxd/events" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/events (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/events (from $GOPATH)
lxd/images.go:35:2: cannot find package "github.com/lxc/lxd/lxd/filter" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/filter (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/filter (from $GOPATH)
lxd/daemon.go:41:2: cannot find package "github.com/lxc/lxd/lxd/firewall" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/firewall (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/firewall (from $GOPATH)
lxd/daemon.go:42:2: cannot find package "github.com/lxc/lxd/lxd/fsmonitor" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/fsmonitor (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/fsmonitor (from $GOPATH)
lxd/devices.go:15:2: cannot find package "github.com/lxc/lxd/lxd/include" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/include (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/include (from $GOPATH)
lxd/api_cluster.go:25:2: cannot find package "github.com/lxc/lxd/lxd/instance" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/instance (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/instance (from $GOPATH)
lxd/api_1.0.go:16:2: cannot find package "github.com/lxc/lxd/lxd/instance/drivers" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/instance/drivers (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/instance/drivers (from $GOPATH)
lxd/instance.go:18:2: cannot find package "github.com/lxc/lxd/lxd/instance/operationlock" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/instance/operationlock (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/instance/operationlock (from $GOPATH)
lxd/main_forknet.go:12:2: cannot find package "github.com/lxc/lxd/lxd/ip" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/ip (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/ip (from $GOPATH)
lxd/api_1.0.go:17:2: cannot find package "github.com/lxc/lxd/lxd/lifecycle" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/lifecycle (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/lifecycle (from $GOPATH)
lxd/daemon_images.go:16:2: cannot find package "github.com/lxc/lxd/lxd/locking" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/locking (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/locking (from $GOPATH)
lxd/daemon.go:47:2: cannot find package "github.com/lxc/lxd/lxd/maas" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/maas (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/maas (from $GOPATH)
lxd/api_metrics.go:14:2: cannot find package "github.com/lxc/lxd/lxd/metrics" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/metrics (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/metrics (from $GOPATH)
lxd/api_project.go:19:2: cannot find package "github.com/lxc/lxd/lxd/network" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/network (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/network (from $GOPATH)
lxd/network_acls.go:15:2: cannot find package "github.com/lxc/lxd/lxd/network/acl" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/network/acl (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/network/acl (from $GOPATH)
lxd/networks.go:27:2: cannot find package "github.com/lxc/lxd/lxd/network/openvswitch" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/network/openvswitch (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/network/openvswitch (from $GOPATH)
lxd/daemon.go:48:2: cannot find package "github.com/lxc/lxd/lxd/network/zone" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/network/zone (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/network/zone (from $GOPATH)
lxd/api_1.0.go:18:2: cannot find package "github.com/lxc/lxd/lxd/node" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/node (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/node (from $GOPATH)
lxd/api_cluster.go:29:2: cannot find package "github.com/lxc/lxd/lxd/operations" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/operations (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/operations (from $GOPATH)
lxd/api.go:13:2: cannot find package "github.com/lxc/lxd/lxd/project" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/project (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/project (from $GOPATH)
lxd/api_1.0.go:20:2: cannot find package "github.com/lxc/lxd/lxd/rbac" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/rbac (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/rbac (from $GOPATH)
lxd/api.go:14:2: cannot find package "github.com/lxc/lxd/lxd/request" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/request (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/request (from $GOPATH)
lxd/devices.go:21:2: cannot find package "github.com/lxc/lxd/lxd/resources" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/resources (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/resources (from $GOPATH)
lxd/api.go:15:2: cannot find package "github.com/lxc/lxd/lxd/response" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/response (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/response (from $GOPATH)
lxd/api_cluster.go:33:2: cannot find package "github.com/lxc/lxd/lxd/revert" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/revert (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/revert (from $GOPATH)
lxd/daemon.go:53:2: cannot find package "github.com/lxc/lxd/lxd/seccomp" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/seccomp (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/seccomp (from $GOPATH)
lxd/api_internal.go:33:2: cannot find package "github.com/lxc/lxd/lxd/state" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/state (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/state (from $GOPATH)
lxd/api_internal.go:34:2: cannot find package "github.com/lxc/lxd/lxd/storage" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/storage (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/storage (from $GOPATH)
lxd/api_internal.go:35:2: cannot find package "github.com/lxc/lxd/lxd/storage/drivers" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/storage/drivers (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/storage/drivers (from $GOPATH)
lxd/daemon.go:57:2: cannot find package "github.com/lxc/lxd/lxd/storage/filesystem" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/storage/filesystem (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/storage/filesystem (from $GOPATH)
lxd/daemon.go:58:2: cannot find package "github.com/lxc/lxd/lxd/sys" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/sys (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/sys (from $GOPATH)
lxd/backup.go:27:2: cannot find package "github.com/lxc/lxd/lxd/task" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/task (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/task (from $GOPATH)
lxd/daemon.go:60:2: cannot find package "github.com/lxc/lxd/lxd/ucred" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/ucred (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/ucred (from $GOPATH)
lxd/api_1.0.go:23:2: cannot find package "github.com/lxc/lxd/lxd/util" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/util (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/util (from $GOPATH)
lxd/daemon.go:62:2: cannot find package "github.com/lxc/lxd/lxd/warnings" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/warnings (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/warnings (from $GOPATH)
lxd/main_forkdns.go:19:2: cannot find package "github.com/lxc/lxd/shared/dnsutil" in any of:
    /usr/local/go/src/github.com/lxc/lxd/shared/dnsutil (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/shared/dnsutil (from $GOPATH)
lxd/backup.go:31:2: cannot find package "github.com/lxc/lxd/shared/instancewriter" in any of:
    /usr/local/go/src/github.com/lxc/lxd/shared/instancewriter (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/shared/instancewriter (from $GOPATH)
lxd/instance_exec.go:31:2: cannot find package "github.com/lxc/lxd/shared/netutils" in any of:
    /usr/local/go/src/github.com/lxc/lxd/shared/netutils (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/shared/netutils (from $GOPATH)
lxd/api_cluster.go:39:2: cannot find package "github.com/lxc/lxd/shared/validate" in any of:
    /usr/local/go/src/github.com/lxc/lxd/shared/validate (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/shared/validate (from $GOPATH)
lxd/archive/archive.go:15:2: cannot find package "github.com/lxc/lxd/lxd/apparmor" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/apparmor (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/apparmor (from $GOPATH)
lxd/archive/archive.go:20:2: cannot find package "github.com/lxc/lxd/shared/subprocess" in any of:
    /usr/local/go/src/github.com/lxc/lxd/shared/subprocess (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/shared/subprocess (from $GOPATH)
lxd/db/db.go:22:2: cannot find package "github.com/lxc/lxd/lxd/db/node" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/db/node (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/db/node (from $GOPATH)
lxd/db/cluster/open.go:12:2: cannot find package "github.com/lxc/lxd/lxd/db/schema" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/db/schema (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/db/schema (from $GOPATH)
lxd/db/generate/db.go:10:2: cannot find package "github.com/lxc/lxd/lxd/db/generate/db" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/db/generate/db (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/db/generate/db (from $GOPATH)
lxd/db/generate/db.go:11:2: cannot find package "github.com/lxc/lxd/lxd/db/generate/file" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/db/generate/file (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/db/generate/file (from $GOPATH)
lxd/db/generate/db.go:12:2: cannot find package "github.com/lxc/lxd/lxd/db/generate/lex" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/db/generate/lex (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/db/generate/lex (from $GOPATH)
lxd/device/device_load.go:7:2: cannot find package "github.com/lxc/lxd/lxd/device/nictype" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/device/nictype (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/device/nictype (from $GOPATH)
lxd/device/device_utils_network.go:19:2: cannot find package "github.com/lxc/lxd/lxd/device/pci" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/device/pci (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/device/pci (from $GOPATH)
lxd/device/nic_bridged.go:22:2: cannot find package "github.com/lxc/lxd/lxd/dnsmasq" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/dnsmasq (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/dnsmasq (from $GOPATH)
lxd/device/nic_bridged.go:23:2: cannot find package "github.com/lxc/lxd/lxd/dnsmasq/dhcpalloc" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/dnsmasq/dhcpalloc (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/dnsmasq/dhcpalloc (from $GOPATH)
lxd/device/proxy.go:21:2: cannot find package "github.com/lxc/lxd/lxd/firewall/drivers" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/firewall/drivers (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/firewall/drivers (from $GOPATH)
lxd/device/unix_common.go:9:2: cannot find package "github.com/lxc/lxd/lxd/fsmonitor/drivers" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/fsmonitor/drivers (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/fsmonitor/drivers (from $GOPATH)
lxd/endpoints/cluster.go:8:2: cannot find package "github.com/lxc/lxd/lxd/endpoints/listeners" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/endpoints/listeners (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/endpoints/listeners (from $GOPATH)
lxd/instance/drivers/driver_qemu.go:46:2: cannot find package "github.com/lxc/lxd/lxd/instance/drivers/qmp" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/instance/drivers/qmp (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/instance/drivers/qmp (from $GOPATH)
lxd/instance/drivers/driver_lxc.go:56:2: cannot find package "github.com/lxc/lxd/lxd/template" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/template (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/template (from $GOPATH)
lxd/instance/drivers/driver_qemu.go:62:2: cannot find package "github.com/lxc/lxd/lxd/vsock" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/vsock (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/vsock (from $GOPATH)
lxd/resources/usb.go:13:2: cannot find package "github.com/lxc/lxd/shared/usbid" in any of:
    /usr/local/go/src/github.com/lxc/lxd/shared/usbid (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/shared/usbid (from $GOPATH)
lxd/storage/backend_lxd.go:35:2: cannot find package "github.com/lxc/lxd/lxd/storage/memorypipe" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/storage/memorypipe (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/storage/memorypipe (from $GOPATH)
lxd/storage/drivers/volume.go:11:2: cannot find package "github.com/lxc/lxd/lxd/refcount" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/refcount (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/refcount (from $GOPATH)
lxd/storage/drivers/driver_dir_utils.go:7:2: cannot find package "github.com/lxc/lxd/lxd/storage/quota" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd/storage/quota (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd/storage/quota (from $GOPATH)
lxd-benchmark/main.go:10:2: cannot find package "github.com/lxc/lxd/lxd-benchmark/benchmark" in any of:
    /usr/local/go/src/github.com/lxc/lxd/lxd-benchmark/benchmark (from $GOROOT)
    /root/go/src/github.com/lxc/lxd/lxd-benchmark/benchmark (from $GOPATH)
make: *** [Makefile:33: build] Error 1

What am I missing?

stgraber commented 2 years ago

Just tried it here in a clean Ubuntu 22.04 container (because I couldn't get a Debian container with Go 1.18 easily).

My bash history is:

wget https://linuxcontainers.org/downloads/lxd/lxd-5.1.tar.gz
tar zxvf lxd-5.1.tar.gz
cd lxd-5.1
apt install acl attr autoconf automake dnsmasq-base git golang libacl1-dev libcap-dev liblxc1 liblxc-dev libsqlite3-dev libtool libudev-dev liblz4-dev libuv1-dev make pkg-config rsync squashfs-tools tar tcl xz-utils ebtables
make deps
export CGO_CFLAGS="-I/root/lxd-5.1/vendor/raft/include/ -I/root/lxd-5.1/vendor/dqlite/include/"
export CGO_LDFLAGS="-L/root/lxd-5.1/vendor/raft/.libs -L/root/lxd-5.1/vendor/dqlite/.libs/"
export LD_LIBRARY_PATH="/root/lxd-5.1/vendor/raft/.libs/:/root/lxd-5.1/vendor/dqlite/.libs/"
export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
make

And this gave me the expected LXD build successfully.

Closing as there doesn't appear to be anything fundamentally wrong with that release tarball or instructions.

The kind of error you hit would be consistent with having something like GO111MODULE=off in the environment or something along those lines. Could you try on a perfectly clean system with Go 1.18?