Closed Dawnnnnnn closed 3 years ago
You must specify CGO_ENABLED=1 whereas your goreleaser config is:
builds:
- env:
- CGO_ENABLED=0
I change CGO_ENABLED= 1 . output:
⨯ release failed after 4.12s error=failed to build for linux_386: exit status 2: # runtime/cgo
linux_syscall.c:67:13: error: implicit declaration of function 'setresgid' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
linux_syscall.c:67:13: note: did you mean 'setregid'?
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:593:6: note: 'setregid' declared here
linux_syscall.c:73:13: error: implicit declaration of function 'setresuid' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
linux_syscall.c:73:13: note: did you mean 'setreuid'?
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:595:6: note: 'setreuid' declared here
It seems to be a problem with my local environment, I will try by myself
Although in the end I still can't build the linux version, but this is a bug of musl-cross on Apple silicon,thx a lot
Reopen to give a better error message.
I'm not sure which library caused the problem. I wrote a demo to verify, it said
demo
Any ideas?