On Tuesday, August 6, 2019 at 11:31:40 AM UTC+10, Shane H wrote:
>
>
>
> On Tuesday, August 6, 2019 at 10:56:42 AM UTC+10, Shane H wrote:
>>
>> Hi all,
>>
>> I've done a bit of searching, and asked around, but not found an answer 
>> to my (most likely self-inflicted) problem.
>>
>> I have been coding with Go 1.10 and 1.11 for a whiles, but I decided that 
>> it was time to join the future and upgraded to 1.12. It worked fine for the 
>> project I was creating at the time, but after some time (long enough for me 
>> to forget the steps I took to upgrade!) I discovered issues with my install.
>>
>> I've tried to reinstall (Ubuntu, apt purge golang-1.* ) and reinstall, to 
>> no avail.
>>
>> I need to know what I can check to stop this behaviour, sans reinstalling 
>> the OS
>>
>> This is probably best demonstrated as:
>> shane@desktop ~/GoLang/src/github.com/ipfs/go-ipfs (master) $ make build
>> go version go1.12.7 linux/amd64
>> bin/check_go_version 1.12
>> go build  "-asmflags=all='-trimpath=/home/shane/GoLang'" 
>> "-gcflags=all='-trimpath=/home/shane/GoLang'" -ldflags="-X "
>> github.com/ipfs/go-ipfs".CurrentCommit=641d9f6b0-dirty" -o 
>> "cmd/ipfs/ipfs" "github.com/ipfs/go-ipfs/cmd/ipfs"
>> /usr/local/go/src/crypto/tls/cipher_suites.go:18:2: unknown import path 
>> "golang_org/x/crypto/chacha20poly1305": cannot find module providing 
>> package golang_org/x/crypto/chacha20poly1305
>> /usr/local/go/src/crypto/x509/x509.go:36:2: unknown import path 
>> "golang_org/x/crypto/cryptobyte": cannot find module providing package 
>> golang_org/x/crypto/cryptobyte
>> /usr/local/go/src/crypto/x509/x509.go:37:2: unknown import path 
>> "golang_org/x/crypto/cryptobyte/asn1": cannot find module providing package 
>> golang_org/x/crypto/cryptobyte/asn1
>> /usr/local/go/src/crypto/tls/key_agreement.go:18:2: unknown import path 
>> "golang_org/x/crypto/curve25519": cannot find module providing package 
>> golang_org/x/crypto/curve25519
>> /usr/local/go/src/net/dnsclient.go:11:2: unknown import path 
>> "golang_org/x/net/dns/dnsmessage": cannot find module providing package 
>> golang_org/x/net/dns/dnsmessage
>> /usr/local/go/src/net/http/h2_bundle.go:47:2: unknown import path 
>> "golang_org/x/net/http/httpguts": cannot find module providing package 
>> golang_org/x/net/http/httpguts
>> /usr/local/go/src/net/http/transport.go:34:2: unknown import path 
>> "golang_org/x/net/http/httpproxy": cannot find module providing package 
>> golang_org/x/net/http/httpproxy
>> /usr/local/go/src/net/http/h2_bundle.go:48:2: unknown import path 
>> "golang_org/x/net/http2/hpack": cannot find module providing package 
>> golang_org/x/net/http2/hpack
>> /usr/local/go/src/net/http/h2_bundle.go:49:2: unknown import path 
>> "golang_org/x/net/idna": cannot find module providing package 
>> golang_org/x/net/idna
>> cmd/ipfs/Rules.mk:22: recipe for target 'cmd/ipfs/ipfs' failed
>> make: *** [cmd/ipfs/ipfs] Error 1
>>
>>
>> $ go env
>> GOARCH="amd64"
>> GOBIN=""
>> GOCACHE="/home/shane/.cache/go-build"
>> GOEXE=""
>> GOFLAGS=""
>> GOHOSTARCH="amd64"
>> GOHOSTOS="linux"
>> GOOS="linux"
>> GOPATH="/home/shane/GoLang"
>> GOPROXY=""
>> GORACE=""
>> GOROOT="/usr/local/go"
>> GOTMPDIR=""
>> GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
>> GCCGO="gccgo"
>> CC="gcc"
>> CXX="g++"
>> CGO_ENABLED="1"
>> GOMOD=""
>> 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 -fmessage-length=0 
>> -fdebug-prefix-map=/tmp/go-build529069743=/tmp/go-build 
>> -gno-record-gcc-switches"
>>  
>>
>
>> The issue is now showing up in my vim, golangci-lint is complaining of 
>> errors
>> /usr/local/go/src/net/dnsclient.go|11 col 2| could not import 
>> golang_org/x/net/dns/dnsmessage (invalid package name: "")
>>
>
> When I try to upgrade my gopls server I get
> $ env GO111MODULE=on go get golang.org/x/tools/gopls@latest
> go: finding golang.org/x/tools/gopls v0.1.3
> go: finding golang.org/x/tools v0.0.0-20190710153321-831012c29e42
> go: finding golang.org/x/net v0.0.0-20190620200207-3b0461eec859
> go: finding golang.org/x/sync v0.0.0-20190423024810-112230192c58
> go: finding golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
> go: finding golang.org/x/text v0.3.0
> go: finding golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
> go: downloading golang.org/x/tools v0.0.0-20190710153321-831012c29e42
> go: extracting golang.org/x/tools v0.0.0-20190710153321-831012c29e42
> go: downloading golang.org/x/tools/gopls v0.1.3
> go: extracting golang.org/x/tools/gopls v0.1.3
> go: downloading golang.org/x/sync v0.0.0-20190423024810-112230192c58
> go: extracting golang.org/x/sync v0.0.0-20190423024810-112230192c58
> # errors
> compile: version "go1.11" does not match go tool version "go1.12.7"
> # runtime/internal/sys
> compile: version "go1.11" does not match go tool version "go1.12.7"
> # internal/race
> compile: version "go1.11" does not match go tool version "go1.12.7"
> # runtime/internal/atomic
> flag provided but not defined: -gensymabis
> usage: asm [options] file.s ... 
>

Crisis over

I discovered that /usr/local/go was still version 1.11 for whatever reason 
Ubuntu did not update that directory when I installed go via apt/dpkg

I therefore downloaded  
https://dl.google.com/go/go1.12.7.linux-amd64.tar.gz into /tmp, 
decompressed it, then moved the go/ directory to /usr/local (moving the old 
version to /usr/local/go-1.11 just in case)


-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/5ea19eb6-f923-4622-a82e-d5b2e637d9e9%40googlegroups.com.

Reply via email to