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/link: running gcc failed: fork/exec /usr/bin/gcc: cannot allocate memory #16082
Comments
compile k8s and give the same error as follow: !!! Error in /home/ws/rpmbuild/BUILD/ose-738b7603b042dcda7a5ba419ab0e7f40a617080c/hack/lib/golang.sh:423 RPM build errors: |
I don't see any way for us to fix this. Your system is out of memory. It happens. You may be able to make the build succeed by setting the environment variable Closing because I don't think there is anything to do. Please feel free to comment if you disagree. |
@ianlancetaylor On RPI3B arm32 os, there is only 1G memory and k8s will compile ok on it. But on Pine64 with 2G memory and aarch64 os, k8s compile failed. After I trace it, I found that as follow: When the compile proccess reach here, the memory is linear decreasing. It is so obvious and strange. Setting the environment variable GOMAXPROCS to 1 is not working for me. |
Should https://github.com/golang/go/wiki/GoArm#swap be updated? It hints that 256Mb of RAM with 512Mb of swap is sufficient. |
On Sep 19, 2016 9:45 AM, "M-A" notifications@github.com wrote:
That's the requirement for building Go from source, not the minimum |
Oh you are right this issue is about build a random project; I got this error from building the toolchain from sources. |
The minimum for building Go from source is 512mb per core for 32bit system, Please update the wiki page. On Tue, 20 Sep 2016, 10:55 M-A notifications@github.com wrote:
|
Please answer these questions before submitting your issue. Thanks!
go version
)?go version go1.6.2 linux/arm64
go env
)?GOARCH="arm64"
GOBIN=""
GOEXE=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/usr/lib/golang"
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_arm64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
Just build openshift origin 1.1.6 on aarch64 platform on CentOS aarch64 edition. failed with below error:
/usr/lib/golang/pkg/tool/linux_arm64/link: running gcc failed: fork/exec /usr/bin/gcc: cannot allocate memory
My device have only 2G memory and no swap space.
compile ok.
compile failed.
The text was updated successfully, but these errors were encountered: