Saturday, September 14, 2013

Go-Lang build work-around with brew and gcc strangeness

Tonight I tried to build go-lang for the new Cloud Foundry cli that is written in Go, which was just announced this week at #platformcf during the talk by the project anchor Mike Gehard. Because I have both gcc from Brew and Apple's compiler, which I believe I got from the XCode Developer Tools, sometimes my machine gets a bit confused.

Below is the gist that shows the context for the /private/tmp/go-BvwY/go/src/cmd/5l/../ld/lib.c:661:9: error: no case matching constant switch condition '53' [-Werror]
switch(thechar){
error I encountered plus the work-around that I could use to get around it, which is to specify the path to my gcc.


I also found Ryan Day's blog helpful to explain $GOPATH and make some recommendations for how he sets it up.