Idea: Port Checks for Disk Space Before Compiling?

Mojca Miklavec mojca at
Wed Aug 10 15:15:24 PDT 2016

On 10 August 2016 at 23:58, Jean-François Caron wrote:
> This keeps happening.  My laptop’s hard drive has only a few (~5) gigs of space left, and I foolishly decide this is a good time to upgrade clang.  Turns out clang needs infinite space (kidding) to compile, so about 30 minutes into the compilation my computer tries to warn me that the disk is nearly full but it’s already too late and I can’t scramble to make space before everything starts crawling.
> This might be specific to clang only, but is there a way for ports that need a LOT of free space to check before trying to compile?
> I know the obvious solution is to keep more free space on the disk, which is a good idea generally, but these SSDs get pretty expensive!  It feels extra stupid that all this time I have like 5 Gb of RAM left unused, but that’s a different issue.

The major problem is that there is basically no way to predict how
much space an installation of a port from source might need (one might
be able to do some heuristics based on old build logs from the
buildbot or so, but that might be quite some work for very little gain
and it won't work well for non-default variants etc).

When fetching the binary archives, we could get the information about
the size of the tarball and I'm pretty sure one could do something to
compute and calculate the size of the extracted package. But
estimating the size of the build from source is going to be difficult.


More information about the macports-users mailing list