-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
runtime/cgo: cross compile with cgo for target ARM64/linux fails #28966
Comments
@ianlancetaylor is there an arm-specific owner I should point this to? |
If you want to cross-compile with Closing because there is nothing we can change in the Go tools to fix this. |
Hi Ian - I'm having a similar issue except I am defining CC_FOR_TARGET (although I've probably got it wrong)
And I checked the corss tools are installed:
However I still get:
Any pointers would be much appreciated. Thanks |
@Escalion This issue was closed almost a year ago. The best way to report a problem is to open a new issue, and the best way to ask for help is to use a forum. See https://golang.org/wiki/Questions. Thanks. In your case my first guess would be that you didn't set the |
@ianlancetaylor - no problem I will remember this for next time. Adding CC=aarch64-linux-gnu-gcc resolved my issue. Thank you! |
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?
I want to cross compile a package for arm64/linux. But I have met some problems.
I can reproduce the problem with a short code blow.
test.go
I ran
env CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build test.go
And then I got the blow output:
And then I tried to install
gcc-arm-linux-gnueabihf
package.Then I ran the command
env CGO_ENABLED=1 GOOS=linux GOARCH=arm64 CC=arm-linux-gnueabihf-gcc go build test.go
And I got the output below:
What did you expect to see?
I want to cross compile successfully for ARM64/linux
What did you see instead?
I have posted the details of the error output above~
The text was updated successfully, but these errors were encountered: