Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go list fails with 'negative patch number' on Debian 10 #34570

Closed
ialidzhikov opened this issue Sep 27, 2019 · 3 comments
Closed

go list fails with 'negative patch number' on Debian 10 #34570

ialidzhikov opened this issue Sep 27, 2019 · 3 comments

Comments

@ialidzhikov
Copy link

ialidzhikov commented Sep 27, 2019

What version of Go are you using (go version)?

# under MacOS
$ go version
go version go1.13 darwin/amd64

# under golang:1.13.0
$ go version
go version go1.13.0 linux/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@1951ff72470b:/go/src/github.com/gardener/gardener-extensions# go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/go/src/github.com/gardener/gardener-extensions/go.mod"
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-build213099939=/tmp/go-build -gno-record-gcc-switches"

What did you do?

$ git clone git@github.com:gardener/gardener-extensions.git
$ docker run --rm -v $GOPATH/src/:/go/src/ -it golang:1.13.1 bash
$ cd gardener-extensions
$ go list -e -json -compiled=true -test=true -export=false -deps=true -find=false -- ./pkg/...
go: github.com/gardener/gardener@v0.0.0-20190920123941-eae74fbc29e4 requires
	github.com/gardener/gardener-extensions@v0.0.0-20190906160200-5c329d46ae81 requires
	github.com/gardener/gardener@v0.0.0-20190830053951-194cf8abb797 requires
	github.com/gardener/gardener-extensions@v0.0.0-20190820050625-a15de8a82f6b requires
	github.com/Azure/go-autorest/autorest/adal@v0.4.0 requires
	github.com/Azure/go-autorest/tracing@v0.4.0 requires
	contrib.go.opencensus.io/exporter/ocagent@v0.4.6 requires
	github.com/census-instrumentation/opencensus-proto@v0.1.0-0.20181214143942-ba49f56771b8: invalid pseudo-version: version before v0.1.0 would have negative patch number

The thing that I don't expect is that with the same version on darwin/amd64 the same command is successful.

$ uname -a
Darwin C02V33KKHTDF 18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019
$ go version
go version go1.13 darwin/amd64
$ go list -e -json -compiled=true -test=true -export=false -deps=true -find=false -- ./pkg/...
# [...] output omitted

What did you expect to see?

I would expect the go list command to pass under Docker image golang:1.13.0

What did you see instead?

The go list fails under golang:1.13.0.

@ialidzhikov ialidzhikov changed the title go list fails 'negative patch number' on Debian 10 go list fails with 'negative patch number' on Debian 10 Sep 27, 2019
@ialidzhikov
Copy link
Author

I cleaned my modcache on the darwin machine and it failed with the same:

$ go list -e -json -compiled=true -test=true -export=false -deps=true -find=false -- ./pkg/...
go: github.com/gardener/gardener@v0.0.0-20190920123941-eae74fbc29e4 requires
	github.com/gardener/gardener-extensions@v0.0.0-20190906160200-5c329d46ae81 requires
	github.com/gardener/gardener@v0.0.0-20190830053951-194cf8abb797 requires
	github.com/gardener/gardener-extensions@v0.0.0-20190820050625-a15de8a82f6b requires
	github.com/Azure/go-autorest/autorest/adal@v0.4.0 requires
	github.com/Azure/go-autorest/tracing@v0.4.0 requires
	contrib.go.opencensus.io/exporter/ocagent@v0.4.6 requires
	github.com/census-instrumentation/opencensus-proto@v0.1.0-0.20181214143942-ba49f56771b8: invalid pseudo-version: version before v0.1.0 would have negative patch number

@djmaze
Copy link

djmaze commented Oct 11, 2019

I am having a similar error. @ialidzhikov What did you do to fix this?

@ialidzhikov
Copy link
Author

@djmaze , the solution for me was to use the following replace directive.

replace github.com/census-instrumentation/opencensus-proto v0.1.0-0.20181214143942-ba49f56771b8 => github.com/census-instrumentation/opencensus-proto v0.0.3-0.20181214143942-ba49f56771b8

@golang golang locked and limited conversation to collaborators Oct 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants