为了账号安全,请及时绑定邮箱和手机立即绑定

我的Go工具是否针对错误的体系结构构建?

我的Go工具是否针对错误的体系结构构建?

Go
qq_花开花谢_0 2021-04-27 13:30:06
我是Go语言的忠实拥护者,现在我正在尝试探索x86 / amd64以外的其他体系结构。我构建了Go for ARM,它似乎对该目标有很好的支持。所有库都成功构建,并且测试失败(因为它试图在我的amd64系统上运行ARM测试二进制文件)。毕竟,我的文件夹中有5g/ ,它们会生成有效且有效的ARM二进制文件。但是其他Go工具正在发生什么:5l$GOBIN5a:        ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped5c:        ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped5g:        ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped5l:        ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped6cov:      ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped6nm:       ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped6prof:     ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not strippedcgo:       ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not strippedebnflint:  ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not strippedgodefs:    ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not strippedgodoc:     ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not strippedgofix:     ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not strippedgofmt:     ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not strippedgoinstall: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not strippedgomake:    POSIX shell script, ASCII text executable看?cgo是ARM二进制,gofix和gofmt是ARM二进制文件为好。我以为如果我提供$GOHOSTOS/$GOHOSTARCH变量,我会交叉编译我的应用程序吗?如何获得cgo针对ARM目标的工作?
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 210 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信