Linux (ARM) 下Go语言编译 Gogs 失败

熊猫大侠到此一游 发布于 2015/05/07 17:11
阅读 1K+
收藏 0

想在自己的Cubietruck上部署一个Gogs服务,搭建了Go语言环境后,Gogs无法编译通过。再加上自己对Go不熟悉,始终没有安装成功。

我的环境是:

OS: Lubuntu Server 13.09
硬件:Cubietruck (即Cubieborad 3,CPU是 Arm 的)
Go:1.4.2,从github上下载下来源码编译的
Git: 1.8.1.2
Gogs: 0.6.1,也是从github上下载下来源码,其中Gogs各种依赖包都有。

Go语言环境配置:

#Golang classpath
export GOROOT=/home/git/go
export GOBIN=$GOROOT/bin
export GOARCH=arm
export GOOS=linux
export PATH=$GOROOT/bin:$PATH
export GOPATH=/home/git/app



 最开始我的Go语言版本是1.3.3,在此版本下编译Gogs的提示如下:
## Go 1.3.3 
git@cubietruck:~/app/src/github.com/gogits/gogs$ go build
# github.com/gogits/gogs/routers/user
Boffset: unknown state 0
Bseek: unknown state 0
Bseek: unknown state 0
Boffset: unknown state 0
Boffset: unknown state 0
Bseek: unknown state 0
# github.com/gogits/gogs/routers
routers/home.go:14: import $WORK/github.com/gogits/gogs/routers/user.a: not a package file
# github.com/gogits/gogs/routers/dev
Boffset: unknown state 0
Bseek: unknown state 0
Bseek: unknown state 0
Boffset: unknown state 0
Boffset: unknown state 0
Bseek: unknown state 0
# github.com/gogits/gogs/routers/org
Boffset: unknown state 0
Bseek: unknown state 0
Bseek: unknown state 0
Boffset: unknown state 0
Boffset: unknown state 0
Bseek: unknown state 0
# github.com/gogits/gogs/routers/repo
Boffset: unknown state 0
Bseek: unknown state 0
Bseek: unknown state 0
Boffset: unknown state 0
Boffset: unknown state 0
Bseek: unknown state 0
# github.com/gogits/gogs/routers/api/v1
routers/api/v1/repo_file.go:11: import $WORK/github.com/gogits/gogs/routers/repo.a: not a package file

后来我把Go语言升级到1.4.2,再次编译Gogs,也没有编译通过,情况如下:

## Go 1.4.2
git@cubietruck:~/app/src/github.com/gogits/gogs$ go build
# github.com/gogits/gogs/routers/user
Boffset: unknown state 0
Bseek: unknown state 0
# github.com/gogits/gogs/routers
Boffset: unknown state 0
Bseek: unknown state 0
Bseek: unknown state 0
Boffset: unknown state 0
Boffset: unknown state 0
Bseek: unknown state 0
# github.com/gogits/gogs/routers/dev
Boffset: unknown state 0
Bseek: unknown state 0
Bseek: unknown state 0
Boffset: unknown state 0
Boffset: unknown state 0
Bseek: unknown state 0
# github.com/gogits/gogs/routers/repo
Boffset: unknown state 0
Bseek: unknown state 0
Bseek: unknown state 0
Boffset: unknown state 0
Boffset: unknown state 0
Bseek: unknown state 0
# github.com/gogits/gogs/routers/org
Boffset: unknown state 0
Bseek: unknown state 0
Bseek: unknown state 0
Boffset: unknown state 0
Boffset: unknown state 0
Bseek: unknown state 0
# github.com/gogits/gogs/routers/api/v1
routers/api/v1/repo_file.go:11: import $WORK/github.com/gogits/gogs/routers/repo.a: not a package file

相比较Go1.3.3下,少了一个报错提示,上网也查了些资料,没有找到相关的解决方法。不知道怎么解决,求指导,谢谢。

还有,官方只提供了64们的编译二进制文件,希望也提供下32位的,因为既然是自托管服务,像现在有太多玩开发版的卡片电脑的,这样的话也更方便,更符合Gogs的初衷。@无闻

加载中
0
无闻
无闻

hi 不好意思回晚了。。。。。


是有点晚。。


第二次你升级到1.4.2的就错误来看是没有删除旧版编译时的 .a 文件,也就是 $GOPATH/pkg 下的文件。。

无闻
无闻
回复 @Sleepwalke : 恩。。我得找个ARM的机子。。也编译下。。嘿嘿
熊猫大侠到此一游
熊猫大侠到此一游
哈。没事。我实在没编译过,后来凑巧遇到一个哥们环境和我一样,都用的arm的开发版,我就把他的拷过来用了。不过希望还是可以提供一个arm linux下的二进制,这不正好和官网上说的在树莓派上也轻松部署的嘛,希望采纳。[13]
返回顶部
顶部