Hi there! I've constantly failing builds of dev-lang/rust (with overflowed /var/tmp/portage tmpfs) on some <8GB RAM machines. It seems, it is not enough to have 3 GB "disk" space for it to build, so it is needed to add proper disk space check like for firefox and libreoffice.
To add some numbers: My /var/tmp/portage is 4GB, which is not enough for dev-lang/rust-1.25.0. It was sufficient to build dev-lang/rust-1.23.0-r1, though.
rust-1.26.0 needs at least 6.2G with amd64, but an attempt to fix this via check-reqs.eclass broke the python detection of the ebuilds. if you are able to come up with a patch, please attach it.
Created attachment 534992 [details, diff] rust-1.26.1 with check-reqs
Please don't enable the check for ram size, the check-reqs eclass doesn't recognize swap space and it would break the build on x86, and propably some other 32bit arches such as armv6/7 On the other hand, there is a minimum amount of free ram needed for compilation of rustc itself - propably around 750mb should be free on arm, regardless of the amount of swap added, otherwise it may never come to an end. Can you provide a better diff, where one can see in which part of the ebuild you're calling the checks? Right now it looks as if you're doing that even before the inherit command, just wonder wether that is a reasonable idea?
yep, I never used check-reqs and I just copied from another ebuild, the variables are set just before the inherit. I saw that is a quite common pattern in ebuilds. Good to know about x86/arm constraints.
Probably the same issue as https://bugs.gentoo.org/show_bug.cgi?id=654410 I would say the physical/virtual memory checks are hard to gauge due to the aforementioned swap as well as which jobs land on that machine at the time when using -j. However the disk space check would be good, I just had 1.29.1 fail when 1.28 worked fine in 5GB. I was okay since rust's main consumer (namely firefox) also had a disk check. Now that rust now apparently exceeds Firefox's check, I had a nasty surprise.
ran out of space with 6.5 GB /var/tmp/portage It was the only package at that time.
im not sure how much rust actually needs. Less than 12gb i can tell you that. ill try to monitor how much it uses next time it builds but i have a 12gb tmpfs and it builds fine there...well latest has file collisions but thats completely unrelated. not much help i know but i figured id contribute what i know so far.
Last I tried was rust-1.28.0, it consumed 7.8 Gb in tmpfolder on amd64. No special cflags or debug involved.
*** Bug 654410 has been marked as a duplicate of this bug. ***
*** Bug 671508 has been marked as a duplicate of this bug. ***
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0718dbc84ed51edd184446fc0d9cde7195e25a0 commit c0718dbc84ed51edd184446fc0d9cde7195e25a0 Author: Dirkjan Ochtman <djc@gentoo.org> AuthorDate: 2018-11-19 16:41:47 +0000 Commit: Dirkjan Ochtman <djc@gentoo.org> CommitDate: 2018-11-19 16:42:01 +0000 dev-lang/rust: check reqs, ewarn about cargo symlink Fixes: https://bugs.gentoo.org/626134 Fixes: https://bugs.gentoo.org/626742 Fixes: https://bugs.gentoo.org/663354 Fixes: https://bugs.gentoo.org/671182 Signed-off-by: Dirkjan Ochtman <djc@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11 dev-lang/rust/rust-1.30.1-r1.ebuild | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)
As of today, emerging rust checks for at least 10752 MiB disk space at "/var/tmp/portage/dev-lang/rust-1.47.0-r2/temp", but it seems that it isn't enough space for dev-lang/rust-1.47.0-r2 whose emerge ends with: Exception in callback PipeLogger._io_loop_done(<Future finis...t on device')>) handle: <Handle PipeLogger._io_loop_done(<Future finis...t on device')>)> Traceback (most recent call last): File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run self._context.run(self._callback, *self._args) File "/usr/lib/python3.8/site-packages/portage/util/_async/PipeLogger.py", line 143, in _io_loop_done future.result() File "/usr/lib/python3.8/site-packages/portage/util/futures/compat_coroutine.py", line 124, in _next future = self._generator.send(previous.result()) File "/usr/lib/python3.8/site-packages/portage/util/_async/PipeLogger.py", line 139, in _io_loop log_file.flush() OSError: [Errno 28] No space left on device and tmpfs 12G 12G 0 100% /var/tmp/portage
(In reply to yves.caniou from comment #13) > As of today, emerging rust checks for at least 10752 MiB disk space at > "/var/tmp/portage/dev-lang/rust-1.47.0-r2/temp", but it seems that it isn't > enough space for dev-lang/rust-1.47.0-r2 whose emerge ends with: > > Exception in callback PipeLogger._io_loop_done(<Future finis...t on > device')>) > handle: <Handle PipeLogger._io_loop_done(<Future finis...t on device')>)> > Traceback (most recent call last): > File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run > self._context.run(self._callback, *self._args) > File "/usr/lib/python3.8/site-packages/portage/util/_async/PipeLogger.py", > line 143, in _io_loop_done > future.result() > File > "/usr/lib/python3.8/site-packages/portage/util/futures/compat_coroutine.py", > line 124, in _next > future = self._generator.send(previous.result()) > File "/usr/lib/python3.8/site-packages/portage/util/_async/PipeLogger.py", > line 139, in _io_loop > log_file.flush() > OSError: [Errno 28] No space left on device > > and > > tmpfs 12G 12G 0 100% /var/tmp/portage I had to increase it to 14gb and that was still just barely enough. Its not as bad on ~amd64 keywords systems because you can set system-bootstrap system-llvm use flags which make it use far less.
(In reply to jeremy mills from comment #14) > I had to increase it to 14gb and that was still just barely enough. Its not > as bad on ~amd64 keywords systems because you can set system-bootstrap > system-llvm use flags which make it use far less. I confirm. I increased to more, but "monitored" the disk usage: tmpfs 19G 13G 6,7G 65% /var/tmp/portage