From nobody Sat Nov 11 18:05:41 2023 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SSNsT43D7z50cdQ for ; Sat, 11 Nov 2023 18:05:49 +0000 (UTC) (envelope-from john_freebsd-ports@radioprosciutto.org) Received: from twaddle.saltant.net (twaddle.saltant.net [71.126.65.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4SSNsT2QQMz4Zjf for ; Sat, 11 Nov 2023 18:05:49 +0000 (UTC) (envelope-from john_freebsd-ports@radioprosciutto.org) Authentication-Results: mx1.freebsd.org; none Received: from [IPV6:2602:fed2:7126:6000:34ac:8171:a60d:310e] (unknown [IPv6:2602:fed2:7126:6000:34ac:8171:a60d:310e]) (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) (No client certificate requested) by twaddle.saltant.net (Postfix) with ESMTPSA id EE4D573C0; Sat, 11 Nov 2023 13:05:41 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=radioprosciutto.org; s=twaddle2021; t=1699725942; bh=ufH3Ri5PNoD7NaVJcFOBLC+wHeSMzr0yGsrAoUkGQfw=; h=Date:Subject:To:References:Reply-To:From:In-Reply-To; b=iyxKVixB3o/ZqPt7BNR3aR0B4WXw4sZuf8K7U4yr9HH9ruZjs9cSpDNdgT4LPFQIU ld/VGzOvVPbaye9jwMwG+v7Z82XATb1iqoPjEtBIEX3P5wl9W7nlK+zgaYsoHAtPfa K6E2eEeSgoQQ6bTewgn2WlfCCG5h5fZXyRkEejyCHYsun0V5bu2+GYpDW4Qbo4qAbe xuvzRZxCU4rQEATyHgTucDJfj/0rVSyPJBRPifA8ohOX1uhk//4+ZaZAeEdBWXoBoc lnhEGYS/XGmw9syMohSx9MUHVfdCtKJkrePCEh4KqKR1J/tFlQv7Ak/ygrDx7zbWWV 0Fng5AQenbqIg== Message-ID: <3f9b8e65-9dbb-40ea-9037-4621de90a727@radioprosciutto.org> Date: Sat, 11 Nov 2023 13:05:41 -0500 List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pkg check -B tcpdump: libcap_dns.so.2 not found To: Tatsuki Makino , FreeBSD Ports References: <1271b099-2709-4c18-ad3d-d0475ed4c05f@radioprosciutto.org> Content-Language: en-US Reply-To: "John W. O'Brien" From: "John W. O'Brien" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:701, ipnet:71.126.64.0/18, country:US] X-Rspamd-Queue-Id: 4SSNsT2QQMz4Zjf On 11/11/23 00:51, Tatsuki Makino wrote: > John W. O'Brien wrote on 2023/11/11 11:25: >> On 11/10/23 16:26, Tatsuki Makino wrote: [...] > I can understand it because it is related to ldconfig up to /usr/local/lib/compat/pkg, but then it jumps to /lib/casper. > This is due to the following. > > https://cgit.freebsd.org/src/tree/libexec/rtld-elf/paths.h?h=stable/12#n59 > > This allows tcpdump to load libcap_dns.so.2. > However, pkg does not seem to treat that directory as a base library directory. > > It is presumed that the main branch will not have this problem because it has already been moved from /lib/casper to /lib. "pkg check -B" reads /var/run/ld-elf.so.hints, which is maintained by ldconfig. By default, that does not include /lib/casper. % sudo pkg check -B tcpdump Checking tcpdump: 0% (tcpdump-4.99.4_1) /usr/local/sbin/tcpdump - required shared library libcap_dns.so.2 not found Checking tcpdump: 100% % echo /lib/casper | sudo tee /usr/local/libdata/ldconfig/casper > /dev/null % sudo service ldconfig restart ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/lib/compat/pkg /lib/casper /usr/local/lib/compat/pkg /usr/local/lib/perl5/5.36/mach/CORE /usr/local/llvm15/lib 32-bit compatibility ldconfig path: /usr/lib32 % sudo pkg check -B tcpdump Checking tcpdump: 100% As you pointed out before, rtld does not rely on elf-hints to find casper shlibs due to /lib/casper's being hard-coded among the standard library paths. To me, it looks like the bug is in rc.d/ldconfig, where _LCD should match what rtld thinks of as the standard library paths. stable/12 https://cgit.freebsd.org/src/tree/libexec/rtld-elf/paths.h?h=stable/12&id=6a0891c6ebb78bd59a3fc440675e31b6982de896#n59 https://cgit.freebsd.org/src/tree/libexec/rc/rc.d/ldconfig?h=stable/12&id=6a0891c6ebb78bd59a3fc440675e31b6982de896#n26 stable/13 https://cgit.freebsd.org/src/tree/libexec/rtld-elf/rtld_paths.h?h=stable/13&id=a6d08183731b28d1e9c898a0bc8708136776b250#n70 https://cgit.freebsd.org/src/tree/libexec/rc/rc.d/ldconfig?h=stable/13&id=a6d08183731b28d1e9c898a0bc8708136776b250#n25 main does not appear to be affected, as you noted, nor does stable/14. I will see about submitting a patch. >> Would freebsd-pkg@ be a better forum for this discussion? > > I do not subscribe, so please take this :) Neither do I. Maybe next time. :) All: Thanks for your patience with what turned out to be off-topic for ports.