gpt4 book ai didi

macos - OS X 10.9 中的 Golang : CGO_ENABLED=0 GOOS=linux GOARCH=arm ERROR

转载 作者:数据小太阳 更新时间:2023-10-29 03:38:02 25 4
gpt4 key购买 nike

cd /usr/local/go/src
CGO_ENABLED=0 GOOS=linux GOARCH=arm ./make.bash

# Building C bootstrap tool.
cmd/dist

# Building compilers and Go bootstrap tool for host, darwin/amd64.
lib9
libbio
libmach
misc/pprof
cmd/addr2line
cmd/cov
cmd/nm
cmd/objdump
cmd/pack
cmd/prof
cmd/cc
cmd/gc
cmd/6l
cmd/5l
/usr/local/go/src/cmd/5l/../ld/lib.c:661:9: error: no case matching constant switch condition '53'
[-Werror]
switch(thechar){
.......^~~~~~~
1 error generated.
go tool dist: FAILED: gcc -Wall -Wstrict-prototypes -Wno-sign-compare -Wno-missing-braces -Wno-parentheses -Wno-unknown-pragmas -Wno-switch -Wno-comment -Werror -fno-common -ggdb -pipe -O2 -mmacosx-version-min=10.6 -c -m64 -I /usr/local/go/include -I /usr/local/go/src/cmd/5l -o /usr/local/go/pkg/obj/cmd/5l/lib.o /usr/local/go/src/cmd/5l/../ld/lib.c

CGO_ENABLED=0 GOOS=linux GOARCH=<b>amd64</b> ./make.bash是正常的!只有“ ARM ”不正常。

#/usr/local/go/src/cmd/ld/lib.c代码:

vi cmd/ld/lib.c
661 switch(thechar){
662 case '8':
663 argv[argc++] = "-m32";
664 break;
665 case '6':
666 argv[argc++] = "-m64";
667 break;
668 }

最佳答案

我真的不确定 OSX 中的任何东西,但也许命令应该是这样

export CGO_ENABLED=0 ; export GOOS=linux ; export GOARCH=arm ; ./make.bash

代替?

关于macos - OS X 10.9 中的 Golang : CGO_ENABLED=0 GOOS=linux GOARCH=arm ERROR,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17544607/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com