[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: GO111MODULE=on and "go: cannot use modules with build cache disabled"



My guess is that you need to set GOCACHE to a temporary directory. This should be done within dh-golang itself, so please send a patch.

I think you’re treading on unchartered territory here — I’m not aware of any package within Debian using Go modules yet.

On Tue, Feb 26, 2019 at 11:08 AM Julian Gilbey <julian-pkggo@d-and-j.net> wrote:
Hi!

I'm trying to build a Go package which requires GO111MODULE=on.  So I
set

export GO111MODULE := on

in the debian/rules Makefile (after reading
/usr/share/perl5/Debian/Debhelper/Buildsystem/golang.pm - it wasn't
obvious how to set this otherwise).  But now the build bombs out very
quickly indeed:

   [...]
   dh_auto_build -O--buildsystem=golang
go: cannot use modules with build cache disabled
        cd obj-x86_64-linux-gnu && go install -gcflags=all=\"-trimpath=/home/jdg/debian/go-gitlab/build-area/git-lab-0.15.2/obj-x86_64-linux-gnu/src\" -asmflags=all=\"-trimpath=/home/jdg/debian/go-gitlab/build-area/git-lab-0.15.2/obj-x86_64-linux-gnu/src\" -v -p 4
go: cannot use modules with build cache disabled
dh_auto_build: cd obj-x86_64-linux-gnu && go install -gcflags=all=\"-trimpath=/home/jdg/debian/go-gitlab/build-area/git-lab-0.15.2/obj-x86_64-linux-gnu/src\" -asmflags=all=\"-trimpath=/home/jdg/debian/go-gitlab/build-area/git-lab-0.15.2/obj-x86_64-linux-gnu/src\" -v -p 4 returned exit code 1
make: *** [debian/rules:9: build] Error 1

Help?!  How do I use GO111MODULE=on and not have the build crash like
this?

Thanks,

   Julian



--
Best regards,
Michael

Reply to: