Environment: Building ports in clean jails. Shared and static /usr/ports/distfiles/ Problem: After a port with USES=go:modules was updated, build fails in make extract stage. Logfiles: [...] go: finding module for package github.com/stretchr/testify/require github.com/influxdata/influxdb/cmd/influx/cli imports github.com/influxdata/flux: cannot find module providing package github.com/influxdata/flux: module lookup disabled by GOPROXY=off [...] *** Failed target: post-extract *** Failed command: (cd /usr/obj/image/usr/ports/databases/influxdb/work/github.com/influxdata/influxdb@v1.8.6; /usr/bin/env CGO_ENABLED=1 CGO_CFLAGS="-I/usr/local/include" CGO_LDFLAGS="-L/usr/local/lib" GOARM= GOPATH="/usr/ports/distfiles/go/databases_influxdb" GOBIN="/usr/obj/image/usr/ports/databases/influxdb/work/bin" GO111MODULE=on GOFLAGS=-modcacherw GOSUMDB=sum.golang.org GOPROXY=off /usr/local/bin/go mod vendor) *** Error code 1 [...] [...] go: finding module for package github.com/golang/protobuf/ptypes/empty github.com/influxdata/telegraf/agent imports github.com/benbjohnson/clock: cannot find module providing package github.com/benbjohnson/clock: module lookup disabled by GOPROXY=off [...] *** Failed target: post-extract *** Failed command: (cd /usr/obj/image/usr/ports/net-mgmt/telegraf/work/github.com/influxdata/telegraf@v1.19.3; /usr/bin/env CGO_ENABLED=1 CGO_CFLAGS="-I/usr/local/include" CGO_LDFLAGS="-L/usr/local/lib" GOARM= GOPATH="/usr/ports/distfiles/go/net-mgmt_telegraf" GOBIN="/usr/obj/image/usr/ports/net-mgmt/telegraf/work/bin" GO111MODULE=on GOFLAGS=-modcacherw GOSUMDB=sum.golang.org GOPROXY=off /usr/local/bin/go mod vendor) *** Error code 1 [...] Finally I found a workaround by cleaning the old parts of distfiles: # rm -rf /usr/ports/distfiles/go/net-mgmt_telegraf/telegraf-v1.19.2 # rm -rf /usr/ports/distfiles/go/databases_influxdb The ports can be build sucessfully again.
Assigning to myself as I was the original author of the Go modules support in go.mk. Could you please attach the full log if/when this happens again?
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=6e236e18965327f6100473770e4edb78c94fb1d4 commit 6e236e18965327f6100473770e4edb78c94fb1d4 Author: Dmitri Goutnik <dmgk@FreeBSD.org> AuthorDate: 2022-05-08 20:49:05 +0000 Commit: Dmitri Goutnik <dmgk@FreeBSD.org> CommitDate: 2022-05-09 11:15:14 +0000 Mk/Uses/go.mk: Try to tidy up go.sum after fetch, fix EXTRACT_ONLY Make a best effort attempt (without network access) to add missing go.sum entries using local module cache prepared by the fetch stage. Set EXTRACT_ONLY dynamically from DISTFILES, repair USE_{GITHUB,GITLAB}. PR: 258210 PR: 262981 PR: 263866 Mk/Uses/go.mk | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
(In reply to Dmitri Goutnik from comment #1) Sure, it happened a few weeks ago. I will comment out my "rm -rf /usr/ports/disfiles/go" and wait for it.
(In reply to Dmitri Goutnik from comment #1) More details: The last error I recorded, was the upgrade to influxdb-v1.8.10 around March 27th. I had to remove the existing folder in "distfiles/go/databases_influxdb" I will preserver the full log, when it happen again.
The last updates where all without distfile problems. I think that the problem has been solved. Thank you very much.
Good to hear, thanks for testing.