-
Notifications
You must be signed in to change notification settings - Fork 18k
MacOS M1 can not run binary with go build, CODE SIGNING #64351
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
Comments
please show the sequence of commands you're running |
this is my sequence of commands:
then will get:
but if I use go run to run my program:
will work successfully:
In order to find problem, I use
|
I have given out the out of the 'go run . ', it's same as command 'go run main.go' -- the logs output of my program:
|
My MacOS version is 14.1.1 |
The go versions I have used on my computer are 1.18 and 1.20, and the most recent one I have used is 1.20. For a simple hello world program, go 1.21 can compile and run go build normally. And I also discovered today that if I add
|
sounds like the solution is to use the latest release. |
but I had said the version I used at first, the latest release version 1.21.4. the latest release version still has this bug. |
go 1.20 has no problem, but go 1.21 has. |
I'm having the same problem with binaries built with gotip.
As @taoyq1988 suggested, this works however:
|
Here a crash report:
|
Can you please try:
Sometimes the signing/blessing bits get confused, especially if a file has been replaced in-place. Such as what happened to me in #56599. Explicitly rm'ing it helps reset things. That could also explain why |
Rm'ing or specifying a new name does not work:
|
Thanks! Maybe related to #63997 (#63997 (comment))? Output from |
So I bisected my PATH and the issue for me comes from |
This comment was marked as off-topic.
This comment was marked as off-topic.
sounds like it's a dup of #63997 |
Go version
go version go1.21.4 darwin/arm64
Reproducibility
What operating system and processor architecture are you using (
go env
)?What did you do?
go build to create binary, then program can not work by CODE SIGNING
but if I use go run xxx, this can work sucessfully.
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: