DieterReuter / arm64-docker-builder

Compiling Docker on an ARM64 (or AARCH64) machine
MIT License
51 stars 14 forks source link

Error cannot find package "context" #7

Closed guiscaranse closed 6 years ago

guiscaranse commented 7 years ago

When building the docker as specified in the README i get the following error:

---> Making bundle: dynbinary (in bundles/17.03.2-ce/dynbinary)
Building: bundles/17.03.2-ce/dynbinary-client/docker-17.03.2-ce
.gopath/src/github.com/docker/docker/cli/command/plugin/upgrade.go:5:2: cannot find package "context" in any of:
    /root/src/docker/.gopath/src/github.com/docker/docker/vendor/context (vendor tree)
    /usr/lib/go-1.6/src/context (from $GOROOT)
    /root/src/docker/.gopath/src/context (from $GOPATH)
guiscaranse commented 7 years ago

As reported here seems like Context is already included in the standard library in Go. Not sure tho, if its a issue with this repository or if it is a issue with Docker itself

cesar-tonnoir commented 7 years ago

Hi @guiscaranse, I had the same issue and fixed it by downloading the latest stable version of go, available here: https://golang.org/dl/

  1. Download the package corresponding to your arch
  2. Extract the tar to /usr/local/ as explained here: https://golang.org/doc/install?download=go1.9.2.linux-arm64.tar.gz
  3. Replace the symlink pointing to go:
sudo rm /usr/bin/go
sudo ln -s /usr/local/go/bin/go /usr/bin/go

As you mentioned, Context is included in the standard library from version 1.7, you should be able to compile Docker with the script by using any newer version of Go (on my Armbian distrib, the version downloaded with apt-get was 1.6...)