can't build rust -- out of swap space

Yuri Pankov ypankov at
Tue Mar 3 08:49:39 UTC 2020

With recent pkg fallout, I'm trying to build rust myself first time ever 
(as far as I can remember), and it's failing running out of swap on the 
following step:

Building stage0 std artifacts (x86_64-unknown-freebsd -> 
"build" "-Zconfig-profile" "--target" "x86_64-unknown-freebsd" 
"-Zbinary-dep-depinfo" "-j" "1" "-v" "--release" "--frozen" "--features" 
"panic-unwind backtrace compiler-builtins-c" "--manifest-path" 
"--message-format" "json-render-diagnostics"
Build completed unsuccessfully in 0:00:55

Here I pressed ^C as the build actually continues despite several 
rustdoc, python, and other processes being killed.

swap_pager: out of swap space
swp_pager_getswapspace(20): failed
swap_pager: out of swap space
swp_pager_getswapspace(11): failed

The system has 32G of RAM and 2GB swap partition (as advised by zfs-auto 
installation option), top shows about 28G of memory free at that moment, 
so I'm wondering why the swap is being used, and if 2G should be enough 
to build rust.

Tried building both as root and user, DISABLE_MAKE_JOBS has no effect.

Any hints?

More information about the freebsd-current mailing list