From owner-freebsd-current Sat Mar 31 22:17:16 2001 Delivered-To: freebsd-current@freebsd.org Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by hub.freebsd.org (Postfix) with ESMTP id 1B30E37B71D for ; Sat, 31 Mar 2001 22:17:14 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.11.3/8.11.3) id f316KPm56956 for FreeBSD-current@freebsd.org; Sat, 31 Mar 2001 22:20:25 -0800 (PST) (envelope-from sgk) Date: Sat, 31 Mar 2001 22:20:25 -0800 From: Steve Kargl To: FreeBSD-current@freebsd.org Subject: third party shared library and ldconfig Message-ID: <20010331222025.A56763@troutmask.apl.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I recently installed NAGWare's Fortran 95 compiler, and it installed its shared libraries into /usr/local/lib/NAGWare. To get the compiler to work, I of course needed to use "ldconfig -m". When I rebooted the system, I found that the ldconfig portion of /etc/rc does not recurse into subdirectories of /usr/local/lib (which is probably a Good Thing), so I had to manually run "ldconfig -m" to add /usr/local/lib/NAGWare. There appear to be several options: (1) Upon booting run "ldconfig -m". This could be done either manually by root or perhaps from rc.local. (2) Move the NAGWare shared libraries up one directory into /usr/local/lib. This is simple, but would make updating third party software more difficult because of possible stale libraries. (3) Edit /etc/rc to explicitly include /usr/local/lib/NAGWare This becomes an annoyance when running mergemaster. It also isn't a general solution for other third party software installations. (4) Tell all users on the system to add the directory to a LD_LIBRARY_PATH variable. (5) Add another knob to rc.conf. A possible solution to the third party software problem introduces the extra_ldconfig_paths to /etc/rc.conf and apply this diff to /etc/rc --- rc.orig Sat Mar 31 21:35:03 2001 +++ rc Sat Mar 31 22:14:40 2001 @@ -544,6 +544,11 @@ _LDC="${_LDC} ${i}" fi done + for i in ${extra_ldconfig_paths}; do + if [ -d "${i}" ]; then + _LDC="${_LDC} ${i}" + fi + done echo 'ELF ldconfig path:' ${_LDC} ${ldconfig} -elf ${_LDC} ;; -- Steve To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message