it ignores the -j1 from make.conf
# grep j /home/tinderbox/img1/13.0-desktop-plasma_20170716-133101/etc/portage/make.conf
└─sudo,6565 /opt/tb/bin/chr.sh /home/tinderbox/img1/13.0-desktop-plasma_20170716-133101 /bin/bash /tmp/job.sh
└─chr.sh,6580 /opt/tb/bin/chr.sh /home/tinderbox/img1/13.0-desktop-plasma_20170716-133101 /bin/bash /tmp/job.sh
└─su,6630 - root -c /bin/bash /tmp/job.sh
└─emerge,3063 -b /usr/lib/python-exec/python3.4/emerge --update dev-lang/rust
└─sandbox,14040,portage /usr/lib/portage/python3.4/ebuild.sh compile
└─ebuild.sh,14084 /usr/lib/portage/python3.4/ebuild.sh compile
└─ebuild.sh,14109 /usr/lib/portage/python3.4/ebuild.sh compile
└─python2.7,14127 x.py build
└─cmake,29840 --build . --target install --config Release -- -j 12
└─gmake,29843 -j 12 install
└─gmake,29864 -f CMakeFiles/Makefile2 all
This is a big problem on memory-constrained system. Rust builds llvm as part of compilation, and linkage of llvm binaries takes ~3GB of RAM each.
With the default parallelism being set to the amount of cores available to the system, and no ability to change that, the compilation eats (on my 4-core system) 12GB. I have "only" 6GB of RAM, and compilation of rust makes the system swap a lot, rendering it effectively unusable for extended time (and, naturally, fails to emerge completely without enough swap on the system).
This will become a much more visible problem once www-client/firefox-52.3.0 with non-optional rust dependency gets unmasked.
Actually, please disregard me.
It seems that the great memory use is due to -ggdb in my CFLAGS (https://bugs.gentoo.org/show_bug.cgi?id=626134), and without that one, the inability to control parallelism is still unpleasant but not as critical as I made it sound.
This is a massiv problem for arm, rpi2+3 for instance have quadcore arm cpu but only 1gb of ram. I added swap via usb hd but still this is not cool at all, torturing that poor hd :(
*** Bug 635696 has been marked as a duplicate of this bug. ***
seems, something like -C codegen-units=1 should go into the eclass ?
FWIW I tried
in make.conf, but that doesn't affect the build of rust itself :-/
From IRC upstream :
[19:48] <toralf> Is there any way to control the build of rust in that way that only 1 CPU is used ?
[19:48] <shep> frogmella: https://play.rust-lang.org/?gist=a67da374a310f8bd83db42df5e654fa9&version=nightly ?
[19:49] <shep> toralf: `cargo build --help` shows ` -j N, --jobs N Number of parallel jobs, defaults to # of CPUs`
[19:50] <frogmella> figured I would have to do something like that, thanks!
[19:50] <toralf> shep: ok, thx, so I just need a Gentoo dev who wrote that ebuild (https://bugs.gentoo.org/626080)
*** This bug has been marked as a duplicate of bug 613794 ***