From owner-freebsd-questions@FreeBSD.ORG Fri Oct 28 16:49:47 2011 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62C09106564A for ; Fri, 28 Oct 2011 16:49:47 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id F36F28FC0A for ; Fri, 28 Oct 2011 16:49:46 +0000 (UTC) Received: by wwi18 with SMTP id 18so5898739wwi.31 for ; Fri, 28 Oct 2011 09:49:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:reply-to:date:message-id:subject:from:to:content-type; bh=TuobMNvPbNF8s0S4TJR29+UNmHFbat8a70FJ9xtKhZQ=; b=bzrA0sbxJLB44uoxqDaKysARNE4JLVU4bPS4vgJ7XRx7hSXkiYOIBS1fuiIbBqdgqY ozfjGjRm5B5n+OfpS64hsmoMZoEvKE0YqCBhS3zz7ZSfpZH1viLWYk4e3sVj11p/b8Tk VYtYkQDJkp5R6HIjVRMgkRZ1nTMrpPRNhdLbk= MIME-Version: 1.0 Received: by 10.227.198.213 with SMTP id ep21mr4820029wbb.18.1319820585266; Fri, 28 Oct 2011 09:49:45 -0700 (PDT) Received: by 10.180.98.5 with HTTP; Fri, 28 Oct 2011 09:49:45 -0700 (PDT) Date: Fri, 28 Oct 2011 12:49:45 -0400 Message-ID: From: "b. f." To: Patrick Lamaiziere , freebsd-questions@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: Re: (8.2) share lib and ldconfig problem. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bf1783@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2011 16:49:47 -0000 > Hello, > > 8.2 STABLE/i386 > > I'm hit by something strange. > > Basically ldconfig does not take care of some libs > in /usr/local/lib/compat/pkg > > By sample I've updated icu (via portupgrade) and libreoffice does not > start anymore. > > $ libreoffice > /libexec/ld-elf.so.1: Shared object "libicuuc.so.46" not found, > required by "libsvtfi.so" > > Portgrade did a copy of the lib into /usr/local/lib/compat/pkg and run > ldconfig. But the lib does not appear in the listing of the ldconfig > cache : You mean portupgrade, probably? > > # cd /usr/local/lib/compat/pkg/ > # ls -m *icu* > libicudata.so.46*, libicudata.so.46.1*, libicui18n.so.46.1*, > libicuio.so.46.1*, libicule.so.46.1*, libiculx.so.46.1*, > libicutest.so.46.1*, libicutu.so.46.1*, libicuuc.so.46.1* > > # ldconfig -r | grep pkg | grep icu > 664:-licudata.46 => /usr/local/lib/compat/pkg/libicudata.so.46 > > Note that there is only one icu lib in the ldconfig's cache. The one > named libicudata.so.46 (which is a copy of libicudata.so.46.1). > > Questions are : > > - Why theses libs are not in the ldconfig cache ? > - Why a copy named libicudata.so.46 is in the cache and not > libicudata.so.46.1? Unlike the hints for the old aout format, there aren't any filename hashes in the elf hints file, just a header and a list of search directories. The 'ldconfig -r' output is faked, and displays (see list_elf_hints() in src/sbin/ldconfig/elfhints.c) what it thinks rtld(1) will look for: shared libraries in the search directories with filenames of the form lib*.so., followed by a string of numbers corresponding to the major version of the shared library. *.so.46.1 don't fit this pattern, because of the extra dots separating the major and minor version numbers in those filenames. Since your broken binary seems to need *.so.46, you can try adding symlinks between the corresponding *.so.46 and *.so.46.1, or you can rebuild the dependent port. b.