Date: Sun, 31 Dec 2006 22:29:42 -0600 From: Dan Nelson <dnelson@allantgroup.com> To: Rob Hurle <rob@coombs.anu.edu.au> Cc: freebsd-questions@freebsd.org Subject: Re: Information about loader and ldconfig Message-ID: <20070101042941.GB46561@dan.emsphone.com> In-Reply-To: <20070101112333.Y1184@freebsd.connect-a.com.au> References: <20070101112333.Y1184@freebsd.connect-a.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070101042941.GB46561>