From owner-freebsd-questions@FreeBSD.ORG Mon Jan 7 16:47:53 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 44CD9D07 for ; Mon, 7 Jan 2013 16:47:53 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by mx1.freebsd.org (Postfix) with ESMTP id 04D076FD for ; Mon, 7 Jan 2013 16:47:52 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TsFrl-0000Rq-Mc for freebsd-questions@freebsd.org; Mon, 07 Jan 2013 17:48:01 +0100 Received: from cpc3-walt15-2-0-cust148.13-2.cable.virginmedia.com ([86.21.186.149]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Jan 2013 17:48:01 +0100 Received: from walterhurry by cpc3-walt15-2-0-cust148.13-2.cable.virginmedia.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Jan 2013 17:48:01 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Walter Hurry Subject: Re: Unreferenced Libraries? Date: Mon, 7 Jan 2013 16:47:08 +0000 (UTC) Lines: 45 Message-ID: References: <50EAEA85.7020704@infracaninophile.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: cpc3-walt15-2-0-cust148.13-2.cable.virginmedia.com User-Agent: Pan/0.135 (Tomorrow I'll Wake Up and Scald Myself with Tea; GIT 30dc37b master) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2013 16:47:53 -0000 On Mon, 07 Jan 2013 15:32:21 +0000, Matthew Seaman wrote: > On 07/01/2013 14:27, Walter Hurry wrote: >> 9.1-RELEASE on amd64. >> >> libchk reports the following libraries (among others) as unreferenced: >> >> /usr/lib/libBlocksRuntime.so.0 /usr/lib/libform.so.5 >> /usr/lib/libformw.so.5 /usr/lib/libgpib.so.3 >> /usr/lib/libgssapi_ntlm.so.10 /usr/lib/libgssapi_spnego.so.10 >> /usr/lib/libhistory.so.8 /usr/lib/liblwres.so.80 /usr/lib/libmenu.so.5 >> /usr/lib/libmenuw.so.5 /usr/lib/libmilter.so.5 /usr/lib/libpanelw.so.5 >> /usr/lib/librpcsec_gss.so.1 /usr/lib/libstdbuf.so.1 >> /usr/lib/libsupc++.so.1 /usr/lib/libthread_db.so.3 >> >> All these are part of base. >> >> I note that in each case there is a .so symlink pointing to the >> relevant library, as is, I believe, accepted best practice. > > Yes, that's right. > >> Would I be correct in assuming that the reason libchk is reporting >> these as unreferenced is that everything which is actually using them >> is referencing the symlink? > > Actually, it is probably reporting them because nothing is actually > using them. libmilter.so.5 for instance won't have any consumers in the > base system (not even /usr/libexec/sendmail/sendmail) but it is provided > in case you want to install any mail filters from ports or otherwise. Oh, I see. They're OK then, and should simply be left well alone. >> Or is libchk clever enough to resolve symlinks, and there is a >> different reason? > > The shlib sym-link without the ABI version number is generally only used > at compile-time. Once the application has been linked, the dynamic > loader will require the shared library with appended ABI version. There > are instances of things that look at first sight like a shared library, > but that don't have an ABI version no. In general, these are not in > fact shared libraries, but loadable modules used by various specific > programs. Ah, right. Thanks.