-
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/go: 'go build' encountered invalid C headers under MacOS #30072
Comments
These sorts of symptoms on macOS often indicate a broken Xcode install or some other, incompatible In this particular case, it appears that you have an invalid |
Are you able to build C programs in the same environment? You may be able to run |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
FYI if anyone like me found themselves in this situation, check your Delete these and you'll get unstuck. Don't ask me how I got myself into that situation, but I think it was screwing around with brew. |
@bcmills Please help me, I meet this problem too. I can build C programs in the project, but when I run |
@zhulinwei This issue is closed, and at this point there is no reason to think that there is a problem with Go. You will most likely find a better answer on a forum. See https://golang.org/wiki/Questions. |
@ianlancetaylor thanks very much, I fix this problem by |
Same. This worked for me. Was afraid of removing to bulk renamed them to .x from .h |
I solved this problem, and I hope my answer can help others. If you don't need to work with c lang, you can else you can change your CC, replace |
I know this is older but this solved my problem |
For what it's worth, we've seen a lot of macOS C issues from folks who have installed Anaconda or Miniconda (see #29597). It might be worth investigating those as the source of corrupted C headers. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Actually, I'm using Golang to debug go program, after I hit the debug button, it didn't compile.
The command used to compile is
What did you expect to see?
No error
What did you see instead?
It reports
The text was updated successfully, but these errors were encountered: