tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: go package build problem: go: cannot find GOROOT directory: 'go' binary is trimmed and GOROOT is not set
On Sun, Nov 19, 2023 at 11:38:37PM +0100, Benny Siegert wrote:
>
>
> > Am 19.11.2023 um 23:30 schrieb Thomas Klausner <wiz%netbsd.org@localhost>:
> >
> > 'go121 help' works fine.
> >
> > Manually running (in ${WRKSRC}):
> >
> > # go121 build
> > go: cannot find GOROOT directory: 'go' binary is trimmed and GOROOT is not set
>
> I have not seen this error message before.
> What does "go env" output?
# go env
ksh: go: not found
# go121 env
go: cannot find GOROOT directory: 'go' binary is trimmed and GOROOT is not set
> Does setting GOROOT=/usr/pkg/go121 work around the issue?
This patch makes it work, yes:
Index: go-module.mk
===================================================================
RCS file: /cvsroot/pkgsrc/lang/go/go-module.mk,v
retrieving revision 1.10
diff -u -r1.10 go-module.mk
--- go-module.mk 6 Jun 2023 12:41:44 -0000 1.10
+++ go-module.mk 19 Nov 2023 22:58:04 -0000
@@ -43,6 +43,7 @@
MAKE_ENV+= GO111MODULE=on GOPATH=${WRKDIR}/.gopath GOPROXY=file://${WRKDIR}/.goproxy
MAKE_ENV+= GOCACHE=${WRKDIR}/.cache/go-build
+MAKE_ENV+= GOROOT=/usr/pkg/go121
.if !target(do-build)
do-build:
Cheers,
Thomas
Home |
Main Index |
Thread Index |
Old Index