New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build if GOPATH is set in parent shell #4

Closed
tv42 opened this Issue Oct 21, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@tv42

tv42 commented Oct 21, 2018

biscuit/GNUmakefile has GOPATH ?= $(shell pwd) which only sets GOPATH if it's not already set. If the user has GOPATH set to any value that doesn't include the current directory as an element, the build fails:

~/src/biscuit/biscuit$ rm -f mkfs; GOPATH=/whatever make qemu CPUS=2
GOPATH="/whatever" ../bin/go build src/mkfs/mkfs.go
src/mkfs/mkfs.go:8:8: cannot find package "fs" in any of:
	/home/tv/src/biscuit/src/fs (from $GOROOT)
	/whatever/src/fs (from $GOPATH)
src/mkfs/mkfs.go:9:8: cannot find package "ufs" in any of:
	/home/tv/src/biscuit/src/ufs (from $GOROOT)
	/whatever/src/ufs (from $GOPATH)
src/mkfs/mkfs.go:10:8: cannot find package "ustr" in any of:
	/home/tv/src/biscuit/src/ustr (from $GOROOT)
	/whatever/src/ustr (from $GOPATH)
GNUmakefile:119: recipe for target 'mkfs' failed
make: *** [mkfs] Error 1
@grodranlorth

This comment has been minimized.

Collaborator

grodranlorth commented Oct 21, 2018

I'd prefer the build to fail rather than having the makefile fiddle with or override the user's GOPATH. I've updated the README.md to include to some hints.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment