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

x/term: Fails to build with golang < 1.12 #42665

Closed
aclindsa opened this issue Nov 17, 2020 · 1 comment
Closed

x/term: Fails to build with golang < 1.12 #42665

aclindsa opened this issue Nov 17, 2020 · 1 comment

Comments

@aclindsa
Copy link

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

$ go version
go version go1.11.13 linux/amd64

Does this issue reproduce with the latest release?

It fails with the latest release of x/term and an older version of the go compiler, but not with the latest of both.

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

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/travis/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/travis/gopath"
GOPROXY=""
GORACE=""
GOROOT="/home/travis/.gimme/versions/go1.11.13.linux.amd64"
GOTMPDIR=""
GOTOOLDIR="/home/travis/.gimme/versions/go1.11.13.linux.amd64/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-build186938083=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Attempted to build ofxgo on travis using go 1.11.

What did you expect to see?

golang.org/x/term

What did you see instead?

golang.org/x/term
# golang.org/x/term
../../../golang.org/x/term/term_unix_linux.go:9:7: ioctlReadTermios redeclared in this block
	previous declaration at ../../../golang.org/x/term/term_unix_aix.go:9:26
../../../golang.org/x/term/term_unix_linux.go:10:7: ioctlWriteTermios redeclared in this block
	previous declaration at ../../../golang.org/x/term/term_unix_aix.go:10:27

https://travis-ci.com/github/aclindsa/ofxgo/jobs/441671582

@gopherbot gopherbot added this to the Unreleased milestone Nov 17, 2020
@FiloSottile
Copy link
Contributor

Go 1.11 is not supported anymore (the earliest supported version is Go 1.14 at the moment), so it's to be expected that new versions of some modules will not build with it. (In this case, I think it's because Go 1.11 does not recognize the aix build tag.)

Due to how Minimum Version Selection works, the version of a dependency in use by a module is stable and will never update itself: you can continue to build the same code with an old version of the compiler forever. However, if you want to update a dependency you need to be prepared to update the compiler as well.

In general, Go 1.11 is lacking multiple security fixes that have been published over the last year, so I can't recommend running Go 1.11 at all. Remember that Go provides a strong backwards compatibility promise in order to make updates easier.

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