From owner-freebsd-questions@FreeBSD.ORG Mon Jan 1 04:30:11 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9784B16A415 for ; Mon, 1 Jan 2007 04:30:11 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 61C5B13C45A for ; Mon, 1 Jan 2007 04:30:11 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.6/8.13.8) id l014TgQm097560; Sun, 31 Dec 2006 22:29:42 -0600 (CST) (envelope-from dan) Date: Sun, 31 Dec 2006 22:29:42 -0600 From: Dan Nelson To: Rob Hurle Message-ID: <20070101042941.GB46561@dan.emsphone.com> References: <20070101112333.Y1184@freebsd.connect-a.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070101112333.Y1184@freebsd.connect-a.com.au> X-OS: FreeBSD 6.2-PRERELEASE X-message-flag: Outlook Error User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-questions@freebsd.org Subject: Re: Information about loader and ldconfig X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2007 04:30:11 -0000 In the last episode (Jan 01), Rob Hurle said: > In diagnosing problems after a recent install of refdb and > mysql on my Freebsd 6.1 release system, I came across the directory: > > /usr/local/libdata/ldconfig > > which contains files with names like "mysql". Each of these files > contains just one line, which is a path to library modules (e.g. > "/usr/local/lib/mysql") for that program. Other programs (e.g. > mozilla) also have library modules in their own subdirectory in > /usr/local/lib, but do not seem to need any files in the ldconfig > directory. > > My query is "why is this"? Is it to do with shared library modules? > Why not put entries for all of the subdirectories from > /usr/local/lib in the ldconfig directory? The /etc/rc.d/ldconfig ends up reading the contents of the files in that directory to build the /var/run/ld-elf.so.hints file. It's a lot more efficient for the few ports that put their libraries in nonstandard locations to create /usr/local/libdata/ldconfig files rather than have /etc/rc.d/ldconfig have to scan all the subdirectories in /usr/local/lib. My system, for example, has 1500, wiuth the worst offender being perl5. Most of those subdirectories don't need to be listed in ldconfig since they are directly opened via the dlopen() function and an absolute path. > Just seeking information, but others may be interested to note that I > had to put an entry for the "dbd" subdirectory into the ldconfig > directory when installing refdb. Thank you all. Sounds like the databases/libdbi-drivers port needs to add a USE_LDCONFIG= ${PREFIX}/lib/dbd line to its port Makefile. -- Dan Nelson dnelson@allantgroup.com