NetBSD Problem Report #59205
From www@netbsd.org Sat Mar 22 13:09:20 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id B27E01A923D
for <gnats-bugs@gnats.NetBSD.org>; Sat, 22 Mar 2025 13:09:20 +0000 (UTC)
Message-Id: <20250322130919.5E44E1A923E@mollari.NetBSD.org>
Date: Sat, 22 Mar 2025 13:09:19 +0000 (UTC)
From: rwhitlock22@gmail.com
Reply-To: rwhitlock22@gmail.com
To: gnats-bugs@NetBSD.org
Subject: graphics/librsvg is missing dependencies
X-Send-Pr-Version: www-1.0
>Number: 59205
>Category: pkg
>Synopsis: graphics/librsvg is missing dependencies
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: analyzed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Mar 22 13:10:00 +0000 2025
>Closed-Date:
>Last-Modified: Sat Mar 22 14:19:23 +0000 2025
>Originator: Robert Whitlock
>Release: pkgsrc current, March 20, 2025
>Organization:
>Environment:
Netbsd current, amd64, March 7, 2025
>Description:
librsvg fails to build if the right packages are not already installed. Here it's missing pkgtools/digest, but I believe there are others as well.
sh: /usr/pkg/bin/digest: not found
sh: /usr/pkg/bin/digest: not found
checksum: Checksum BLAKE2s mismatch for adler-1.0.2.crate
ERROR: Make sure the Makefile and checksum file (/usr/pkgsrc/graphics/librsvg/distinfo)
ERROR: are up to date. If you want to override this check, type
ERROR: "/usr/bin/make NO_CHECKSUM=yes [other args]".
*** Error code 1
Stop.
make: stopped making "install" in /usr/pkgsrc/graphics/librsvg
>How-To-Repeat:
start from a clean pkgsrc setup - PACKAGES, WRKOBJDIR, /usr/pkg, etc
cd graphics/librsvg
make install-depends
delete_unneeded_packages
make install
where delete_unneeded_packages is the following shell function:
delete_unneeded_packages() {
while true; do
local found_one
found_one=no
while read ipn; do
[ x"`pkg_info -Q automatic $ipn`" = x"yes" ] || continue
[ -z "`pkg_info -qR $ipn`" ] || continue
pkg_delete "$ipn"
done <<EOF
`pkg_info -e '*'`
EOF
if [ $found_one = no ]; then
break
fi
done
}
>Fix:
add the pkgtools/digest dependency, try to recompile, add other missing dependencies
>Release-Note:
>Audit-Trail:
From: Thomas Klausner <wiz@gatalith.at>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc:
Subject: Re: pkg/59205: graphics/librsvg is missing dependencies
Date: Sat, 22 Mar 2025 14:18:52 +0100
Something's wrong in your environment.
digest is pulled in via tools/digest.mk, and is usually not a
dependency of any package.
Thomas
State-Changed-From-To: open->closed
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Sat, 22 Mar 2025 13:35:11 +0000
State-Changed-Why:
Not a bug -- you've deleted packages that aren't _run-time_
dependencies using pkg_info; however, there are other _build-time_
dependencies which pkgsrc expects, but pkg_info doesn't know about.
You can list these with `make build-depends-list'.
State-Changed-From-To: closed->open
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Sat, 22 Mar 2025 13:58:44 +0000
State-Changed-Why:
OK, I see, there may be a bug after all. `make install-depends' is
supposed to clear any state about having finished the depends phase (by
doing `make depends-clean'), so the next time around, pkgsrc should
re-check the dependencies. But for some reason, in graphics/librsvg,
`digest' doesn't wind up in BOOTSTRAP_DEPENDS. (In other packages,
like net/socat, it does.)
From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc:
Subject: Re: pkg/59205: graphics/librsvg is missing dependencies
Date: Sat, 22 Mar 2025 15:07:16 +0100
I overlooked you're actively deleting packages, sorry.
Thomas
State-Changed-From-To: open->analyzed
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Sat, 22 Mar 2025 14:19:23 +0000
State-Changed-Why:
Here's what's happening:
1. graphics/librsvg pulls in lang/rust/cargo.mk.
2. lang/rust/cargo.mk adds USE_TOOLS+=digest.
3. The `Set the type of dependency' logic in mk/tools/replace.mk sets
_TOOLS_DEPMETHOD.digest=TOOL_DEPENDS _but not_ BOOTSTRAP_DEPENDS.
4. The fetch phase pulls in BOOTSTRAP_DEPENDS _but not_ TOOL_DEPENDS.
5. Now digest is not installed but the fetch phase needs it.
Other packages, like net/socat, don't have USE_TOOLS+=digest, so
_TOOLS_DEPMETHOD.digest=BOOTSTRAP_DEPENDS and the fetch phase works out
fine.
I think maybe the _TOOLS_DEPMETHOD.${...} assignments in
mk/tools/replace.mk should be with ?= rather than =, or be done in the
opposite order, so that dependencies are put in the _earliest_ stage
where they are needed, rather than the _latest_.
Except that doesn't work for USE_TOOLS+=...:run which needs to go in
DEPENDS which affects the _run-time_ package not the _build-time_
environment -- which, really, I think is a design mistake that we
should fix by just eliminating USE_TOOLS+=...:run altogether; it's
incompatible with cross-compilation. But for now, maybe the _other_
_TOOLS_DEPMETHOD.${...} assignments should be done with ?=.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.