-
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
cmd/go: -buildmode=pie requires external (cgo) linking, but cgo is not enabled #64875
Comments
I think that is expected, riscv does not support internal linking with buildmode=pie. Can you point out to the source that says PIE works without cgo on riscv64? |
Why does it work with 1.21? |
Thanks for the heads-up! There was some logic shifted around in CL 472515 and CL 522239 for #31544 that causes My understanding is that for riscv64, s390x buildmode=pie do require cgo because of the external linking, so the current behavior is correct, while in 1.21 and earlier we were compiling with cgo anyway, regardless of CGO_ENABLED. But I might be wrong here. cc @bcmills |
Otherwise, the fact that (attn @golang/riscv64) |
In triage, are we understanding correctly that, given that Even though the build didn't fail for Go 1.21, did we really support |
$ readelf -h usr/bin/velero-plugin-for-aws |
I wonder if in practice it used the C linker (despite |
Hi, Alpine Linux maintainer here 👋 We use See: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15809 |
We are from Arch Linux RISC-V and having the exact same problem. |
see #65887 (comment) |
Change https://go.dev/cl/569296 mentions this issue: |
…e notes for Go 1.21 and 1.22 Fixes golang/go#65887. Updates golang/go#31544. Updates golang/go#46330. Updates golang/go#64875. Change-Id: Ibb035e2287ad0efdbe875c5dd16ffd938ec7a956 Reviewed-on: https://go-review.googlesource.com/c/website/+/569296 Reviewed-by: Cherry Mui <[email protected]> Auto-Submit: Bryan Mills <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
CGO works fine on riscv64 thus should be enabled. Avoid build error golang/go#64875 Signed-off-by: Zhuo Zhi <[email protected]>
Go version
go version go1.22rc1 linux/riscv64
What operating system and processor architecture are you using (
go env
)?What did you do?
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: