Containerd: make fails with cannot find package "context"

Created on 29 Oct 2016  路  3Comments  路  Source: containerd/containerd

when running make I get

cd ctr && go build -ldflags "-X github.com/docker/containerd.GitCommit=56f53281e362d8acdf12de60097a8e00b24cba6d " -o ../bin/ctr
cd containerd && go build -ldflags "-X github.com/docker/containerd.GitCommit=56f53281e362d8acdf12de60097a8e00b24cba6d "  -tags "" -o ../bin/containerd
cd containerd-shim && go build -tags "" -ldflags "-w -X github.com/docker/containerd.GitCommit=56f53281e362d8acdf12de60097a8e00b24cba6d " -o ../bin/containerd-shim
process_linux.go:6:2: cannot find package "context" in any of:
    /usr/lib/go-1.6/src/context (from $GOROOT)
    /home/go/downloads/containerd/vendor/src/context (from $GOPATH)
    /home/go/downloads/containerd/src/context
Makefile:55: recipe for target 'shim' failed
make: *** [shim] Error 1

Most helpful comment

Great, builds now!

All 3 comments

Context became part of the standard library in go 1.7. My guess is that your go version is below that number.

Looking at the code, it seems we're inconsistent in our usage of the package, some files still use golang.org/x/net/context.

I'll update them to all use context now.

Thanks for the report.

Actually, grpc-go and proto-gen-go are still using the old path, so I'll just force the code to do the same until they move over (around 1.8 if I understood correctly).

Great, builds now!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stevvooe picture stevvooe  路  4Comments

bluefriday picture bluefriday  路  4Comments

AkihiroSuda picture AkihiroSuda  路  4Comments

oldthreefeng picture oldthreefeng  路  4Comments

estesp picture estesp  路  3Comments