You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
make succeeds and builds Singularity - or perhaps a warning if builds in less than x MB RAM aren't feasible.
Actual behavior
I have a variety of fun cheap Pi's / clones on my desk and was trying to get latest Singularity on each one. The only failure was on a Pi Zero with 512MB RAM....
10:14 pm $ make --debug
GNU Make 4.1
Built for arm-unknown-linux-gnueabihf
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
build flag -mod=vendor only valid when using modules
build flag -mod=vendor only valid when using modules
Updating goal targets....
File 'all' does not exist.
File 'singularity' does not exist.
Prerequisite 'config.h' is newer than target '/home/pi/go/src/github.com/sylabs/singularity/internal/pkg/buildcfg/config.go'.
Must remake target '/home/pi/go/src/github.com/sylabs/singularity/internal/pkg/buildcfg/config.go'.
Successfully remade target file '/home/pi/go/src/github.com/sylabs/singularity/internal/pkg/buildcfg/config.go'.
Must remake target 'singularity'.
GO singularity
[+] GO_TAGS "containers_image_openpgp sylog apparmor selinux seccomp"
# github.com/sylabs/singularity/cmd/singularity
/opt/go/pkg/tool/linux_arm/link: running gcc failed: fork/exec /usr/bin/gcc: cannot allocate memory
Makefile:154: recipe for target 'singularity' failed
make: *** [singularity] Error 2
Adding -x to the go build in the generated Makefile reveals not much more info...
Workaround for me was to increase the size of the swapfile to 512MB under /etc/dphys-swapfile and go make a coffee while it builds. Could have also built on an arm board with more RAM and transferred.
Steps to reproduce behavior
Try to build current Singularity from source on an arm system (and maybe other architectures) with 512MB RAM and small (<<RAM) swapfile.
The text was updated successfully, but these errors were encountered:
I think we should start by finding a good way to profile the memory usage during the build. We may also want to profile some tests to verify a minimum memory amount.
There is actually an issue for go itself that linker RAM usage increased with Go 1.11 - this probably explains why I hadn't seen this a while ago - the last build I did on a Pi with little RAM was with Go 1.10 on an older Singularity 3.x
Also can hit this now on a Pi3. I'm still okay on a Pi4 2GB arm and LibreComputer Potato 2GB arm64. Will look into the cause in more detail when I have time.
This is something we aren't going to be able to address ourselves. The Go linker RAM usage is high enough on simpler programs than Singularity that a build on a different machine with more RAM will be required.
Version of Singularity:
3.2.1
Expected behavior
make
succeeds and builds Singularity - or perhaps a warning if builds in less than x MB RAM aren't feasible.Actual behavior
I have a variety of fun cheap Pi's / clones on my desk and was trying to get latest Singularity on each one. The only failure was on a Pi Zero with 512MB RAM....
Adding
-x
to thego build
in the generatedMakefile
reveals not much more info...Workaround for me was to increase the size of the swapfile to 512MB under
/etc/dphys-swapfile
and go make a coffee while it builds. Could have also built on an arm board with more RAM and transferred.Steps to reproduce behavior
Try to build current Singularity from source on an arm system (and maybe other architectures) with 512MB RAM and small (<<RAM) swapfile.
The text was updated successfully, but these errors were encountered: