Malformed module path "hash/maphash"

When building I now get this:

tarted by an SCM change
Running as SYSTEM
Building in workspace /var/lib/jenkins/workspace/Restic
The recommended git tool is: NONE
No credentials specified
 > git rev-parse --resolve-git-dir /var/lib/jenkins/workspace/Restic/.git # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://github.com/restic/restic/ # timeout=10
Fetching upstream changes from https://github.com/restic/restic/
 > git --version # timeout=10
 > git --version # 'git version 2.25.1'
 > git fetch --tags --force --progress -- https://github.com/restic/restic/ +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
Checking out Revision a02cea6e83d70fba78edadebef6c8443baf66dce (refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f a02cea6e83d70fba78edadebef6c8443baf66dce # timeout=10
Commit message: "Merge pull request #3539 from jnoxon/fix-ec2-metadata-v2"
 > git rev-list --no-walk 24088f8307b5f4725761c5c68fe716b655ba7f3a # timeout=10
[Restic] $ /bin/sh -xe /tmp/jenkins7602693461394388758.sh
+ /usr/lib/go-1.14/bin/go run build.go
go: downloading github.com/minio/minio-go/v7 v7.0.14
go: extracting github.com/minio/minio-go/v7 v7.0.14
go: finding github.com/minio/minio-go/v7 v7.0.14
build github.com/restic/restic/cmd/restic: cannot load hash/maphash: malformed module path "hash/maphash": missing dot in first path element
build failed: exit status 1
exit status 1
Build step 'Execute shell' marked build as failure
Archiving artifacts
Finished: FAILURE

My last good build was: ef5672a 24 days ago!

Any ideas what I need to do to resolve this?

I only could find this error in relation to go 1.13 or older.

Which go version are you using exactly? And is this go binary on the path? go run build.go internally calls go. Which go compiler version did restic version print for the last successful build?

The last good build I have is this:

restic 0.12.1 (v0.12.1-64-gef5672a9) compiled with go1.13.8 on linux/amd64

I have (since seeing it fail) installed go1.14 and I still get the same issue. The version of Go I have currently is:

$ /usr/lib/go-1.14/bin/go version
go version go1.14.3 linux/amd64

Which output do you get when you run go version (without any path prefix!). What does which go return?

The most recent version of go 1.14 is 1.14.15. But as only go 1.16 and 1.17 are still supported you might want to upgrade to one of those.

go versions shows 1.13.

I’ll try upgrading via the longsleep/golang-backports PPA and see what happens.

ok, that fixed it :slight_smile:

sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt update
sudo apt install golang-go