duanbichou4942 2014-03-10 15:49
浏览 62

升级OSX命令行工具后,golang revel应用程序无法编译

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
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度
    • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
    • ¥15 ETLCloud 处理json多层级问题
    • ¥15 matlab中使用gurobi时报错
    • ¥15 这个主板怎么能扩出一两个sata口
    • ¥15 不是,这到底错哪儿了😭
    • ¥15 2020长安杯与连接网探
    • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么