Poudriere won't use prebuilt pkgs, compilation fails

Hello everyone

I'm dipping my toes into FreeBSD and started porting some of the software I like and couldn't find.
I wrote a port for chhoto-url, a super simple url shortener written in rust (see my code here; I haven't submitted it). After a week of trial-and-error and reading docs it finally worked — I pushed it to VCS and went to bed. Days later I tried to port iocaine (it's a garbage generator to poision AI bots scraping your websites), because it's also written in rust. Now neither of them build.

I tried building other rust-based ports (www/lychee, textproc/csvlens) and they build flawlessly (poudriere gets pkgs and only compiles the actual port, nothing else). I'm running on a fresh VPS with 8Gb ram, 160Gb disk and 4 vCPUs (this is not the same machine that successfully built chhoto-url last week, although the configuration is the same).

Focusing on chhoto-url for now, because that one worked before (when it worked, deps were being fetched from pkg instead of compiling from source like now):
  • poudriere bulk -j 14amd64 -f myportslist queues 3 packages for building (ftp/curl, lang/rust and the actual port), instead of just the port (neither of the above mentioned ports had to build rust).
  • compiling ftp/curl fails (stacktrace attached below), thus the build fails. The failure was different yesterday, but after a few tries I've decided to snapshot the error today and post here
Code:
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: cc -DHAVE_CONFIG_H -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_STATICLIB -DUNITTESTS -isystem /usr/include -isystem /usr/include -isystem /usr/local/include -isystem /usr/local/include -isystem /usr/local/include -isystem /usr/include -isystem /usr/local/include -isystem /usr/local/include -isystem /usr/local/include -isystem /usr/local/include -isystem /usr/include -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Qunused-arguments -Werror-implicit-function-declaration -pthread -MT libcurlu_la-doh.lo -MD -MP -MF .deps/libcurlu_la-doh.Tpo -c doh.c -fPIC -DPIC -o .libs/libcurlu_la-doh.o
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'doh.c'.
4.      Running pass 'Greedy Register Allocator' on function '@doh_rdata'
 #0 0x00000000050ca831 (/usr/bin/cc+0x50ca831)
 #1 0x00000000050c88d5 (/usr/bin/cc+0x50c88d5)
 #2 0x000000000508fdc5 (/usr/bin/cc+0x508fdc5)
 #3 0x000000082aa89410 (/lib/libthr.so.3+0x1a410)
 #4 0x000000082aa889cb (/lib/libthr.so.3+0x199cb)
 #5 0x0000000826e1a2d3 ([vdso]+0x2d3)
 #6 0x00000000047efc0f (/usr/bin/cc+0x47efc0f)
 #7 0x00000000047f51db (/usr/bin/cc+0x47f51db)
 #8 0x00000000047f7f7a (/usr/bin/cc+0x47f7f7a)
 #9 0x00000000047e1882 (/usr/bin/cc+0x47e1882)
#10 0x0000000004acfa59 (/usr/bin/cc+0x4acfa59)
#11 0x0000000004acfc1a (/usr/bin/cc+0x4acfc1a)
#12 0x0000000004aed0c6 (/usr/bin/cc+0x4aed0c6)
#13 0x0000000004af44d8 (/usr/bin/cc+0x4af44d8)
#14 0x0000000004af4aed (/usr/bin/cc+0x4af4aed)
#15 0x0000000004ad4cbc (/usr/bin/cc+0x4ad4cbc)
#16 0x0000000004af7d3d (/usr/bin/cc+0x4af7d3d)
#17 0x000000000486da36 (/usr/bin/cc+0x486da36)
#18 0x0000000004cea51b (/usr/bin/cc+0x4cea51b)
#19 0x0000000004cf0254 (/usr/bin/cc+0x4cf0254)
#20 0x0000000004ceac5b (/usr/bin/cc+0x4ceac5b)
#21 0x0000000002b818cd (/usr/bin/cc+0x2b818cd)
#22 0x0000000002b9580c (/usr/bin/cc+0x2b9580c)
#23 0x00000000034594a6 (/usr/bin/cc+0x34594a6)
#24 0x0000000002e35346 (/usr/bin/cc+0x2e35346)
#25 0x0000000002d74924 (/usr/bin/cc+0x2d74924)
#26 0x0000000002eec763 (/usr/bin/cc+0x2eec763)
#27 0x000000000225474e (/usr/bin/cc+0x225474e)
#28 0x000000000226306f (/usr/bin/cc+0x226306f)
#29 0x0000000002c0ae1e (/usr/bin/cc+0x2c0ae1e)
#30 0x000000000508fbd3 (/usr/bin/cc+0x508fbd3)
#31 0x0000000002c0a60d (/usr/bin/cc+0x2c0a60d)
#32 0x0000000002bd0b12 (/usr/bin/cc+0x2bd0b12)
#33 0x0000000002bd0d7c (/usr/bin/cc+0x2bd0d7c)
#34 0x0000000002bebf30 (/usr/bin/cc+0x2bebf30)
#35 0x0000000002262730 (/usr/bin/cc+0x2262730)
#36 0x000000000225f8ad (/usr/bin/cc+0x225f8ad)
#37 0x000000082df54c3a __libc_start1 (/lib/libc.so.7+0x85c3a)
cc: error: clang frontend command failed with exit code 139 (use -v to see invocation)
FreeBSD clang version 18.1.6 (https://github.com/llvm/llvm-project.git llvmorg-18.1.6-0-g1118c2e05e67)
Target: x86_64-unknown-freebsd14.2
Thread model: posix
InstalledDir: /usr/bin
cc: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
cc: note: diagnostic msg: /tmp/doh-fbbf83.c
cc: note: diagnostic msg: /tmp/doh-fbbf83.sh
cc: note: diagnostic msg:

********************
*** Error code 1

Stop.
make[2]: stopped in /wrkdirs/usr/ports/ftp/curl/work/curl-8.13.0/lib
*** Error code 1

Stop.
make[1]: stopped in /wrkdirs/usr/ports/ftp/curl/work/curl-8.13.0/lib
*** Error code 1

Stop.
make: stopped in /wrkdirs/usr/ports/ftp/curl/work/curl-8.13.0
*** Error code 1

Stop.
make: stopped in /usr/ports/ftp/curl
I'm using poudriere with a 14.2 jail and the latest repo for pkgs.

My poudriere.conf
Code:
NO_ZFS=yes
FREEBSD_HOST=https://download.FreeBSD.org
RESOLV_CONF=/etc/resolv.conf
BASEFS=/usr/local/poudriere
USE_PORTLINT=yes
USE_TMPFS=yes
DISTFILES_CACHE=/usr/ports/distfiles
PACKAGE_FETCH_BRANCH=latest
PACKAGE_FETCH_URL=pkg+http://pkg.FreeBSD.org/\${ABI}

I can imagine that compiling fails because I'm getting the latest code which might be buggy. What I don't understand is why does poudriere think it needs to compile this stuff in the first place, but not for the other rust ports. My desired workflow at this point would be:
  1. Poudriere downloads pre-built packages for the dependencies from the latest repo
  2. Compiles only the actual port
Any guidance would be greatly appreciated.
 
Poudriere downloads pre-built packages for the dependencies from the latest repo
The poudriere-bulk(8) command needs a -b branch option, there's a bunch of caveats though.
Code:
     -b branch
              Fetch binary packages from a binary package repository instead
              of building them.  The branch argument can be one of the
              following: latest, quarterly, release_X (where X is the minor
              version of a release, e.g., “0”), or url.

              With this option poudriere will first try to fetch a binary
              package from the specified binary package repository.

              poudriere will only use packages that:
              •   come from a repository having the same or older version of
                  pkg.
              •   do not have a locally fetched package already.
              •   are not IGNORED.
              •   match the expected local version.
              •   match the expected ABI.
              •   match the expected runtime and library dependencies.
              •   match the expected OPTIONS when CHECK_CHANGED_OPTIONS is
                  enabled (default: on).
              •   is NOT listed in PACKAGE_FETCH_BLACKLIST.
              •   is NOT listed with -C, or -c, when -t is used.
              The -v flag can be used to show these decisions during build.
              Specifing twice will show more details on why some are skipped.

              WARNING: poudriere has no way of determining differences outside
              of the above list.  That is, if the local ports framework, or
              port, has custom patches or special WITH_FOO knobs (not OPTIONS)
              then it is required to add its name into
              PACKAGE_FETCH_BLACKLIST.  Otherwise a package may be fetched and
              used that lacks the custom patch or knob.

              See PACKAGE_FETCH_BRANCH, PACKAGE_FETCH_URL,
              PACKAGE_FETCH_BLACKLIST, and PACKAGE_FETCH_WHITELIST in
              poudriere.conf.sample.  The entries in the lists will be matched
              against package names without versions.

And keep in mind that the 'latest' ports tree will always be newer than the 'latest' packages. After a port is updated in the ports tree the package for it won't be immediately available. It takes time to build those packages. There's a CI/CD pipeline but this won't trigger an instant (re)build of the package repositories.
The failure was different yesterday, but after a few tries I've decided to snapshot the error today and post here
Build logs for every build can be found in /usr/local/poudriere/data/logs/bulk/.

If you get "random" build failures, you might want to run a check on your memory. Building ports with poudriere uses a lot of memory, and it has the uncanny ability to find memory issues that previously went unnoticed.
 
poudriere bulk -j 14amd64 -f myportslist queues 3 packages for building (ftp/curl, lang/rust and the actual port), instead of just the port (neither of the above mentioned ports had to build rust).
Did you update the ports tree in the mean time? Consecutive builds typically use the packages it built from the previous run, unless that port (or one of its dependencies) had an update.

When the build starts you're going to see messages like these:
Code:
[00:00:06] Deleting bastille-0.13.20250126.pkg: new version: 0.14.20250420
[00:00:06] Deleting cmake-core-3.31.6.pkg: new version: 3.31.7
[00:00:06] Deleting curl-8.13.0.pkg: new version: 8.13.0_2
[00:00:06] Deleting freebsd-release-manifests-20250403.pkg: new version: 20250502
[00:00:06] Deleting gcc13-13.3.0_2.pkg: new version: 13.3.0_3
[00:00:06] Deleting nginx-1.26.3_3,3.pkg: new version: 1.28.0,3
[00:00:07] Deleting py311-typing-extensions-4.13.1.pkg: new version: 4.13.2
[00:00:07] Deleting py311-wheel044-0.44.0.pkg: new version: 0.44.0_1
[00:00:07] Deleting vim-9.1.1265.pkg: new version: 9.1.1362
[00:00:07] Deleting xxd-9.1.1265.pkg: new version: 9.1.1362
[00:00:07] Deleting git-tiny-2.49.0.pkg: missing dependency: curl-8.13.0
[00:00:07] Deleting poudriere-devel-3.4.99.20250209.pkg: missing dependency: freebsd-release-manifests-20250403
[00:00:07] Deleting py311-setuptools-scm-8.0.4_1.pkg: missing dependency: py311-typing-extensions-4.13.1
[00:00:07] Deleting zabbix7-agent-7.0.11.pkg: missing dependency: curl-8.13.0
[00:00:07] Deleting stale symlinks... done
[00:00:07] Deleting empty directories... done
 
Thanks SirDice, I thought as much: poudriere will always try the latest version available in the ports. What I don't understand is why that is happening here, because the latest rust port is 1.86 and the latest binary pkg in the latest repo is also 1.86 — if I pkg install rust directly, I will get 1.86.

In any case, building rust failed yesterday after a long time with a segmentation fault. Today I tried again and the error is different. If I run poudriere bulk after each failure without changing anything else, the errors are always different e.g., different "could not compile xxx" errors. Memory is plenty and never crosses 50% used.


Code:
error: could not compile `cpufeatures` (lib)

Caused by:
  process didn't exit successfully: `CARGO=/wrkdirs/usr/ports/lang/rust/work/bootstrap/bin/cargo CARGO_CRATE_NAME=cpufeatures CARGO_MANIFEST_DIR=/wrkdirs/usr/ports/lang/rust/work/rustc-1.86.0-src/vendor/cpufeatures-0.2.15 CARGO_MANIFEST_PATH=/wrkdirs/usr/ports/lang/rust/work/rustc-1.86.0-src/vendor/cpufeatures-0.2.15/Cargo.toml CARGO_PKG_AUTHORS='RustCrypto Developers' CARGO_PKG_DESCRIPTION='Lightweight runtime CPU feature detection for aarch64, loongarch64, and x86/x86_64 targets,
  with no_std support and support for mobile targets including Android and iOS
  ' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=cpufeatures CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/RustCrypto/utils' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.2.15 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=2 CARGO_PKG_VERSION_PATCH=15 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/wrkdirs/usr/ports/lang/rust/work/_build/bootstrap/debug/deps:' /wrkdirs/usr/ports/lang/rust/work/bootstrap/bin/rustc --crate-name cpufeatures --edition=2018 /wrkdirs/usr/ports/lang/rust/work/rustc-1.86.0-src/vendor/cpufeatures-0.2.15/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values())' -C metadata=0d75420fbf7338b3 -C extra-filename=-45ed198543710701 --out-dir /wrkdirs/usr/ports/lang/rust/work/_build/bootstrap/debug/deps -C strip=debuginfo -L dependency=/wrkdirs/usr/ports/lang/rust/work/_build/bootstrap/debug/deps --cap-lints warn -Zallow-features= -C linker=cc -Wrust_2018_idioms -Wunused_lifetimes` (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
warning: `regex-automata` (lib) generated 45 warnings
warning: `serde_derive` (lib) generated 126 warnings
Traceback (most recent call last):
  File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.86.0-src/x.py", line 53, in <module>
    bootstrap.main()
  File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.86.0-src/src/bootstrap/bootstrap.py", line 1339, in main
    bootstrap(args)
  File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.86.0-src/src/bootstrap/bootstrap.py", line 1306, in bootstrap
    build.build_bootstrap()
  File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.86.0-src/src/bootstrap/bootstrap.py", line 1010, in build_bootstrap
    run(args, env=env, verbose=self.verbose, cwd=self.rust_root)
  File "/wrkdirs/usr/ports/lang/rust/work/rustc-1.86.0-src/src/bootstrap/bootstrap.py", line 236, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /wrkdirs/usr/ports/lang/rust/work/bootstrap/bin/cargo build --manifest-path /wrkdirs/usr/ports/lang/rust/work/rustc-1.86.0-src/src/bootstrap/Cargo.toml -Zroot-dir=/wrkdirs/usr/ports/lang/rust/work/rustc-1.86.0-src --verbose --verbose --frozen
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/rust
=>> Cleaning up wrkdir
===>  Cleaning for rust-1.86.0
build of lang/rust | rust-1.86.0 ended at Tue May  6 06:55:21 UTC 2025
build time: 00:05:29
!!! build failure encountered !!!

I'm at a loss for why this is so inconsistent, but thank you for your comments so far.
 
Let's have a look at your /usr/local/etc/poudriere.conf.
Please post output from grep -ve '^$|^#' /usr/local/etc/poudriere.conf
 
Let's have a look at your /usr/local/etc/poudriere.conf.
Please post output from grep -ve '^$|^#' /usr/local/etc/poudriere.conf
POSIX.1 It's on my opening message. In any case, here it is again with the comments still on
Code:
# Poudriere can optionally use ZFS for its ports/jail storage. For
# ZFS define ZPOOL, otherwise set NO_ZFS=yes
#
#### ZFS
# The pool where poudriere will create all the filesystems it needs
# poudriere will use ${ZPOOL}/${ZROOTFS} as its root
#
# You need at least 7GB of free space in this pool to have a working
# poudriere.
#
#ZPOOL=zroot

### NO ZFS
# To not use ZFS, define NO_ZFS=yes
NO_ZFS=yes

# root of the poudriere zfs filesystem, by default /poudriere
# ZROOTFS=/poudriere

# the host where to download sets for the jails setup
# You can specify here a host or an IP
# replace _PROTO_ by http or ftp
# replace _CHANGE_THIS_ by the hostname of the mirrors where you want to fetch
# by default: ftp://ftp.freebsd.org
#
# Also note that all protocols supported by fetch(1) are supported here, even
# file:///
# Suggested: https://download.FreeBSD.org
FREEBSD_HOST=https://download.freebsd.org

# By default the jails have no /etc/resolv.conf, you will need to set
# RESOLV_CONF to a file on your hosts system that will be copied to
# /etc/resolv.conf for the jail, except if you don't need it (using an http
# proxy for example)
RESOLV_CONF=/etc/resolv.conf

# The directory where poudriere will store jails and ports
BASEFS=/usr/local/poudriere

# The directory where the jail will store the packages and logs
# by default a zfs filesystem will be created and set to
# ${BASEFS}/data
#
# POUDRIERE_DATA=${BASEFS}/data

# Use portlint to check ports sanity
USE_PORTLINT=yes

# 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=no

# How much memory to limit tmpfs size to for *each builder* in GiB
# (default: none)
#TMPFS_LIMIT=8

# List of package globs that are not allowed to use tmpfs for their WRKDIR
# Note that you *must* set TMPFS_BLACKLIST_TMPDIR
# EXAMPLE: TMPFS_BLACKLIST="rust"

# The host path where tmpfs-blacklisted packages can be built in.
# A temporary directory will be generated here and be null-mounted as the
# WRKDIR for any packages listed in TMPFS_BLACKLIST.
# EXAMPLE: TMPFS_BLACKLIST_TMPDIR=${BASEFS}/data/cache/tmp

# How much memory to limit jail processes to for *each builder*
# in GiB (default: none)
# This can also be set per PKGBASE, such as MAX_MEMORY_rust=20.
# Package names with hyphens (-) should be replaced with underscores (_).
#MAX_MEMORY=8

# How many file descriptors to limit each jail process to (default: 8192)
# This can also be set per PKGBASE, such as MAX_FILES_RStudio=2048.
# Package names with hyphens (-) should be replaced with underscores (_).
#MAX_FILES=8192

# If set the given directory will be used for the distfiles
# This allows to share the distfiles between jails and ports tree
# If this is "no", poudriere must be supplied a ports tree that already has
# the required distfiles.
DISTFILES_CACHE=/usr/ports/distfiles

# If set the source tree marked to use git will use the defined
# mirror (default: git.FreeBSD.org/src.git)
#
# Example to use github mirror:
#GIT_BASEURL=github.com/freebsd/freebsd-src.git

# If set the ports tree marked to use git will use the defined
# mirror (default: git.FreeBSD.org/ports.git)
#
# Example to use github mirror:
#GIT_PORTSURL=github.com/freebsd/freebsd-ports.git

# If set the ports tree or source tree marked to use svn will use the defined
# mirror (default: svn.FreeBSD.org)
# The SSL fingerprints are published here:
# https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/svn.html#svn-mirrors
#SVN_HOST=svn.FreeBSD.org

# Automatic OPTION change detection
# When bulk building packages, compare the options from kept packages to
# the current options to be built. If they differ, the existing package
# will be deleted and the port will be rebuilt.
# Valid options: yes, no, verbose
# verbose will display the old and new options
#CHECK_CHANGED_OPTIONS=verbose

# Automatic Dependency change detection
# When bulk building packages, compare the dependencies from kept packages to
# the current dependencies for every port. If they differ, the existing package
# will be deleted and the port will be rebuilt. This helps catch changes such
# as DEFAULT_RUBY_VERSION, PERL_VERSION, WITHOUT_X11 that change dependencies
# for many ports.
# Valid options: yes, no
# Default: yes
#CHECK_CHANGED_DEPS=yes

# Consider bad dependency lines on the wrong PKGNAME as fatal.
# For example:
#    BUILD_DEPENDS=  p5-List-MoreUtils>=0:lang/p5-List-MoreUtils
# If this port's PKGNAME were really "List-MoreUtils" then it would
# not be recorded into the resulting package.  The next build with
# CHECK_CHANGED_DEPS enabled would consider it a "new dependency"
# since it is in the port but not in the package.  This is usually
# a warning but can be made fatal instead by enabling this option.
# Default: no
#BAD_PKGNAME_DEPS_ARE_FATAL=yes

# Path to the RSA key to sign the PKG repo with. See pkg-repo(8)
# This produces a repo that supports SIGNATURE_TYPE=PUBKEY
# Default: not set
#PKG_REPO_SIGNING_KEY=/etc/ssl/keys/repo.key

# Command to sign the PKG repo with. See pkg-repo(8)
# This produces a repo that supports SIGNATURE_TYPE=FINGERPRINTS
# Default: not set
#SIGNING_COMMAND=ssh signing-server sign.sh

# Repo signing command execution context
# If SIGNING_COMMAND is set, run pkg-repo(8) on the host?
#   no  -   Run in the jail
#   yes -   Run on the host
# Default: no
#PKG_REPO_FROM_HOST=yes

# ccache support. Supply the path to your ccache cache directory.
# It will be mounted into the jail and be shared among all jails.
# It is recommended that extra ccache configuration be done with
# ccache -o rather than from the environment.
#CCACHE_DIR=/var/cache/ccache

# Static ccache support from host.  This uses the existing
# ccache from the host in the build jail.  This is useful for
# using ccache+memcached which cannot easily be bootstrapped
# otherwise.  The path to the PREFIX where ccache was installed
# must be used here, and ccache must have been built statically.
# Note also that ccache+memcached will require network access
# which is normally disabled.  Separately setting RESTRICT_NETWORKING=no
# may be required for non-localhost memcached servers.
#CCACHE_STATIC_PREFIX=/usr/local

# The jails normally only allow network access during the 'make fetch'
# phase.  This is a security restriction to prevent random things
# ran during a build from accessing the network.  Disabling this
# is not advised.  ALLOW_NETWORKING_PACKAGES may be used to allow networking
# for a subset of packages only.
#RESTRICT_NETWORKING=yes
#ALLOW_NETWORKING_PACKAGES="npm-foo"

# Networking can be fully disabled by setting DISALLOW_NETWORKING to "yes"
# this will prevent networking access even in the 'make fetch' phase
# and will block access even for packages listed in ALLOW_NETWORKING_PACKAGES.
# Default: no
#DISALLOW_NETWORKING=yes

# parallel build support.
#
# By default poudriere uses hw.ncpu to determine the number of builders.
# You can override this default by changing PARALLEL_JOBS here, or
# by specifying the -J flag to bulk/testport.
#
# Example to define PARALLEL_JOBS to one single job
# PARALLEL_JOBS=1

# How many jobs should be used for preparing the build? These tend to
# be more IO bound and may be worth tweaking. Default: PARALLEL_JOBS * 1.25
# PREPARE_PARALLEL_JOBS=1


# If set, failed builds will save the WRKDIR to ${POUDRIERE_DATA}/wrkdirs
# SAVE_WRKDIR=yes

# Choose the default format for the workdir packing: could be tar,tgz,tbz,txz,tzst
# default is tbz
# WRKDIR_ARCHIVE_FORMAT=tbz

# Disable Linux support
# NOLINUX=yes

# By default poudriere sets FORCE_PACKAGE
# To disable it (useful when building public packages):
# NO_FORCE_PACKAGE=yes

# By default poudriere sets PACKAGE_BUILDING
# To disable it:
# NO_PACKAGE_BUILDING=yes

# If you are using a proxy define it here:
# export HTTP_PROXY=bla
# export FTP_PROXY=bla
#
# Cleanout the restricted packages
# NO_RESTRICTED=yes

# By default MAKE_JOBS is disabled to allow only one process per cpu
# Use the following to allow it anyway
# ALLOW_MAKE_JOBS=yes

# List of packages that will always be allowed to use MAKE_JOBS
# regardless of ALLOW_MAKE_JOBS. This is useful for allowing ports
# which holdup the rest of the queue to build more quickly.
#ALLOW_MAKE_JOBS_PACKAGES="pkg ccache py*"

# Timestamp every line of build logs
# Default: no
#TIMESTAMP_LOGS=no

# This defines the max time (in seconds) that a command may run for a build
# before it is killed for taking too long. Default: 86400
#MAX_EXECUTION_TIME=86400

# This defines the time (in seconds) before a command is considered to
# be in a runaway state for having no output on stdout. Default: 7200
#NOHANG_TIME=7200

# The repository is updated atomically if set yes. This leaves the
# repository untouched until the build completes. This involves using
# hardlinks and symlinks. The operations are fast, but can be intrusive
# for remote syncing or backups.
# Recommended to always keep on.
# Default: yes
#ATOMIC_PACKAGE_REPOSITORY=yes

# When using ATOMIC_PACKAGE_REPOSITORY, commit the packages if some
# packages fail to build. Ignored ports are considered successful.
# This can be set to 'no' to only commit the packages once no failures
# are encountered.
# Default: yes
#COMMIT_PACKAGES_ON_FAILURE=yes

# Keep older package repositories. This can be used to rollback a system
# or to bisect issues by changing the repository to one of the older
# versions and reinstalling everything with `pkg upgrade -f`
# ATOMIC_PACKAGE_REPOSITORY is required for this.
# Default: no
#KEEP_OLD_PACKAGES=no

# How many old package repositories to keep with KEEP_OLD_PACKAGES
# Default: 5
#KEEP_OLD_PACKAGES_COUNT=5

# Make testing errors fatal.
# If set to 'no', ports with test failure will be marked as failed but still
# packaged to permit testing dependent ports (useful for bulk -t -a)
# Default: yes
#PORTTESTING_FATAL=yes

# Define the building jail hostname to be used when building the packages
# Some port/packages hardcode the hostname of the host during build time
# This is a necessary setup for reproducible builds.
#BUILDER_HOSTNAME=pkg.FreeBSD.org

# Define to get a predictable timestamp on the ports tree
# This is a necessary setup for reproducible builds.
#PRESERVE_TIMESTAMP=yes

# Define to yes to build and stage as a regular user
# Default: yes, unless CCACHE_DIR is set and CCACHE_DIR_NON_ROOT_SAFE is not
# set.  Note that to use ccache with BUILD_AS_NON_ROOT you will need to
# use a non-shared CCACHE_DIR that is only built by PORTBUILD_USER and chowned
# to that user.  Then set CCACHE_DIR_NON_ROOT_SAFE to yes.
#BUILD_AS_NON_ROOT=no

# Define to the username and groupname to build as when BUILD_AS_NON_ROOT is yes.
# Default: nobody (uid PORTBUILD_UID)
#PORTBUILD_USER=nobody
#PORTBUILD_GROUP=nobody

# Define to the uid and gid to use for PORTBUILD_USER if the user does not
# already exist in the jail.
# Default: 65532
#PORTBUILD_UID=65534
#PORTBUILD_GID=65534

# Define pkgname globs to boost priority for
# Default: none
#PRIORITY_BOOST="pypy openoffice*"

# Define format for buildnames
# Default: %Y-%m-%d_%Hh%Mm%Ss
# ISO8601:
#BUILDNAME_FORMAT="%FT%T%z"

# Define format for build duration times
# Default: %H:%M:%S
#DURATION_FORMAT="%H:%M:%S"

# Use colors when in a TTY
# Default: yes
#USE_COLORS=yes

# Only build what is requested. Do not rebuild build deps if nothing requested
# depends on them. This can create an inconsistent repository if you often
# build one-off packages but expect the repository to stay consistent.
# Default: yes
#TRIM_ORPHANED_BUILD_DEPS=yes

# Whether or not bulk/testport should delete unknown files in the repository
# Default: yes
#DELETE_UNKNOWN_FILES=yes

# Whether or not bulk/testport should automatically "pkgclean".
# Values: yes, always, no
# yes: Does the behavior with bulk -a and bulk -f. Use of testport or
#      bulk -t or bulk -C will not delete unqueued packages.
# Default: no
#DELETE_UNQUEUED_PACKAGES=no

# A list of directories to exclude from leftover and filesystem violation
# mtree checks.  Ccache is used here as an example but is already
# excluded by default.  There is no need to add it here unless a
# special configuration is used where it is a problem.
# Default: none
#LOCAL_MTREE_EXCLUDES="/usr/obj /var/tmp/ccache"

# URL where your POUDRIERE_DATA/logs are hosted
# This will be used for giving URL hints to the HTML output when
# scheduling and starting builds
#URL_BASE=http://yourdomain.com/poudriere/

# Set to hosted to use the /data directory instead of inline style HTML
# Default: inline
#HTML_TYPE="hosted"

# Set to track remaining ports in the HTML interface.  This can slow down
# processing of the queue slightly, especially for bulk -a builds.
# Default: no
#HTML_TRACK_REMAINING=yes

# Grep build logs to determine a possible build failure reason.  This is
# only shown on the web interface.
# Default: yes
#DETERMINE_BUILD_FAILURE_REASON=yes

# Set to pass arguments to buildworld.
# Default:
#MAKEWORLDARGS="WITHOUT_LLVM_ASSERTIONS=yes WITH_MALLOC_PRODUCTION=yes -DMALLOC_PRODUCTION"

# Set to always attempt to fetch packages or dependencies before building.
# XXX: This is subject to change
# Default: off; requires -b <branch> for bulk or testport.
PACKAGE_FETCH_BRANCH=latest
# The branch will be appended to the URL:
PACKAGE_FETCH_URL=pkg+http://pkg.FreeBSD.org/\${ABI}
# Packages which should never be fetched.  This is useful for ports that
# you have local patches for as otherwise the patches would be ignored if
# a remote package is used instead.
#PACKAGE_FETCH_BLACKLIST=""
# Alternatively a whitelist can be created to only allow specific packages to
# be fetched.
# Default: everything
PACKAGE_FETCH_WHITELIST="gcc* rust llvm*"
 
I've read the porter's handbook a few more times and looked at more Makefiles from other rust-based apps and I can't see a reason for why only my ports require rust be compiled from source. All ports are using the same underlying port tree, with the same 1.86 version of rust which is also available via pkg. However, only my ports are pulling in rust for compilation, but I don't see anything special in how they are defined. Here's again a link to the chhoto-url port https://tangled.sh/@jcpsantiago.xyz/freebsd-ports/tree/main/www/chhoto-url.

Edit: I tried other ports and www/miniserve and www/dufs also pulled rust for compilation. I'm comparing the Makefile.crates of these and www/lychee to understand why the latter built fine with rust from pkgs.
 
The -v flag can be used to show these decisions during build. Specifing twice will show more details on why some are skipped.
I can't see a reason for why only my ports require rust be compiled from source.
Have you tried to apply the -v flag (once and twice) to gain any insight as to why rust is being build despite being declared in:
PACKAGE_FETCH_WHITELIST="gcc* rust llvm*"?
 
Erichans it looks like it's because there's a new version of curl which is not available yet, and rust depends on curl. It doesn't explain why rust is not built for the other two ports I tried, but at least I understand the chain of events now. The weird failures seem to be due to lack of memory to compile rust, leading to unpredictable errors within the poudriere jails.
Also, my new machine arrived with 64Gb of ram so this is now moot because rust compiles (after 5h or so :D).

I'm now having a different issue with one of my ports, but I'll open a new thread for that. Thanks everyone.
 
Back
Top