On 2024.03.22 16:22, Neil Bothwick wrote:
On Fri, 22 Mar 2024 12:57:34 -0400, Jack wrote:

> In this case, the offending package is dev-lang/rust, but this has
> happened to me previously with other packages that require a lot of
> space and time to build.
>
> The build fails for any reason.  Since it has already progressed over > half way through the build, I would like to continue the build instead
> of starting from scratch.  I fix whatever caused the issue.  In this
> particular case, it failed for out of space, so I added another G to
> the ramdisk mounted at /var/tmp/portageg.  I issue "ebuild
> path/to/package.ebuild compile" but it fails immediately because there > isn't enough free space.  The problem is that it's checking for enough > free space to do the entire build, not just to continue from where it
> left off.

Why not add more to the ramdisk, assuming it is a tmpfs. If it needs more
than your physical memory, it will use swap, but that won't happen
because you only need the extra space.
That's actually what I did. The problem is not how to get enough space, it's how to resume the emerge instead of starting over, once I have added the space.

It was initially set to 14G (out of 32G RAM) and I added 2G. I suppose I can add another 14G, but that would only leave 4G for the system itself. I'm not sure how well that would work, but I suppose it's worth a try. The worst that happens is I reboot and start the emerge from scratch.

I generally avoid this problem by having large packages use a
PORTAGE_TMPDIR on a spinning disk. It may be slightly slower, but that
doesn't really matter on a long compile, not nearly as much as having to
restart it!

>
> I've done some searching, and found one old forum post which suggests
> to just temporarily remove the space check from the ebuild.
>
> In this case, that seems to be line 236 of
> /usr/portage/dev-lang/rust/rust-1.75.0-r1.ebuild, which is
> "CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}" the last
> line withing pre_build_checks().  However, if I comment out that line,
> and run "ebuild path/to/ebuild manifest" another attempt to compile
> still gives the same error about not enough space.

Have you tried setting M to a smaller value immediately before that line?
I tried that first, and when that didn't work, I tried commenting out the line I thought was calling the check. I'll try again, to be sure it was a reasonable value for M.


--
Neil Bothwick

Religious error: (A)tone, (R)epent, (I)mmolate?



Reply via email to