diff --git a/build.go b/build.go index dddc3b964..b3b7f5eee 100644 --- a/build.go +++ b/build.go @@ -380,6 +380,12 @@ func main() { } } + solarisMinVersion := GoVersion{Major: 1, Minor: 20, Patch: 0} + if env["GOARCH"] == "solaris" && !goVersion.AtLeast(solarisMinVersion) { + fmt.Fprintf(os.Stderr, "Detected version %s is too old, restic requires at least %s for Solaris\n", goVersion, solarisMinVersion) + os.Exit(1) + } + verbosePrintf("detected Go version %v\n", goVersion) preserveSymbols := false diff --git a/changelog/unreleased/pull-4201 b/changelog/unreleased/pull-4201 new file mode 100644 index 000000000..500bbdbb1 --- /dev/null +++ b/changelog/unreleased/pull-4201 @@ -0,0 +1,9 @@ +Change: Require Go 1.20 for Solaris builds + +Building restic on Solaris now requires Go 1.20, as the library used to access +Azure uses the mmap syscall, which is only available on Solaris starting from +Go 1.20. + +All other platforms continue to build with Go 1.18. + +https://github.com/restic/restic/pull/4201 diff --git a/doc/020_installation.rst b/doc/020_installation.rst index 4488e31f9..4d591356d 100644 --- a/doc/020_installation.rst +++ b/doc/020_installation.rst @@ -269,7 +269,8 @@ From Source *********** restic is written in the Go programming language and you need at least -Go version 1.18. Building restic may also work with older versions of Go, +Go version 1.18. Building for Solaris requires at least Go version 1.20. +Building restic may also work with older versions of Go, but that's not supported. See the `Getting started `__ guide of the Go project for instructions how to install Go.