cbor
cbor copied to clipboard
bug: Not able to go get github.com/fxamacker/cbor/v2 on go 1.16 arm on Mac m1
What version of fxamacker/cbor are you using?
v2
Does this issue reproduce with the latest release?
yes
What OS and CPU architecture are you using (go env
)?
go env
Output
$ go env GO111MODULE="auto" GOARCH="arm64" GOBIN="" GOCACHE="/Users/liuyen-teh/Library/Caches/go-build" GOENV="/Users/liuyen-teh/Library/Application Support/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="arm64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/liuyen-teh/gowork/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/liuyen-teh/gowork" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64" GOVCS="" GOVERSION="go1.16.15" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" 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 -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/lz/pdmnjtk153zg7smq6ntcqhy40000gn/T/go-build1518328072=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
go get github.com/fxamacker/cbor/v2
What did you expect to see?
successfully install.
What did you see instead?
cannot find package "github.com/fxamacker/cbor/v2" in any of: /usr/local/go/src/github.com/fxamacker/cbor/v2 (from $GOROOT) /Users/$USERNAME>gowork/src/github.com/fxamacker/cbor/v2 (from $GOPATH)
Any chance the SSD was low on free space during the go get
command?
@yeli7289 Please feel free to reopen if you encounter this issue again.
I am also encountering this issue on intel Mac running on Catalina. go get github.com/fxamacker/cbor/v2 - command fails Where as go get github.com/fxamacker/cbor - command works
Hey @yeli7289 @psilpa
I'm unable to reproduce this problem and it works for me using:
- System: MacOS 12.5.1 with M1 Pro
- Installer: go1.18.5.darwin-arm64.pkg | Installer | macOS | ARM64 | 132MB | 7a27dbe31c9fdd98be83ed6ce76fa5474044a2d960e2f9db8fa92b256dda2e58
After installing Go 1.18.5, here's what I get:
% go version
go version go1.18.5 darwin/arm64
% which go
/usr/local/go/bin/go
% shasum -a 256 /usr/local/go/bin/go
71599131bb44988b330f62a18c789dec9f8bee074245696725c784d77b4e6d41 /usr/local/go/bin/go
% go get github.com/fxamacker/cbor/v2
go: downloading github.com/fxamacker/cbor v1.5.1
go: downloading github.com/fxamacker/cbor/v2 v2.4.0
go: downloading github.com/x448/float16 v0.8.4
go: added github.com/fxamacker/cbor/v2 v2.4.0
go: added github.com/x448/float16 v0.8.4
% ls ~/go/pkg/mod/github.com/fxamacker/cbor/[email protected]
CBOR_BENCHMARKS.md CONTRIBUTING.md SECURITY.md decode.go encode.go go.mod stream_test.go tag_test.go
CBOR_GOLANG.md LICENSE bench_test.go decode_test.go encode_test.go go.sum structfields.go valid.go
CODE_OF_CONDUCT.md README.md cache.go doc.go example_test.go stream.go tag.go valid_test.go
I'm closing this for now, but if you run into this problem with Go 1.18.5 (or newer) using darwin-arm64 installer, please feel free to reopen this issue and provide the output of these commands:
- go version
- which go
- shasum -a 256 /usr/local/go/bin/go
- go get github.com/fxamacker/cbor/v2
- ls ~/go/pkg/mod/github.com/fxamacker/cbor/[email protected]
Maybe this problem is caused by a configuration issue because it works for me.