danderson / netboot

Packages and utilities for network booting
Apache License 2.0
1.47k stars 181 forks source link

tftp test is failing: package go.universe.tf/netboot/cmd/pixiecore: cannot find package #124

Open advancedwebdeveloper opened 3 years ago

advancedwebdeveloper commented 3 years ago

I wasn't able to run your test suite:

$make test

GO111MODULE=on go test ./... ? go.universe.tf/netboot/cmd/pixiecore [no test files] ? go.universe.tf/netboot/cmd/pixiecore-apache2 [no test files] ok go.universe.tf/netboot/dhcp4 0.814s ok go.universe.tf/netboot/dhcp6 1.097s ok go.universe.tf/netboot/dhcp6/pool 1.081s ? go.universe.tf/netboot/out/ipxe [no test files] ok go.universe.tf/netboot/pcap 0.506s ok go.universe.tf/netboot/pixiecore 1.058s ? go.universe.tf/netboot/pixiecore/api-example [no test files] ? go.universe.tf/netboot/pixiecore/cli [no test files] ? go.universe.tf/netboot/scripts/prune_old_versions [no test files] ? go.universe.tf/netboot/scripts/trigger_docker_build [no test files] ? go.universe.tf/netboot/scripts/trigger_quay_build [no test files] ok go.universe.tf/netboot/tftp 0.448s GO111MODULE=on go test -race ./... package go.universe.tf/netboot/cmd/pixiecore: cannot find package make: *** [Makefile:28: test] Error 1

Here is what I am using

$ go version && go env go version go1.15.2 gollvm LLVM 12.0.0git linux/amd64 GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/oceanfish81/.cache/go-build" GOENV="/home/oceanfish81/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/oceanfish81/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/oceanfish81/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/oceanfish81/gollvm_dist" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/oceanfish81/gollvm_dist/tools" GCCGO="/home/oceanfish81/gollvm_dist/bin/llvm-goc" AR="ar" CC="/usr/bin/clang" CXX="/usr/bin/clang++" CGO_ENABLED="1" GOMOD="/home/oceanfish81/netboot/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build288862257=/tmp/go-build -gno-record-gcc-switches -funwind-tables"

kfox1111 commented 3 years ago

I'm getting a similar issue:

Digest: sha256:9fdb74150f8d8b07ee4b65a4f00ca007e5ede5481fa06e9fd33710890a624331
Status: Downloaded newer image for golang:latest
 ---> 05499cedca62
Step 2/6 : RUN   CGO_ENABLED=0 go get go.universe.tf/netboot/cmd/pixiecore
 ---> Running in 4c8a1012c464
cannot find package "github.com/hashicorp/hcl/hcl/printer" in any of:
    /usr/local/go/src/github.com/hashicorp/hcl/hcl/printer (from $GOROOT)
    /go/src/github.com/hashicorp/hcl/hcl/printer (from $GOPATH)
The command '/bin/sh -c CGO_ENABLED=0 go get go.universe.tf/netboot/cmd/pixiecore' returned a non-zero code: 1
Something went wrong. Failing.

Its worked for a long time and suddenly broke about the same time this issue was filed.

advancedwebdeveloper commented 3 years ago

CC @thanm

papylhomme commented 2 years ago

Stumbled across this, solution from https://github.com/hashicorp/hcl/issues/449 works for me when building pixiecore : export GO111MODULE=on