不在 powerpc64(大端)上运行。

huangapple go评论88阅读模式
英文:

Go: Not running on powerpc64 (big-endian)

问题

我已经为 PowerPC 64 机器下载了 GO 包(ppc64)。当我运行 go 命令时,它抛出以下错误:

./go: line 1:ELF▒9@p@8: not found
./go: line 2: syntax error: unexpected ")"

机器信息如下:

uname -a
Linux 0005B9427C4C 3.12.19-rt30 #1 SMP Sun Jul 2 16:21:28 IST 2017 ppc64 GNU/Linux

从 /proc/cpuinfo 中可以看到:

processor       : 0
cpu             : e6500, 支持 altivec
clock           : 1599.999984MHz
revision        : 2.0 (pvr 8040 0120)

processor       : 1
cpu             : e6500, 支持 altivec
clock           : 1599.999984MHz
revision        : 2.0 (pvr 8040 0120)

processor       : 2
cpu             : e6500, 支持 altivec
clock           : 1599.999984MHz
revision        : 2.0 (pvr 8040 0120)

processor       : 3
cpu             : e6500, 支持 altivec
clock           : 1599.999984MHz
revision        : 2.0 (pvr 8040 0120)

processor       : 4
cpu             : e6500, 支持 altivec
clock           : 1599.999984MHz
revision        : 2.0 (pvr 8040 0120)

processor       : 5
cpu             : e6500, 支持 altivec
clock           : 1599.999984MHz
revision        : 2.0 (pvr 8040 0120)

processor       : 6
cpu             : e6500, 支持 altivec
clock           : 1599.999984MHz
revision        : 2.0 (pvr 8040 0120)

processor       : 7
cpu             : e6500, 支持 altivec
clock           : 1599.999984MHz
revision        : 2.0 (pvr 8040 0120)

timebase        : 41666666
platform        : CoreNet Generic
model           : fsl,B4860QDS

我已经从 https://golang.org/dl/ 下载了 go1.8.3.linux-ppc64le.tar.gz 包。

我已经搜索了很多但是找不到任何解决方案。你能告诉我出了什么问题吗?如何修复它?

英文:

I have downloaded the GO package(ppc64) for the PowerPC 64 machine.When I run the go it throws the following error:

./go: line 1:ELF▒9@p@8: not found
./go: line 2: syntax error: unexpected ")"

Machine information is like below,

uname -a
Linux 0005B9427C4C 3.12.19-rt30 #1 SMP Sun Jul 2 16:21:28 IST 2017 ppc64 GNU/Linux

From /proc/cpuinfo:
processor : 0
cpu : e6500, altivec supported
clock : 1599.999984MHz
revision : 2.0 (pvr 8040 0120)

processor       : 1
cpu             : e6500, altivec supported
clock           : 1599.999984MHz
revision        : 2.0 (pvr 8040 0120)

processor       : 2
cpu             : e6500, altivec supported
clock           : 1599.999984MHz
revision        : 2.0 (pvr 8040 0120)

processor       : 3
cpu             : e6500, altivec supported
clock           : 1599.999984MHz
revision        : 2.0 (pvr 8040 0120)

processor       : 4
cpu             : e6500, altivec supported
clock           : 1599.999984MHz
revision        : 2.0 (pvr 8040 0120)

processor       : 5
cpu             : e6500, altivec supported
clock           : 1599.999984MHz
revision        : 2.0 (pvr 8040 0120)

processor       : 6
cpu             : e6500, altivec supported
clock           : 1599.999984MHz
revision        : 2.0 (pvr 8040 0120)

processor       : 7
cpu             : e6500, altivec supported
clock           : 1599.999984MHz
revision        : 2.0 (pvr 8040 0120)

timebase        : 41666666
platform        : CoreNet Generic
model           : fsl,B4860QDS

I have downloaded the go1.8.3.linux-ppc64le.tar.gz package from https://golang.org/dl/.

I have searched a lot but could not find any solution. Can you tell me what is going wrong?How to fix it?

答案1

得分: 1

您的内核报告了ppc64架构。这意味着它是64位的大端模式POWER架构。Go项目只发布了ppc64le(64位的小端模式POWER架构)构建版本:Go稳定版下载只提供了一个go1.8.3.linux-ppc64le.tar.gz的下载。

Go源代码包含了一个64位的大端模式POWER端口,但您需要自己编译它。(但这绝对是一条不常走的路,所以您可能会遇到问题。)请注意,即使是自己编译的版本,Go 1.9也需要POWER8,所以根据您拥有的硬件,即使是自己编译的版本也可能是个死胡同。(/proc/cpuinfo输出中的e6500表明该平台兼容POWER8。)

另一个选择是GCC Go编译器(gccgo)。这个Go编译器可以与许多GCC目标一起使用,并且有很大的可能性在可预见的未来得到支持。然而,很少有Go程序员关心gccgo,所以您可能会遇到一些无法与其一起使用的包。

英文:

Your kernel reports the ppc64 architecture. This means it is 64-bit POWER in big endian mode. The Go project only publishes ppc64le (64-bit POWER in little endian mode) builds: Go stable downloads only offers a go1.8.3.linux-ppc64le.tar.gz download.

The Go sources contain a 64-bit POWER big-endian port, but you need to compile it yourself. (But this is definitely off the beaten path, so you might run into issues.) Note that Go 1.9 will require POWER8 even in big-endian mode, so depending on the hardware you have, even a self-compiled version could be a dead-end. (e6500 in the /proc/cpuinfo output suggests that this platform is not POWER8-compatibile.)

Another option is the GCC Go compiler (gccgo). This Go compiler will work with many GCC targets, and the chances are good that it will remain supported to some degree in the foreseeable future. However, few Go programmers care about gccgo, so you might encounter packages which do not work with it.

huangapple
  • 本文由 发表于 2017年8月3日 17:38:46
  • 转载请务必保留本文链接:https://go.coder-hub.com/45480412.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定