-
Notifications
You must be signed in to change notification settings - Fork 18k
unable to compile: _cgo_import.c: throw: out of memory (FixAlloc) #1669
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
Labels
Comments
I've just tried latest version (adc0a3c6cd41 tip). Now output looks different, but I suppose everything under the cover is still same: … install websocket install ../cmd/godoc install rpc/jsonrpc ^Cmake: *** [runtime/cgo.install] Interrupt I've also tried to switch to vanilla gcc-4.4.5 (without hardened patches), but that doesn't help. I'll try to disable GrSecurity/PaX in kernel later to see is that helps. |
Yeah, switching off GrSecurity and PaX in kernel helps, both release and tip build ok. I've read issue #47 and while I'm agree with https://golang.org/issue/47?c=9 I think it's should be possible to build and run Go on kernels with mprotect in same way as other similar software - like browsers, flash, etc. - just use `paxctl -m` to mark Go binaries to disable mprotect. This probably will require solving issues with ELF header and adding some paxctl into build process on systems with available paxctl binary. |
Possible workarounds to build Go on Hardened Gentoo Linux: 1) disable CONFIG_PAX_MPROTECT 2) enable PaX softmode while building Go (untested, but should work) 3) use attached patch (there are different patches for current release c5c62aeb6267 and tip ffa7af487196) to run chpax (paxctl doesn't compatible with generated ELF headers) I've tried to minimize changes, and for release I got it to compile without wrapping 8l, but I suppose for compiling and running user apps 8l wrapper will be needed anyway. And I had to add it for tip patch because it compile test apps in misc/ and adding chpax to each of them is just crazy. Attachments:
|
Status changed to Duplicate. Merged into issue #47. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by powerman.asdf:
The text was updated successfully, but these errors were encountered: