Compiler errors gccgo不知道-fgo相对导入路径

Compiler errors gccgo不知道-fgo相对导入路径,compiler-errors,go,gccgo,Compiler Errors,Go,Gccgo,我试图在我的机器上用gccgo编译一些代码: $ export LANG=C $ go get -d github.com/fuzxxl/ppm $ cd $GOPATH/src /github.com/fuzxxl/ppm $ go build -compiler gcc gccgo: error: unrecognized command line option '-fgo-relative-import-path=_/home/fuz/src/go/src/github.com/fuzxx

我试图在我的机器上用gccgo编译一些代码:

$ export LANG=C
$ go get -d github.com/fuzxxl/ppm
$ cd $GOPATH/src /github.com/fuzxxl/ppm
$ go build -compiler gcc
gccgo: error: unrecognized command line option '-fgo-relative-import-path=_/home/fuz/src/go/src/github.com/fuzxxl/ppm'
$ go version
go version devel +dda87c8bcba1 Wed Apr 17 13:25:28 2013 -0700 linux/amd64
$ gccgo --version
gccgo (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
这些是我机器上的工具:

$ export LANG=C
$ go get -d github.com/fuzxxl/ppm
$ cd $GOPATH/src /github.com/fuzxxl/ppm
$ go build -compiler gcc
gccgo: error: unrecognized command line option '-fgo-relative-import-path=_/home/fuz/src/go/src/github.com/fuzxxl/ppm'
$ go version
go version devel +dda87c8bcba1 Wed Apr 17 13:25:28 2013 -0700 linux/amd64
$ gccgo --version
gccgo (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

为什么会出现上面显示的错误?如何解决此问题?

使用了
-fgo相对导入路径
选项,而GCC 4.7.2(包括gccgo)已经使用。因此gccgo 4.7.2还没有包含对该选项的支持

将gccgo升级到4.7.3(或4.8.0)应该可以解决这个问题

“”是Ubuntu 13.04的代码名,已计划 2013年4月25日发布

GNU Go编译器:

在此期间,我使用的是Ubuntu 13.04(Raring Ringtail)

比如说,

$ uname -a
Linux ubuntu 3.8.0-19-generic #29-Ubuntu SMP Wed Apr 17 18:16:28 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
$ gccgo --version
gccgo (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3

$ export GOPATH=/home/peter/gopath
$ export LANG=C
$ go get -d github.com/fuzxxl/ppm
$ cd $GOPATH/src/github.com/fuzxxl/ppm
$ go build -compiler gccgo
$ go install -compiler gccgo
$ 

谢谢你的帮助。你知道是否有任何PPA包含Ubuntu的最新gccgo版本吗?即将发布的Ubuntu 13.04版本将包含gccgo 4.7.3。我不知道有任何PPA包含(截至今天)最新的Ubuntu12.10预构建包。