On Fri, Apr 15, 2022 at 6:53 PM Gary Mills <[email protected]> wrote:
> I'm attempting to build a "zrepl" package for OI. Zrepl is a "go" > application. It it even possible to package go applications for OI? > > On build, I'm getting this error: > > make[1]: Entering directory > '.../oi-userland-gh/components/sysutils/zrepl/build/amd64' > $GOPATH/go.mod exists but should not > ... > $GOPATH/go.mod exists but should not > GO111MODULE=on go build -mod=readonly -ldflags \ > "-X > github.com/zrepl/zrepl/version.zreplVersion=oi-20200504-2370-gd402c2588" \ > -o "artifacts/zrepl-illumos-" > $GOPATH/go.mod exists but should not > make[1]: *** [Makefile:228: zrepl-bin] Error 1 > make[1]: Leaving directory > '.../oi-userland-gh/components/sysutils/zrepl/build/amd64' > > What causes this error, and how can I prevent it? > 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. The common pattern in oi-userland (see eg components/sysutils/chezmoi/Makefile) is COMPONENT_BUILD_ENV += GOPATH="$(SOURCE_DIR)/gopath" COMPONENT_INSTALL_ENV += GOPATH="$(SOURCE_DIR)/gopath" -- -Peter Tribble http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/
_______________________________________________ oi-dev mailing list [email protected] https://openindiana.org/mailman/listinfo/oi-dev
