Bug 258210 - USES=go:modules make extract failures after port was updated
Summary: USES=go:modules make extract failures after port was updated
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-02 13:19 UTC by Dirk Meyer
Modified: 2021-09-02 13:19 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Meyer freebsd_committer 2021-09-02 13:19:51 UTC
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.