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

Support go1.21.0 #979

Closed
chenrui333 opened this issue Aug 13, 2023 · 3 comments · Fixed by #983
Closed

Support go1.21.0 #979

chenrui333 opened this issue Aug 13, 2023 · 3 comments · Fixed by #983

Comments

@chenrui333
Copy link

chenrui333 commented Aug 13, 2023

👋 Right now go1.19 is already EOL, and this go1.20 support commit did not get released, any chance of releasing it first and then move on to support go 1.21.0? Thanks!

build failure with go 1.21.0

# github.com/quic-go/quic-go/internal/qtls
/Users/rui/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/quic-go/[email protected]/internal/qtls/go121.go:5:13: cannot use "The version of quic-go you're using can't be built on Go 1.21 yet. For more details, please see https://github.com/quic-go/quic-go/wiki/quic-go-and-Go-versions." (untyped string constant "The version of quic-go you're using can't be built on Go 1.21 yet. F...) as int value in variable declaration

relates to Homebrew/homebrew-core#139431

@Vangelis66
Copy link

With respect 😉 , is it absolutely mandatory to chase after the latest quic-go version? Most sadly, because of this, latest quic-go (now at version 0.38.1) will only build under go1.20 and go1.21 😢 ...
But, this is not all; OP is a MacOS user, but on the Windows OS side of things 😉 , go1.21 cuts support for anything below Win10 😡 ; lots of people, me included, still use systems with < Win10 (yes, the "vendor" has stopped Extended Support, but, what the heck, people in China still use XP/7), so building on go1.21+ will leave such users stranded 😭 ...

go1.20 was recently updated with sec fixes to v1.20.8; would the gost developers consider extending support for go1.20 for the benefit of lots of Windows users still on NT 6.1/6.2/6.3 ? FWIW, even NT 6.0 is still (inadvertently 😄 ) supported, if the subsystem PE header of the go1.20 produced executables is "lowered" to 6.0...

Kind regards 😄 ...

@Vangelis66
Copy link

... Pending PR #983 is supposed to "fix" this issue here; due to my needs to keep support for Windows NT < 10.0 (that go1.21+ now excludes 😞 ), I explored the possibility of compiling the PR983 source code on latest go1.20, i.e. v1.20.8...

Well, of all the go modules updated inside that PR, it appears that the only one incompatible with go1.20 is kcp-go\v5 v5.6.3 (reason being this commit); so, I downgraded to its previous v5.6.2 (and, along the way, I updated go module quic-go to latest v0.38.1 - still go1.20 compatible) and thus I was able to compile the code with go1.20.8 in my older Win7 SP1 32-bit laptop:

file ./go.mod:

L3
-go 1.21
+go 1.20

L20
-	github.com/quic-go/quic-go v0.38.0
+	github.com/quic-go/quic-go v0.38.1

L25
-	github.com/xtaci/kcp-go/v5 v5.6.3
+	github.com/xtaci/kcp-go/v5 v5.6.2

file ./go.sum:

L90-L91
-github.com/quic-go/quic-go v0.38.0 h1:T45lASr5q/TrVwt+jrVccmqHhPL2XuSyoCLVCpfOSLc=
-github.com/quic-go/quic-go v0.38.0/go.mod h1:MPCuRq7KBK2hNcfKj/1iD1BGuN3eAYMeNxp3T42LRUg=
+github.com/quic-go/quic-go v0.38.1 h1:M36YWA5dEhEeT+slOu/SwMEucbYd0YFidxG3KlGPZaE=
+github.com/quic-go/quic-go v0.38.1/go.mod h1:ijnZM7JsFIkp4cRyjxJNIzdSfCLmUMg9wdyhGmg+SN4=

L107-L108
-github.com/xtaci/kcp-go/v5 v5.6.3 h1:yd59SKXdJ0PBxeMBy3apalxFCEmBLGgQmL6nP46tU0g=
-github.com/xtaci/kcp-go/v5 v5.6.3/go.mod h1:uIuw2KEg3FcmEdS4PeXHaGty9Ui7NYb1WKIrSDwpMg4=
+github.com/xtaci/kcp-go/v5 v5.6.2 h1:pSXMa5MOsb+EIZKe4sDBqlTExu2A/2Z+DFhoX2qtt2A=
+github.com/xtaci/kcp-go/v5 v5.6.2/go.mod h1:LsinWoru+lWWJHb+EM9HeuqYxV6bb9rNcK12v67jYzQ=

... and then compilation of binary gost-windows-386.exe was possible on go1.20:

gost-windows-386 -V => 

gost 2.12.0 (go1.20.8 windows/386)

Hope it's helpful to others 😜 ...

@3052
Copy link

3052 commented Jun 2, 2024

to anyone who wants this now - just download the code here:

https://github.com/honwen/gost

then go build works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants