carlosedp/riscv-bringup

cannot find package "." when build docker-cli

jiangxiaobin96 opened this issue · 2 comments

I folllow the document docker to install docker in RVBoard.
when build docker-cli, i meet the following error.
``
./scripts/build/binary
Building static docker-linux-riscv64

  • go build -o build/docker-linux-riscv64 -tags --ldflags -w -X "github.com/docker/cli/cli/version.GitCommit=9fab13beac" -X "github.com/docker/cli/cli/version.BuildTime=2021-10-13T09:23:57Z" -X "github.com/docker/cli/cli/version.Version=20.10.2-282-g9fab13beac" github.com/docker/cli/cmd/docker
    cli/command/image/build_buildkit.go:16:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/containerd/console
    cli/command/image/build_buildkit.go:17:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/containerd/containerd/platforms
    cli/context/kubernetes/load.go:10:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/compose-on-kubernetes/api
    cli/command/stack/kubernetes/stackclient.go:6:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/compose-on-kubernetes/api/client/clientset/typed/compose/v1alpha3
    cli/command/stack/kubernetes/cli.go:12:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/compose-on-kubernetes/api/client/clientset/typed/compose/v1beta1
    cli/command/stack/kubernetes/stackclient.go:8:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/compose-on-kubernetes/api/client/clientset/typed/compose/v1beta2
    kubernetes/check.go:4:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/compose-on-kubernetes/api/compose/v1alpha3
    kubernetes/check.go:5:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/compose-on-kubernetes/api/compose/v1beta1
    kubernetes/check.go:6:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/compose-on-kubernetes/api/compose/v1beta2
    cli/command/stack/kubernetes/conversion.go:9:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/compose-on-kubernetes/api/labels
    cli/manifest/types/types.go:6:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/distribution
    cli/manifest/types/types.go:7:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/distribution/manifest/manifestlist
    cli/manifest/types/types.go:8:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/distribution/manifest/schema2
    cli/manifest/types/types.go:9:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/distribution/reference
    cli/registry/client/fetcher.go:13:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/distribution/registry/api/errcode
    cli/registry/client/fetcher.go:14:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/distribution/registry/api/v2
    cli/registry/client/client.go:13:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/distribution/registry/client
    cli/trust/trust.go:17:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/distribution/registry/client/auth
    cli/trust/trust.go:18:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/distribution/registry/client/auth/challenge
    cli/trust/trust.go:19:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/distribution/registry/client/transport
    cli/config/credentials/native_store.go:5:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker-credential-helpers/client
    cli/config/credentials/native_store.go:6:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker-credential-helpers/credentials
    cli/command/cli.go:28:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/api
    opts/runtime.go:7:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/api/types
    opts/throttledevice.go:8:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/api/types/blkiodev
    opts/gpus.go:9:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/api/types/container
    cli/command/events_utils.go:6:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/api/types/events
    opts/opts.go:11:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/api/types/filters
    cli/command/image/formatter_history.go:9:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/api/types/image
    opts/mount.go:10:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/api/types/mount
    cli/command/container/opts.go:18:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/api/types/network
    cli/trust/trust.go:21:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/api/types/registry
    cli/command/container/opts.go:19:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/api/types/strslice
    opts/config.go:10:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/api/types/swarm
    cli/command/image/build_session.go:15:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/api/types/versions
    cli/command/volume/create.go:10:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/api/types/volume
    cli/command/image/build/context.go:17:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/builder/remotecontext/git
    cli/context/docker/load.go:16:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/client
    cli/context/store/store.go:19:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/errdefs
    cli/command/image/build/context.go:18:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/pkg/archive
    cli/command/image/build/context.go:19:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/pkg/fileutils
    cli/config/config.go:14:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/pkg/homedir
    cli/command/image/build.go:28:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/pkg/idtools
    cli/command/image/build/context.go:20:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/pkg/ioutils
    cli/command/image/build.go:29:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/pkg/jsonmessage
    cli/command/image/build/context.go:21:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/pkg/pools
    cli/command/image/build/context.go:22:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/pkg/progress
    cli/command/container/hijack.go:13:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/pkg/stdcopy
    cli/command/image/build/context.go:23:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/pkg/streamformatter
    cli/command/formatter/buildcache.go:10:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/pkg/stringid
    cli/command/utils.go:14:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/pkg/system
    cli/command/image/build.go:32:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/pkg/urlutil
    cli/trust/trust.go:22:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/docker/registry
    opts/port.go:12:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/go-connections/nat
    cli/context/docker/load.go:17:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/go-connections/tlsconfig
    opts/mount.go:11:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/go-units
    cli/command/service/generic_resource_opts.go:10:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/swarmkit/api
    cli/command/service/opts.go:18:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/swarmkit/api/defaults
    cli/command/service/generic_resource_opts.go:11:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/docker/swarmkit/api/genericresource
    cli/context/store/metadatastore.go:12:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/fvbommel/sortorder
    cli/command/service/opts.go:19:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/gogo/protobuf/types
    cli/compose/loader/loader.go:20:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/google/shlex
    cli/compose/loader/merge.go:8:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/imdario/mergo
    cli/compose/loader/loader.go:21:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/mitchellh/mapstructure
    cli/command/image/build_buildkit.go:26:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/moby/buildkit/api/services/control
    cli/command/image/build_buildkit.go:27:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/moby/buildkit/client
    cli/command/image/build/dockerignore.go:8:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/moby/buildkit/frontend/dockerfile/dockerignore
    cli/command/image/build_buildkit.go:28:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/moby/buildkit/session
    cli/command/image/build_buildkit.go:29:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/moby/buildkit/session/auth/authprovider
    cli/command/image/build_buildkit.go:30:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/moby/buildkit/session/filesync
    cli/command/image/build_buildkit.go:31:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/moby/buildkit/session/secrets/secretsprovider
    cli/command/image/build_buildkit.go:32:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/moby/buildkit/session/sshforward/sshprovider
    cli/command/image/build_buildkit.go:33:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/moby/buildkit/util/appcontext
    cli/command/image/build_buildkit.go:34:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/moby/buildkit/util/gitutil
    cli/command/image/build_buildkit.go:35:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/moby/buildkit/util/progress/progressui
    cli/command/image/build_buildkit.go:36:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/moby/buildkit/util/progress/progresswriter
    cli/command/container/attach.go:13:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/moby/sys/signal
    cli/streams/in.go:9:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/moby/term
    cli/cobra.go:13:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/morikuni/aec
    cli/context/store/store.go:20:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/opencontainers/go-digest
    cli/manifest/types/types.go:11:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/opencontainers/image-spec/specs-go/v1
    cli/config/configfile/file.go:15:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/pkg/errors
    cli/config/configfile/file.go:16:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/sirupsen/logrus
    cli/command/cli.go:35:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/spf13/cobra
    cli/flags/common.go:12:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/spf13/pflag
    cli/trust/trust.go:27:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/theupdateframework/notary
    cli/trust/trust.go:28:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/theupdateframework/notary/client
    cli/trust/trust.go:29:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/theupdateframework/notary/passphrase
    cli/trust/trust.go:30:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/theupdateframework/notary/storage
    cli/trust/trust.go:31:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/theupdateframework/notary/trustmanager
    cli/trust/trust.go:32:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/theupdateframework/notary/trustpinning
    cli/trust/trust.go:33:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/theupdateframework/notary/tuf/data
    cli/trust/trust.go:34:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/theupdateframework/notary/tuf/signed
    cli/command/trust/key_generate.go:20:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/theupdateframework/notary/tuf/utils
    cli/command/image/build_buildkit.go:38:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/tonistiigi/fsutil/types
    cli/command/image/build_buildkit.go:39:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/tonistiigi/go-rosetta
    cli/compose/schema/schema.go:10:2: cannot find package "." in:
    /home/env-docker/go/src/github.com/xeipuuv/gojsonschema
    cli/command/image/build_buildkit.go:40:2: cannot find package "." in:
    /home/env-docker/go/src/golang.org/x/sync/errgroup
    cli/config/credentials/default_store.go:4:2: cannot find package "." in:
    /home/env-docker/go/src/golang.org/x/sys/execabs
    cli/command/container/signals_unix.go:8:2: cannot find package "." in:
    /home/env-docker/go/src/golang.org/x/sys/unix
    cli/command/swarm/unlock.go:16:2: cannot find package "." in:
    /home/env-docker/go/src/golang.org/x/term
    cli/command/formatter/displayutils.go:6:2: cannot find package "." in:
    /home/env-docker/go/src/golang.org/x/text/width
    cli/compose/loader/loader.go:24:2: cannot find package "." in:
    /home/env-docker/go/src/gopkg.in/yaml.v2
    cli/command/stack/kubernetes/conversion.go:12:2: cannot find package "." in:
    /home/env-docker/go/src/k8s.io/api/apps/v1beta2
    cli/command/stack/kubernetes/conversion.go:13:2: cannot find package "." in:
    /home/env-docker/go/src/k8s.io/api/core/v1
    cli/command/stack/kubernetes/list.go:16:2: cannot find package "." in:
    /home/env-docker/go/src/k8s.io/apimachinery/pkg/api/errors
    kubernetes/check.go:8:2: cannot find package "." in:
    /home/env-docker/go/src/k8s.io/apimachinery/pkg/apis/meta/v1
    cli/command/stack/kubernetes/watcher.go:13:2: cannot find package "." in:
    /home/env-docker/go/src/k8s.io/apimachinery/pkg/fields
    cli/command/stack/kubernetes/watcher.go:14:2: cannot find package "." in:
    /home/env-docker/go/src/k8s.io/apimachinery/pkg/runtime
    kubernetes/check.go:10:2: cannot find package "." in:
    /home/env-docker/go/src/k8s.io/apimachinery/pkg/runtime/schema
    cli/command/stack/kubernetes/watcher.go:15:2: cannot find package "." in:
    /home/env-docker/go/src/k8s.io/apimachinery/pkg/util/runtime
    cli/command/stack/kubernetes/watcher.go:16:2: cannot find package "." in:
    /home/env-docker/go/src/k8s.io/apimachinery/pkg/watch
    kubernetes/check.go:11:2: cannot find package "." in:
    /home/env-docker/go/src/k8s.io/client-go/discovery
    cli/command/stack/kubernetes/cli.go:15:2: cannot find package "." in:
    /home/env-docker/go/src/k8s.io/client-go/kubernetes
    cli/command/stack/kubernetes/client.go:8:2: cannot find package "." in:
    /home/env-docker/go/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2
    cli/command/stack/kubernetes/client.go:10:2: cannot find package "." in:
    /home/env-docker/go/src/k8s.io/client-go/kubernetes/typed/core/v1
    cli/command/stack/kubernetes/cli.go:16:2: cannot find package "." in:
    /home/env-docker/go/src/k8s.io/client-go/rest
    cli/command/stack/kubernetes/watcher.go:17:2: cannot find package "." in:
    /home/env-docker/go/src/k8s.io/client-go/tools/cache
    cli/context/kubernetes/load.go:13:2: cannot find package "." in:
    /home/env-docker/go/src/k8s.io/client-go/tools/clientcmd
    cli/context/kubernetes/load.go:14:2: cannot find package "." in:
    /home/env-docker/go/src/k8s.io/client-go/tools/clientcmd/api
    make: *** [Makefile:41: binary] Error 1
    ``
    the Dir "/home/env-docker/go" is my GOPATH.
    I guess that i overlook some necessary packages. So how to solve the question?

And there are no such directories in GOPATH mentioned in above error.

My problem has been solved!
Thanks.