keep-network / keep-core

The smart contracts and reference client behind the Keep network
https://keep.network
MIT License
118 stars 73 forks source link

Compilation errors on more recent Go compiler version (1.21.5) #3761

Closed pdyraga closed 6 months ago

pdyraga commented 7 months ago

When trying to compile the project on the (almost) most recent version of Go, the following build error happens:

$ make mainnet

(...)

Building Go code
GOOS= GOARCH= go build -ldflags "-X github.com/keep-network/keep-core/build.Version=v2.0.0-m6-15-g281685c3f -X github.com/keep-network/keep-core/build.Revision=281685c3f" -o ./keep-client -a .
# github.com/lucas-clemente/quic-go/internal/qtls
../../../go/pkg/mod/github.com/lucas-clemente/quic-go@v0.27.1/internal/qtls/go119.go:6:13: cannot use "The version of quic-go you're using can't be built on Go 1.19 yet. For more details, please see https://github.com/lucas-clemente/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.19 yet. F...) as int value in variable declaration
make[1]: *** [build] Error 1
make: *** [mainnet] Error 2
$ go version
go version go1.21.5 darwin/arm64

The relevant link: https://github.com/quic-go/quic-go/wiki/quic-go-and-Go-versions