Peter, That will no longer work in go 1.8 since GOPATH is set to $HOME/go by default and what you describe will also set GOROOT to the same directory and the two environment variables have to point at different directories.
("go env" is useful for debugging this) One solution is "git clone https://go.googlesource.com/go go1.8" and use that directory (since you will need a ~/go1.4 to build anyway) (note you will also have to checkout the go1.8 branch explicitly if you don't want to build from master) S On 19 February 2017 at 15:29, peterGo <go.peter...@gmail.com> wrote: > Ayan, > > It's not idiomatic because you are setting and using GOROOT. Leave that to > the compiler. For example, with no GOROOT, > > $ cd $HOME > $ git clone https://go.googlesource.com/go > $ cd go/src > $ ./make.bash > > Peter > > > On Saturday, February 18, 2017 at 5:51:09 PM UTC-5, Ayan George wrote: >> >> I'm somewhat new to go and I've been relying on FreeBSD and Ubuntu >> packages for the compiler. >> >> I decided to try building Go from source to get go1.8 and I realized >> it is really convenient to simply clone the repo into my >> ${GOROOT}/src (which is now simply ${HOME}/go), build Go (I did >> extract 1.8 binaries to bootstrap my environment), and add >> ${HOME}/go/bin to my path. >> >> Now I don't have to worry about finding the latest source and I can >> even keep up with new developments by pulling new code. >> >> Am I missing anything by not using the packages? Is this idiomatic? >> >> -ayan >> > -- > 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. -- 4096R/EA75174B Steve Mynott <steve.myn...@gmail.com> -- 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.