Re: circular dependencies in ports tree - how to fix?

From: Stefan Esser <se_at_FreeBSD.org>
Date: Thu, 14 May 2026 21:18:16 UTC
Am 14.05.26 um 15:04 schrieb void:
> Hi,
> 
> On a 15.1 poudriere jail with latest ports tree, the following happens:
> 
> [00:05:30] Sanity checking build queue
> [00:05:30] Error: /usr/local/share/poudriere/ 
> bulk.sh:pkgqueue_sanity_check:27:Dependency loop detected:
> These packages depend on each other: run:libheif-1.21.2_3 run:ffmpeg-8.1.1,1 
> run:libcaca-0.99.b20_1 build:libcaca-0.99.b20_1 run:imlib2-1.12.6,2 
> build:imlib2-1.12.6,2
> These packages depend on each other: run:ffmpeg-8.1.1,1 run:libcaca-0.99.b20_1 
> build:libcaca-0.99.b20_1 run:imlib2-1.12.6,2 run:libheif-1.21.2_3 
> build:libheif-1.21.2_3
> These packages depend on each other: run:libcaca-0.99.b20_1 
> build:libcaca-0.99.b20_1 run:imlib2-1.12.6,2 run:libheif-1.21.2_3 
> run:ffmpeg-8.1.1,1
> These packages depend on each other: run:libcaca-0.99.b20_1 
> build:libcaca-0.99.b20_1 run:imlib2-1.12.6,2 run:libheif-1.21.2_3 
> run:ffmpeg-8.1.1,1 build:ffmpeg-8.1.1,1
> [151amd64-default] [2026-05-12_19h03m56s] [crashed] Time: 00:05:19
> 
> How to fix, please? If not fixable in the short term, would this best be raised
> as a PR in ports infrastructure, or against each port?
> 
> For the time being, I'm going to try commenting out each affected port in
> the build list.

If I understand the issue correctly, the cause is that poudriere treats all 
dependencies in the same way, it wants to put RUN_DEPENDS into the buld jail
before building the port.

I'd expect that graphics/libcaca could be built, if the RUN_DEPENDS would not
be depended on at this time.

The difference between BUILD_DEPENDS vs. LIB_DEPENDS and RUN_DEPENDS appears
to be that BUILD_DEPENDS are not recorded as dependencies in the package
manifest.

The ports system used to require building and installing of run dependencies
before installing a port on the system. That was necessary since traditionally
(before the pkg database existed) installation of the port had to be the final
step due to the way "make" resolves dependencies.

IMHO, poudriere should not put RUN_DEPENDS into the build jail at an early
stage (it did, last I checked, a few years ago).