On my macbook pro, I'm able to `go install` with a custom installsuffix 
just fine:


$ ls -l /usr/local/go/pkg/
total 0
drwxr-xr-x   5 root  wheel   170 Feb 25  2016 bootstrap
drwxr-xr-x  58 root  wheel  1972 Feb 25  2016 darwin_amd64
drwxr-xr-x  57 root  wheel  1938 Sep  8  2015 darwin_amd64_race
drwxr-xr-x   4 root  wheel   136 Sep  8  2015 include
drwxr-xr-x   3 root  wheel   102 Feb 25  2016 obj
drwxr-xr-x   3 root  wheel   102 Feb 25  2016 tool


$ go install -installsuffix nocgo golang.org/x/tools/cmd/goimports
$ echo $?
0
$ echo $GOROOT


$ ls -l /usr/local/go/pkg/
total 0
drwxr-xr-x   5 root  wheel   170 Feb 25  2016 bootstrap
drwxr-xr-x  58 root  wheel  1972 Feb 25  2016 darwin_amd64
drwxr-xr-x  57 root  wheel  1938 Sep  8  2015 darwin_amd64_race
drwxr-xr-x   4 root  wheel   136 Sep  8  2015 include
drwxr-xr-x   3 root  wheel   102 Feb 25  2016 obj
drwxr-xr-x   3 root  wheel   102 Feb 25  2016 tool


But on a linux machine, it fails:

$ ls -l /usr/local/go/pkg/
total 20
drwxr-xr-x  2 root root 4096 Jan 13  2016 include
drwxr-xr-x 29 root root 4096 Jan 13  2016 linux_amd64
drwxr-xr-x 28 root root 4096 Jan 13  2016 linux_amd64_race
drwxr-xr-x  3 root root 4096 Jan 13  2016 obj
drwxr-xr-x  3 root root 4096 Jan 13  2016 tool


$ GOPATH=`pwd`/go go install -installsuffix nocgo golang.org/x/tools/cmd/
goimports
go install runtime: mkdir /usr/local/go/pkg/linux_amd64_nocgo/: permission 
denied


The obvious difference appears to be that on my Mac, the go tool isn't 
trying to write out .a files for the core lib packages that are compiled 
with the new installsuffix, whereas on Linux it *is* trying to do so.

Why is this?  What is the recommended way to use a custom installsuffix on 
linux (efficiently - i.e. without recompiling all dependencies every time)?

Thanks,
Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to