Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 Dec 2002 17:07:10 -0800
From:      Tim Kientzle <kientzle@acm.org>
To:        Reinier Kleipool <Reinier@kleipool.org>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: question about shared libraries and the library cache.
Message-ID:  <3DEEA6BE.50007@acm.org>
References:  <004001c29bd9$be04cf70$5201a8c0@ovs.kleipool.org>

next in thread | previous in thread | raw e-mail | index | archive | help
According to the source code for ldconfig
(/usr/src/sbin/ldconfig/ldconfig.c),
ldconfig requires that the library file
have a name that:

* begins with 'lib'
* contains '.so.'  (note the trailing period)

This is in the dodir() function, around line
270.  It does not seem to require a number after the
final dot, though, based on a cursory reading of the
source.

So, 'pam_XXX.so' isn't in the hints file
because it's not a 'libXXX', and the
others don't have a trailing version number.

Tim Kientzle


Reinier Kleipool wrote:

> Hello Gents,
> 
>   ldconfig -r does find other libraries in /usr/local/lib:
> root@mail:~# ldconfig -r | grep local
>         search directories: /usr/lib:/usr/local/lib
>         67:-lltdl.1 => /usr/local/lib/libltdl.so.1
>         68:-ldb3.3 => /usr/local/lib/libdb3.so.3
>         69:-ldb3_cxx.3 => /usr/local/lib/libdb3_cxx.so.3
>         70:-llber.2 => /usr/local/lib/liblber.so.2
>         71:-lldap.2 => /usr/local/lib/libldap.so.2
>         72:-lldap_r.2 => /usr/local/lib/libldap_r.so.2
>         73:-lsasl2.2 => /usr/local/lib/libsasl2.so.2
>         74:-ljpeg.9 => /usr/local/lib/libjpeg.so.9
>         75:-lpng.5 => /usr/local/lib/libpng.so.5
> root@mail:~#
> 
> but it does not put some files in the hints cache: (Files listed above
> deleted by hand from the listing below)
> 
> root@mail:~# ls -l /usr/local/lib/*.so* | grep -v "^l"
> -rwxr-xr-x  1 root  wheel  699643 Dec  1 11:12 /usr/local/lib/libdb-4.1.so*
> -rwxr-xr-x  1 root  wheel  699643 Nov 29 11:32 /usr/local/lib/libdb4_1.so*
> -rwxr-xr-x  1 root  wheel  800336 Dec  1 11:13
> /usr/local/lib/libdb_cxx-4.1.so*
> -r-xr-xr-x  1 root  wheel   32216 Nov 23 16:53 /usr/local/lib/pam_ldap.so*
> -r--r--r--  1 root  wheel   10581 Nov 23 16:50
> /usr/local/lib/pam_smb_auth.so
> root@mail:~#
> 
> My question is now: "Why those files not???"
> In my opinion it has something to do with the "format" of those files. It
> has nothing to do with reboots or upgrades. (it is a clean install of
> FreeBSD 4.7) Also "ldconfig /usr/lib /usr/local/lib" should create a clean
> new hintsfile with all libraries in those directories.
> Any ideas about the way you generate good files and bad libraries???
> 
> Kind regards,
> Reinier
> 
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-hackers" in the body of the message
> 
> 
> 




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DEEA6BE.50007>