Re: Okay, how much ram does it take to build Rust?
Mark Millard <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.ports |
|---|---|
| Message-ID | <[email protected]> |
Dan Mahoney (Ports) <freebsd_at_gushi.org> wrote on
Date: Thu, 11 Sep 2025 23:35:33 UTC :
> Entirely different problem:
>
> Build now fails within a minute of starting:
>
> https://poudriere-src.isc.org/data/freebsd:16:x86:64-default/2025-09-11_23h25m42s/logs/errors/rust-1.89.0.log
The actual error report in that log file is:
= note: ld: error: undefined symbol: readdir_r
>>> referenced by std.7afbaec6631a8b5b-cgu.01
>>> std-3a0e78699a7df230.std.7afbaec6631a8b5b-cgu.01.rcgu.o:(std::sys::fs::unix::remove_dir_impl::remove_dir_all_recursive::hd9cf968a76fe7acb) in archive /wrkdirs/usr/ports/lang/rust/work/bootstrap/lib/rustlib/x86_64-unknown-freebsd/lib/libstd-3a0e78699a7df230.rlib
>>> did you mean: readdir_r@FBSD_1.5
>>> defined in: /lib/libc.so.7
cc: error: linker command failed with exit code 1 (use -v to see invocation)
Your poudriere jail's world is a version of FreeBSD 16
that had readdir_r removed, breaking builds of rust.
FreeBSD has had that removal reverted. You need to update
the poudriere jail's world content to be of a vintage that
includes:
• git: d20c82507278 - main - Revert "libc: Remove readdir_r(3)" Dag-Erling Smørgrav
> My entire poudriere-conf is:
Is the "-" a typo? The normal name is: poudriere.conf
Are you getting the settings that you intend?
> ZPOOL=zroot
> FREEBSD_HOST=https://download.FreeBSD.org
> RESOLV_CONF=/etc/resolv.conf
> BASEFS=/usr/local/poudriere
> USE_PORTLINT=no
> USE_TMPFS=yes
rust uses huge amounts of temporary file system space,
like 27 GiBytes+ (possibly notably more: I've not
measured in a while). Any USE_TMPFS setting that
implies/includes wrkdir is going to be that way,
for example.
"USE_TMPFS=yes" means that much of the file system
space usage is competing for the system's RAM+SWAP
space instead of for disk space.
Having something like, say, SWAP=3.6*RAM [so
(RAM+SWAP)=4.6*RAM] is a possibility that will
page the part of the time that RAM is insufficient.
Otherwise you probably want more like: USE_TMPFS=data
> DISTFILES_CACHE=/usr/ports/distfiles
> PKG_REPO_SIGNING_KEY=/usr/local/etc/ssl/keys/poudriere.key
> KEEP_OLD_PACKAGES=yes
I've never tested if KEEP_OLD_PACKAGES interacts with
USE_TMPFS=yes (or oterh settings of it) to increase
the competition for RAM+SWAP.
> KEEP_OLD_PACKAGES_COUNT=5
Same here.
> Ideas welcome
===
Mark Millard
marklmi at yahoo.com