The golang.org/x/net/go17.go, which is used by sqlite3 throws an error if I want to compile my project and I have not been able to figure out the problem yet.
# golang.org/x/net/context
../golang.org/x/net/context/go17.go:10:9: error: import file ‘context’ not found
"context" // standard library's context, as of Go 1.7
^
../golang.org/x/net/context/go17.go:16:15: error: reference to undefined name ‘context’
background = context.Background()
^
../golang.org/x/net/context/go17.go:15:15: error: reference to undefined name ‘context’
todo = context.TODO()
^
../golang.org/x/net/context/go17.go:20:16: error: reference to undefined name ‘context’
var Canceled = context.Canceled
^
../golang.org/x/net/context/go17.go:24:24: error: reference to undefined name ‘context’
var DeadlineExceeded = context.DeadlineExceeded
^
../golang.org/x/net/context/go17.go:33:12: error: reference to undefined name ‘context’
ctx, f := context.WithCancel(parent)
^
../golang.org/x/net/context/go17.go:47:12: error: reference to undefined name ‘context’
ctx, f := context.WithDeadline(parent, deadline)
^
../golang.org/x/net/context/go17.go:71:9: error: reference to undefined name ‘context’
return context.WithValue(parent, key, val)
^
All files are in the appropriate directory. The wanted file context.go. I didn’t make any changes to it. Context.go is stored in golang.org/x/net/context/.
Here my go environment:
GOARCH=“arm"
GOBIN=”“
GOEXE=”"
GOHOSTARCH=“arm"
GOHOSTOS=“linux"
GOOS=“linux"
GOPATH=”/home/pi/go"
GORACE=”“
GOROOT=”/usr/lib/go-1.7"
GOTOOLDIR=”/usr/lib/go-1.7/pkg/tool/linux_arm"
CC=“gcc"
GOGCCFLAGS=”-fPIC -marm -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build138640187=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED=“1”
And here my gccgo Version:
gccgo (Raspbian 6.3.0-18+rpi1) 6.3.0 20170516
Copyright © 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Does someone have any clue what could be the problem here?