-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
CGO_ENABLED=0 build fails on go 1.12 #30986
Comments
Please give us the exact steps to reproduce this issue. Thanks. |
Ok, I found I actually have https://www.archlinux.org/packages/community/x86_64/go-pie/ installed. I must have missed the package change. I guess this issue can be closed. But as a follow-up question. Is a build with Some info about PIE: https://wiki.gentoo.org/wiki/Hardened/Toolchain#Position_Independent_Executables_.28PIEs.29 |
/cc @ianlancetaylor for cgo |
We don't currently support PIE when not using cgo. There is some background at #18968. |
Also disable PIE because it does not work without cgo: golang/go#30986 (comment) Consequently, we also end up disabling ASLR for Tast binaries. This should be okay since Tast binaries are not shipped to users. BUG=chromium:976196 TEST=fast_build.sh -T TEST=fast_build.sh && ~/go/bin/tast run betty example.Pass Cq-Depend: chromium:1663975 Change-Id: I0da6cfbe45622ec874f94e74bc3b5a0bc4661508 Reviewed-on: https://chromium-review.googlesource.com/1664194 Tested-by: Shuhei Takahashi <[email protected]> Commit-Ready: Shuhei Takahashi <[email protected]> Legacy-Commit-Queue: Commit Bot <[email protected]> Reviewed-by: Hidehiko Abe <[email protected]>
As we call the similar C binary a module I went with that name for the Go version as well. There's some trickery needed, Go does currently not support nocgo for modules, as noted in golang/go#30986 so that functionality has to be disabled. Also this triggers the CC environment variable problem again so I had to change the test CC value used.
As we call the similar C binary a module I went with that name for the Go version as well. There's some trickery needed, Go does currently not support nocgo for modules, as noted in golang/go#30986 so that functionality has to be disabled. Also this triggers the CC environment variable problem again so I had to change the test CC value used.
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
)?kernel version
Outputgo env
OutputWhat did you do?
What did you expect to see?
Go compiles without issues like it did with
1.11
.What did you see instead?
Compilation exited with errors.
The text was updated successfully, but these errors were encountered: