-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/cgo: "'_check_for_64_bit_pointer_matching_GoInt' declared as an array with a negative size" on darwin/arm64 #43842
Comments
typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1]; Let's evaluate this super quickly in C: int main() {
printf(">> %lu\n", sizeof(void*));
printf(">> %d\n", 64/8);
} Execute it:
I don't know how |
_check_for_64_bit_pointer_matching_GoInt
declared as an array with a negative size
Depending on how you were invoking |
Weird. What is the output for
Could be. Does setting It is still weird in that even if it defaults to x86_64, it is still 64-bit and the pointer size should still be 8. |
Is it possible that the user's shell is a 32-bit binary, causing |
I don't think ARM64 Mac supports 32-bit binary. |
Running
|
Thanks :-) |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yup. The beta.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I tried to compile the following file with
go build main.go
:What did you expect to see?
A successful built.
What did you see instead?
Extra
It could be related to #38693.
The
GOARCH
andGOOS
are OK in this case.The text was updated successfully, but these errors were encountered: