cosmopolitan: Cannot build it with lots of cores.
I’ve been trying and failing to build cosmopolitan under Devuan Chimaera, which is a Debian based Linux distribution without systemd. I do notice that you keep mentioning GNU/systemd instead of Linux, I was thinking that was some sort of joke, but maybe my problem is the lack of systemd?
I have tried git head, and the source tarball, same result.
make -j1 -O
♥cosmo
error: clone(0) failed EAGAIN/11/Try again
`make MODE= -j128 o//depend` exited with 1:
build/bootstrap/mkdeps.com -o o//depend -r o// @o//srcs.txt @o//hdrs.txt @o//incs.txt
consumed 561µs wall time
ballooned to 160kb in size
needed 523us cpu (0% kernel)
caused 18 page faults (100% memcpy)
x86_64-linux-musl-gcc: fatal error: cannot execute '/media/DATA/home/dvs1/src/APE_Cosmo_STUFFS/cosmopolitan_ORIGINAL_BUILD/o/third_party/gcc/bin/../libexec/gcc/x86_64-linux-musl/9.2.0/cc1': vfork: Resource temporarily unavailable
compilation terminated.
`make MODE= -j128 o/ape/config.h.ok` exited with 1:
o/third_party/gcc/bin/x86_64-linux-musl-gcc -S -Wall -Werror -fdebug-prefix-map=/media/DATA/home/dvs1/src/APE_Cosmo_STUFFS/cosmopolitan_ORIGINAL_BUILD= -frecord-gcc-switches -fno-schedule-insns2 -fno-optimize-sibling-calls -mno-omit-leaf-frame-pointer -DSYSDEBUG -Og -DCOSMO -DMODE="" -DIMAGE_BASE_VIRTUAL=0x400000 -nostdinc -iquote. -includelibc/integral/normalize.inc -msse3 -fno-math-errno -fno-trapping-math -fno-fp-int-builtin-inexact -fno-ident -fno-common -fno-gnu-unique -fstrict-aliasing -fstrict-overflow -fno-semantic-interposition -std=gnu2x -xc -g0 -o o/ape/config.h.ok ape/config.h -fdiagnostics-color=always -pg -D__PG__ -mno-red-zone -D__MNO_RED_ZONE__ -fno-omit-frame-pointer -D__FNO_OMIT_FRAME_POINTER__
consumed 15,001,251µs wall time
ballooned to 1,148kb in size
needed 884us cpu (0% kernel)
caused 49 page faults (100% memcpy)
5 context switches (100% consensual)
make: *** [build/rules.mk:32: o/ape/config.h.ok] Error 1
The number of “vfork: Resource temporarily unavailable” sections I get depends on how many -jx I use. Despite giving specific -jx, there’s always the “make MODE= -j128”. Yes I have a Ryzen Threadripper with 64 cores, so CPU counting ends up at 128. Do I have too many cores, and something is tripping up on that? It seems to be running out of cores. lol
I notice there’s no way of building completely from source, otherwise I would hack away at the source code until it worked, but the build system tries to use it’s own pre compiled build tools that come with the source code, and it’s this build system binary blob that is failing. So I can’t fix this myself with out lots of work essentially rebuilding things from the ground up one step at a time.
Redbean worked fine, which is the thing that attracted me to cosmo in the first place. I want to try redbean out as the basis for my OpenSim rewrite (3D virtual world metaverse that has been around for over a decade).
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 35 (17 by maintainers)
The real test - o/tool/net/redbean-demo.com works and all the pages are OK. 😎
@ahgamut #272 was already open in a tab and read before I opened this ticket, that’s what I meant by “keeping an eye on the effort”. So now that I can actually compile cosmo and redbean myself, I can try the things mentioned in #272. 😎
I already build LuaJIT into an existing project of mine that I’m looking at using redbean for. Currently it uses FCGI to work with a variety of web servers.
Thanks for your efforts to get that working.
The recommended approach would be to spin up a VM and build them there, or as a different user as you suggested. The build bootstrap folder is intended only for commands that have a “chicken and egg problem” because the tools are required to compile the tools themselves.
The only tool where that isn’t the case is
build/bootstrap/ape.elfwhich completely freestanding and written in a portable dialect that can be compiled independently of the Makefile regime. You may read its source code in https://github.com/jart/cosmopolitan/blob/master/ape/loader.c and note the fact that this is a 4 kilobyte program. The other tools, such as package.com and zipobj.com which weigh in at a whopping 100+kb are obviously much too complicated to be written in this manner, and as such, need to be be bootstrapped.