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 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
    • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
    • ¥15 matlab有关常微分方程的问题求解决
    • ¥15 perl MISA分析p3_in脚本出错
    • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
    • ¥15 ubuntu虚拟机打包apk错误
    • ¥199 rust编程架构设计的方案 有偿
    • ¥15 回答4f系统的像差计算
    • ¥15 java如何提取出pdf里的文字?
    • ¥100 求三轴之间相互配合画圆以及直线的算法