From owner-freebsd-stable@FreeBSD.ORG Thu Nov 29 22:06:03 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 434B2F12; Thu, 29 Nov 2012 22:06:03 +0000 (UTC) (envelope-from bc979@lafn.org) Received: from zoom.lafn.org (zoom.lafn.org [108.92.93.123]) by mx1.freebsd.org (Postfix) with ESMTP id 09F898FC13; Thu, 29 Nov 2012 22:06:02 +0000 (UTC) Received: from [10.0.1.4] (pool-98-112-217-228.lsanca.fios.verizon.net [98.112.217.228]) (authenticated bits=0) by zoom.lafn.org (8.14.3/8.14.2) with ESMTP id qATM5uLf091085; Thu, 29 Nov 2012 14:05:56 -0800 (PST) (envelope-from bc979@lafn.org) Subject: Re: Library Problem Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=windows-1252 From: Doug Hardie In-Reply-To: <1354225452.69940.330.camel@revolution.hippie.lan> Date: Thu, 29 Nov 2012 14:05:55 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4AA267EA-8FC8-42E8-A885-F22F4DC524D0@lafn.org> <997CEAC4-4F57-4C33-BDCE-EE21AD607DC0@fisglobal.com> <20121129140103.GA27849@in-addr.com> <1D1FA129-89FD-49EA-ADB4-8F0177E092DC@lafn.org> <1354225452.69940.330.camel@revolution.hippie.lan> To: Ian Lepore X-Mailer: Apple Mail (2.1283) X-Virus-Scanned: clamav-milter 0.97 at zoom.lafn.org X-Virus-Status: Clean Cc: Devin Teske , FreeBSD-STABLE Mailing List , Devin Teske X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2012 22:06:03 -0000 On 29 November 2012, at 13:44, Ian Lepore wrote: > On Thu, 2012-11-29 at 13:33 -0800, Doug Hardie wrote: >> On 29 November 2012, at 06:01, Gary Palmer wrote: >>=20 >>> On Wed, Nov 28, 2012 at 10:46:51PM -0800, Doug Hardie wrote: >>>>=20 >>>> On 28 November 2012, at 20:01, Devin Teske wrote: >>>>=20 >>>>>=20 >>>>> On Nov 28, 2012, at 7:36 PM, Doug Hardie wrote: >>>>>=20 >>>>>> I have installed 4 systems from the same FreeBSD 9.1-RC3 disk. = Three of them worked just fine. The last one is causing a problem. It = will not look in /usr/local/lib/ for shared libraries. I did the = standard install, moved in some source, compiled it and tried to run it. = The library is there. On the working systems ktrace shows: >>>>>>=20 >>>>>> 2259 intro CALL access(0x28066000,0) >>>>>> 2259 intro NAMI "/lib/libsermons.so" >>>>>> 2259 intro RET access -1 errno 2 No such file or directory >>>>>> 2259 intro CALL access(0x28066000,0) >>>>>> 2259 intro NAMI "/usr/lib/libsermons.so" >>>>>> 2259 intro RET access -1 errno 2 No such file or directory >>>>>> 2259 intro CALL access(0x28066000,0) >>>>>> 2259 intro NAMI "/usr/lib/compat/libsermons.so" >>>>>> 2259 intro RET access -1 errno 2 No such file or directory >>>>>> 2259 intro CALL access(0x28066000,0) >>>>>> 2259 intro NAMI "/usr/local/lib/libsermons.so" >>>>>> 2259 intro RET access 0 >>>>>>=20 >>>>>>=20 >>>>>> On the failing system ktrace shows: >>>>>>=20 >>>>>> 6746 intro NAMI "/lib/libsermons.so" >>>>>> 6746 intro RET access -1 errno 2 No such file or directory >>>>>> 6746 intro CALL access(0x28066000,0) >>>>>> 6746 intro NAMI "/usr/lib/libsermons.so" >>>>>> 6746 intro RET access -1 errno 2 No such file or directory >>>>>> 6746 intro CALL access(0x28066000,0) >>>>>> 6746 intro NAMI "/usr/lib/compat/libsermons.so" >>>>>> 6746 intro RET access -1 errno 2 No such file or directory >>>>>> 6746 intro CALL access(0x28066000,0) >>>>>> 6746 intro NAMI "/lib/libsermons.so" >>>>>> 6746 intro RET access -1 errno 2 No such file or directory >>>>>> 6746 intro CALL access(0x28066000,0) >>>>>> 6746 intro NAMI "/usr/lib/libsermons.so" >>>>>> 6746 intro RET access -1 errno 2 No such file or directory >>>>>> 6746 intro CALL write(0x2,0x28060080,0x3c) >>>>>> 6746 intro GIO fd 2 wrote 60 bytes >>>>>> "Shared object "libsermons.so" not found, required by "intro"" >>>>>>=20 >>>>>>=20 >>>>>> It never attempts to check /usr/local/lib. I can't find any = configuration item that affects that. How can this be fixed? >>>>>>=20 >>>>>=20 >>>>> What's the value of "ldconfig_paths" in rc.conf(5)? >>>>>=20 >>>>> That includes: >>>>> /etc/rc.conf >>>>> /etc/rc.conf.local (if it exists) >>>>> /etc/defaults/rc.conf >>>>>=20 >>>>> Here on my 9.0-R system it has the following in = /etc/defaults/rc.conf: >>>>> /usr/lib/compat /usr/local/lib /usr/local/lib/compat/pkg >>>>=20 >>>>=20 >>>> /etc/defaults/rc.conf has: >>>>=20 >>>> ldconfig_paths=3D"/usr/lib/compat /usr/local/lib = /usr/local/lib/compat/pkg" >>>>=20 >>>>=20 >>>> /etc/rc.conf has nothing for ldconfig_paths. >>>=20 >>> Check that /usr/local/lib doesn't have group or other write perms. >>> ldconfig ignores directories that are group/world writable. >>>=20 >>> To fix: >>>=20 >>> chmod go-w /usr/local/lib >>> sh /etc/rc.d/ldconfig start >>=20 >> sermons# ll -d /usr/local/lib >> drwxr-xr-x 4 root wheel 512 Nov 28 19:07 /usr/local/lib >>=20 >>=20 >> I think I found the cause of the problem. A reboot corrected the = issue. Apparently when ldconfig was run /usr/local/lib didn't exist. = Apparently it doesn't check for that except for in ldconfig. I was not = aware of ldconfig before. That explains why the reboot worked. Thanks = to all who provided information. >=20 > Oh. Hmm, in that case, "service ldconfig restart" probably would have > fixed it. (Seems sorta strange to "restart" a "service" that just > builds a table and exits.) I am sure it would have. I suspect there are more "unexpected" services = like that. There are too many services to remember, let alone = understand. A Google search turned up nothing usable for me. If I = could have hit on ldconfig, then the man page would have been perfectly = clear=85=20