lang/rust huge disc requirement during build

Recently I've got out of space on my /usr/src partition due to building (upgrading) of lang/rust. It occurred that Rust required more than 12 GiB on disc to be built! The next disc-hungry port for me is www/chromium, which required about 10 GiB. When installed and cleaned I get almost all the disc back. Why they are so huge during build? Should someone be warned before such builds?
 
Recently I've got out of space on my /usr/src partition due to building (upgrading) of lang/rust.
These two have nothing to do with each other, /usr/src/ contains the FreeBSD source tree and nothing else. Not even intermediate build files from building the OS itself.
Should someone be warned before such builds?
These are huge builds, what were you expecting? You'll need a fairly beefy system too, or else it's going to take ages to complete.
 
These two have nothing to do with each other, /usr/src/ contains the FreeBSD source tree and nothing else. Not even intermediate build files from building the OS itself.

These are huge builds, what were you expecting? You'll need a fairly beefy system too, or else it's going to take ages to complete.
Yes, of course, not /usr/src/, but the one where /usr/ports live, my mistake.

I am already used to www/chromium being the huge one and with big download size (about 1GiB), but lang/rust grows tremendously lately for building space (while keeping download size reasonably small). Previous build of lang/rust got less than 10GiB of disc for me definitely. Another long build devel/llvm surely needs much less space.

Yes, it takes a while of time, but the pain is when you left it building and eventually find the system stale with out of space state, having previoulsy built it nicely.

May be it is some bug to build needless amount of files (if the resulting package is fit enough)?

Surely, it is my problem that I have old partitioning schema and some expectations. “Just asking.” ☺ Thank you for the reply.
 
I am already used to www/chromium being the huge one and with big download size (about 1GiB), but lang/rust grows tremendously lately for building space (while keeping download size reasonably small). Previous build of lang/rust got less than 10GiB of disc for me definitely. Another long build devel/llvm surely needs much less space.
You should see the amount of storage space my build server uses.

Normally, when you build ports, everything gets extracted and worked on in a work subdirectory of that port. Not cleaning those out when you're done will use up a lot of storage space. You can set WRKDIRPREFIX to a scratch filesystem to keep your /usr/ports nice and clean.

Code:
     WRKDIRPREFIX      Where to create any temporary files.  Useful if
                       PORTSDIR is read-only (perhaps mounted from a CD-ROM).
See ports(7).
 
Hi.

Just to note - today it required 21 GB, even quite huge growth in less then one year.
I was also quite surprised when rust started to be built as some new dependency leaf.
Where it can lead in the future? Is it normal to grow 10 GBs each year ?

Code:
[root@www /data/ports_work/usr/ports/lang/rust]# du -d 1
21457880        ./work
21457884        .
 
Rust is a massive build. And there are a lot of ports that have been (re)written in Rust nowadays. Several versions of LLVM and/or GCC will also have a big impact on the storage requirements of your builds.
 
Thank you SirDice for info. I have LLVM and GCC, but Rust just totally overcame my expectations. :) Please how big is your partition for builds now? To get some inspiration. Thank you.
 
Please how big is your partition for builds now?
Hard to tell. I do all my builds on a system that has 16GB of memory and have set poudriere to use tmpfs(5) for the work directories. It has been building pretty much constantly (every time a build run finishes I just start a new one), don't have any problems with storage usage.

Code:
# Use tmpfs(5)
# This can be a space-separated list of options:
# wrkdir    - Use tmpfs(5) for port building WRKDIRPREFIX
# data      - Use tmpfs(5) for poudriere cache/temp build data
# localbase - Use tmpfs(5) for LOCALBASE (installing ports for packaging/testing)
# all       - Run the entire build in memory, including builder jails.
# yes       - Enables tmpfs(5) for wrkdir and data
# no        - Disable use of tmpfs(5)
# EXAMPLE: USE_TMPFS="wrkdir data"
USE_TMPFS=yes

/usr/local/poudriere/data has about 24 GB of packages. But it contains 5 repositories at the moment.
 
Hi.

Just to note - today it required 21 GB, even quite huge growth in less then one year.
I was also quite surprised when rust started to be built as some new dependency leaf.
Where it can lead in the future? Is it normal to grow 10 GBs each year ?

Code:
[root@www /data/ports_work/usr/ports/lang/rust]# du -d 1
21457880        ./work
21457884        .
Yes, it's enormous. It has (almost) all huge dependencies in itself. Previously I had similar problems with www/chromium, but lang/rust outbursts it. Rather discouraging behaviour.
 
Hi

tried to update some of my old servers using portmaster and hit the problem - the phpMyAdmin depends on php-gd which depends on gd -> libimagequant -> rust

I had tried several times and each time update failed to build the Rust...

and now I'm here - trying to accept the fact that some 10th dependency requires 20+GB just to be built...

this is old server and it has just 32GB SSD total and only ~7GB are free... so no chances.

the question - if I'll jump from portmaster to pkg - will it solve this issue?

or rust is just a huge something that anyway needs 10x more space than all other ports and the whole system altogether?
 
Do you need libimagequant? If not build gd with the LIQ option off.

See here:

 
Back
Top