Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
crypto/x509: cgo errors when compiling with gcc on Darwin #24437
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
I had this issue with both gcc 7.3 and 8.1. The issue was resolved by changing the C/C++ compiler environmental variables to Apple clang before running
That way, you don't have to modify your
There's nothing Go-specific here. I see this problem all over the web with different projects.
The code in question is Apple's, and not in Go's codebase anywhere.
At best we could make cmd/go detect this case (on failure, check if using gcc) and then recommend using clang. Might be overkill. @ianlancetaylor?