NetBSD Problem Report #57122

From triaxx@netbsd.org  Mon Dec 19 21:42:46 2022
Return-Path: <triaxx@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))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 8AC461A921F
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 19 Dec 2022 21:42:46 +0000 (UTC)
Message-Id: <20221219214245.183831A9239@mollari.NetBSD.org>
Date: Mon, 19 Dec 2022 21:42:45 +0000 (UTC)
From: triaxx@netbsd.org
Reply-To: triaxx@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: check-shlibs is dependent on order of needed libraries
X-Send-Pr-Version: 3.95

>Number:         57122
>Category:       pkg
>Synopsis:       check-shlibs is dependent on order of needed libraries
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 19 21:45:00 +0000 2022
>Originator:     Frédéric Fauberteau
>Release:        Darwin 22.1.0
>Organization:

>Environment:
System: Darwin arbiter.local 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct  9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103 arm64
Architecture: arm
Machine: arm64
Pkgsrc release: current
>Description:
When trying to locally install an update of avidemux on Darwin:
=> Checking for missing run-time search paths in avidemux-plugins-2.8.1
ERROR: lib/ADM_plugins6/audioDecoder/libADM_ad_alaw.dylib: missing library: /Users/triaxx/pkg/lib/libADM_ad_alaw.dylib

Looking at the used libraries:
% otool -L work/.destdir/Users/triaxx/pkg/lib/ADM_plugins6/audioDecoder/libADM_ad_alaw.dylib 
work/.destdir/Users/triaxx/pkg/lib/ADM_plugins6/audioDecoder/libADM_ad_alaw.dylib:
        /Users/triaxx/pkg/lib/libADM_ad_alaw.dylib (compatibility version 0.0.0, current version 0.0.0)
        /Users/triaxx/pkg/lib/libADM_core6.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
        /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.32.0)

/Users/triaxx/pkg/lib/libADM_core6.dylib exists but /Users/triaxx/pkg/lib/libADM_ad_alaw.dylib no.

Looking at another library for which no error has been reported:
work/.destdir/Users/triaxx/pkg/lib/ADM_plugins6/audioDecoder/libADM_ad_ulaw.dylib:
        /Users/triaxx/pkg/lib/libADM_ad_ulaw.dylib (compatibility version 0.0.0, current version 0.0.0)
        /Users/triaxx/pkg/lib/libADM_core6.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
        /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.32.0)

/Users/triaxx/pkg/lib/libADM_ad_ulaw.dylib does not exist.

Inspecting mk/check/check-shlibs-macho.awk to understand why a library misses and why another does not:
DEBUG: lib/ADM_plugins6/audioDecoder/libADM_ad_alaw.dylib needs: /Users/triaxx/pkg/lib/libADM_ad_alaw.dylib
lib/ADM_plugins6/audioDecoder/libADM_ad_alaw.dylib: missing library: /Users/triaxx/pkg/lib/libADM_ad_alaw.dylib
DEBUG: lib/ADM_plugins6/audioDecoder/libADM_ad_alaw.dylib needs: /Users/triaxx/pkg/lib/libADM_core6.dylib
DEBUG: lib/ADM_plugins6/audioDecoder/libADM_ad_ulaw.dylib needs: /Users/triaxx/pkg/lib/libADM_core6.dylib
DEBUG: lib/ADM_plugins6/audioDecoder/libADM_ad_ulaw.dylib needs: /Users/triaxx/pkg/lib/libADM_ad_ulaw.dylib

The lines starting with "DEBUG" are debugging prints add in order to highlight that:
For libADM_ad_alaw.dylib, lib/libADM_ad_alaw.dylib is not found and the error message is printed. Then lib/libADM_core6.dylib is found, but it does not matter.
For libADM_ad_ulaw.dylib, lib/libADM_core6.dylib is found and the value of found equals to 1 in mk/check/check-shlibs-macho.awk:113. Then, it seems that the value of found does not change and the error message is not printed.
>How-To-Repeat:
>Fix:

NetBSD Home
NetBSD PR Database Search

(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-2022 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.