0

i was playing around with the revel sample bookings app (http://robfig.github.io/revel/samples/booking.html) and everything was working fine.

after upgrading my OSX command line tools from the apple developer site, the app refuses to start:

INFO  2014/03/10 23:33:46 harness.go:165: Listening on :9000
TRACE 2014/03/10 23:34:00 harness.go:126: Rebuild
TRACE 2014/03/10 23:34:00 build.go:127: Exec: [/usr/local/bin/git describe --always --dirty]
TRACE 2014/03/10 23:34:00 build.go:77: Exec: [/usr/local/bin/go build -ldflags -X github.com/robfig/revel/samples/booking/app.APP_VERSION "git-930a54f" -tags gorp -o /Users/nrser/dev/gopath/bin/booking github.com/robfig/revel/samples/booking/app/tmp]
ERROR 2014/03/10 23:34:02 build.go:84: # github.com/robfig/revel/samples/booking/app/tmp
xcrun: Error: failed to exec real xcrun. (No such file or directory)
go install github.com/robfig/revel/samples/booking/app/tmp: build output "/Users/nrser/dev/gopath/bin/booking" already exists and is not an object file

ERROR 2014/03/10 23:34:02 build.go:247: Failed to parse build errors:
 # github.com/robfig/revel/samples/booking/app/tmp
xcrun: Error: failed to exec real xcrun. (No such file or directory)
go install github.com/robfig/revel/samples/booking/app/tmp: build output "/Users/nrser/dev/gopath/bin/booking" already exists and is not an object file

i tried rm /Users/nrser/dev/gopath/bin/booking, but then get this when attempting revel run github.com/robfig/revel/samples/booking:

INFO  2014/03/10 23:38:13 harness.go:165: Listening on :9000
TRACE 2014/03/10 23:38:16 harness.go:126: Rebuild
TRACE 2014/03/10 23:38:16 build.go:127: Exec: [/usr/local/bin/git describe --always --dirty]
TRACE 2014/03/10 23:38:16 build.go:77: Exec: [/usr/local/bin/go build -ldflags -X github.com/robfig/revel/samples/booking/app.APP_VERSION "git-930a54f" -tags gorp -o /Users/nrser/dev/gopath/bin/booking github.com/robfig/revel/samples/booking/app/tmp]
TRACE 2014/03/10 23:38:18 app.go:56: Exec app: /Users/nrser/dev/gopath/bin/booking [/Users/nrser/dev/gopath/bin/booking -port=56507 -importPath=github.com/robfig/revel/samples/booking -runMode=dev]
ERROR 2014/03/10 23:38:18 app.go:58: Error running: fork/exec /Users/nrser/dev/gopath/bin/booking: exec format error

i'm assuming this has something to do with some stuff being built using the old command line tools and some stuff with the new version, but i don't know how to clean the binaries out or force a rebuild of all the packages or whatever would be required. any help much appreciated.

some possibly relevant dumps:

uname -a

Darwin mba2 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64

go env

GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/nrser/dev/gopath"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.2/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.2/libexec/pkg/tool/darwin_amd64"
TERM="dumb"
CC="/usr/local/bin/gcc-4.2"
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread -fno-common"
CXX="clang++"
CGO_ENABLED="1"

go was just installed via homebrew,

go version

go version go1.2 darwin/amd64
Andrew Barber
  • 39,603
  • 20
  • 94
  • 123
nrser
  • 1,287
  • 1
  • 13
  • 23
  • Looks like you got it fixed, but as an aside you also might want to uninstall Go from brew, and install it from the official package instead. Homebrew's go install is infamously unreliable. – pauljz Mar 10 '14 at 17:09
  • Please post an answer if you've solved the issue, rather than editing it into the question. And please don't be rude. – Andrew Barber Mar 10 '14 at 21:02
  • @pauljz – just to counter this, I've never had an issue with Homebrew + Go. Homebrew is still downloading the source tarballs and not packaging its own binaries. It's not much different from GVM. – elithrar Mar 10 '14 at 22:41
  • @pauljz - i am totally new to go and was just going off the instructions on the revel framework website. optimally i prefer to use homebrew 'cause i have a way of tracking what i have installed and applying it across the various systems i dev on. – nrser Mar 11 '14 at 08:08

0 Answers0