[oi-dev] Error building a zrepl package for OI

Joshua M. Clulow josh at sysmgr.org
Fri Apr 15 20:27:52 UTC 2022


On Fri, 15 Apr 2022 at 13:23, Gary Mills <gary_mills at fastmail.fm> wrote:
> On Fri, Apr 15, 2022 at 07:16:02PM +0100, Peter Tribble wrote:
> >
> >    The environment variable GOPATH is set to the root of the zrepl source.
> >    Any other value will work. If unset, then ~/go, but that's not always
> >    ideal.
>
> Thanks.  I assumed it had to exist.  It's the opposite: it had to
> not exist, because that's where go will download packages.
>
> >    The common pattern in oi-userland (see eg
> >    components/sysutils/chezmoi/Makefile)
>
> That is my model.  Obviously a good choice.
>
> >    is
> >    COMPONENT_BUILD_ENV += GOPATH="$(SOURCE_DIR)/gopath"
> >    COMPONENT_INSTALL_ENV += GOPATH="$(SOURCE_DIR)/gopath"
>
> Yes, that worked for me.

You may wish to investigate setting GOCACHE to somewhere contained as
well, which is a somewhat newer feature.

-- 
Joshua M. Clulow
http://blog.sysmgr.org



More information about the oi-dev mailing list