Skip to content

failed to cache compiled Go files #2354

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

Closed
wanminny opened this issue Dec 28, 2019 · 3 comments
Closed

failed to cache compiled Go files #2354

wanminny opened this issue Dec 28, 2019 · 3 comments
Assignees
Labels
triage/support Indicates an issue that is a support question.

Comments

@wanminny
Copy link

 ➜  memcached-operator go version
go version go1.13.2 darwin/amd64
➜  memcached-operator go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN="/work/go/bin"
GOCACHE="/Users/wanmin/Library/Caches/go-build"
GOENV="/Users/wanmin/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/work/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/work/go/src/operators/memcached-operator/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=/var/folders/mt/frzqv5qn0bq7ng4m8gdt0k0r0000gn/T/go-build074945428=/tmp/go-build -gno-record-gcc-switches -fno-common"
➜  memcached-operator
➜  memcached-operator operator-sdk version
operator-sdk version: "v0.13.0", commit: "1af9c95bb51420c55a7f7f2b7fabebda24451276", go version: "go1.13.4 darwin/amd64"
➜  memcached-operator

➜  memcached-operator operator-sdk version
operator-sdk version: "v0.13.0", commit: "1af9c95bb51420c55a7f7f2b7fabebda24451276", go version: "go1.13.4 darwin/amd64"
➜  memcached-operator operator-sdk add api --api-version=cache.example.com/v1alpha1 --kind=Memcached
INFO[0000] Generating api version cache.example.com/v1alpha1 for kind Memcached.
INFO[0000] Created pkg/apis/cache/group.go
INFO[0000] Created pkg/apis/cache/v1alpha1/memcached_types.go
INFO[0000] Created pkg/apis/addtoscheme_cache_v1alpha1.go
INFO[0000] Created pkg/apis/cache/v1alpha1/register.go
INFO[0000] Created pkg/apis/cache/v1alpha1/doc.go
INFO[0000] Created deploy/crds/cache.example.com_v1alpha1_memcached_cr.yaml
Error: api scaffold failed: (error loading API roots ["/work/go/src/operators/memcached-operator/pkg/apis/cache/v1alpha1"]: go [list -e -json -compiled=true -test=false -export=false -deps=true -find=false -tags ignore_autogenerated -- /work/go/src/operators/memcached-operator/pkg/apis/cache/v1alpha1]: exit status 1: go build internal/race: failed to cache compiled Go files
go build unicode: failed to cache compiled Go files
go build unicode/utf8: failed to cache compiled Go files
go build unicode/utf16: failed to cache compiled Go files
go build runtime/internal/sys: failed to cache compiled Go files
go build math/bits: failed to cache compiled Go files
go build k8s.io/apimachinery/pkg/selection: failed to cache compiled Go files
go build encoding: failed to cache compiled Go files
go build internal/nettrace: failed to cache compiled Go files
go build internal/cpu: failed to cache compiled Go files
go build crypto/subtle: failed to cache compiled Go files
go build runtime/internal/atomic: failed to cache compiled Go files
go build crypto/internal/subtle: failed to cache compiled Go files
go build vendor/golang.org/x/crypto/internal/subtle: failed to cache compiled Go files
go build sync/atomic: failed to cache compiled Go files
go build vendor/golang.org/x/crypto/cryptobyte/asn1: failed to cache compiled Go files
go build container/list: failed to cache compiled Go files
go build vendor/golang.org/x/crypto/curve25519: failed to cache compiled Go files
go build runtime/cgo: failed to cache compiled Go files
)
Usage:
  operator-sdk add api [flags]

Flags:
      --api-version string   Kubernetes APIVersion that has a format of $GROUP_NAME/$VERSION (e.g app.example.com/v1alpha1)
  -h, --help                 help for api
      --kind string          Kubernetes resource Kind name. (e.g AppService)
      --skip-generation      Skip generation of deepcopy and OpenAPI code and OpenAPI CRD specs

Global Flags:
      --verbose   Enable verbose logging

➜  memcached-operator

@wanminny
Copy link
Author

some erros .
operator-sdk add api --api-version=cache.example.com/v1alpha1 --kind=Memcached

thx;

@joelanford
Copy link
Member

@wanminny One sanity check thing to try is export GOROOT=$(go env GOROOT) (see #1854 (comment))

That specific error message doesn't ring a bell though, so that may not make a difference.

If that doesn't work, what's the contents of your go.mod file? And what steps did you take to build your project? Are you following the user guide or getting started guide?

@camilamacedo86 camilamacedo86 added the triage/support Indicates an issue that is a support question. label Jan 6, 2020
@joelanford joelanford self-assigned this Jan 6, 2020
@joelanford
Copy link
Member

@wanminny Were you able to solve your problem? If not, we can re-open and keep troubleshooting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/support Indicates an issue that is a support question.
Projects
None yet
Development

No branches or pull requests

3 participants