Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jul 2002 09:50:06 -0700 (PDT)
From:      Alex Zbyslaw <xfb52@dial.pipex.com>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/21659: Berkeley db library is statically compiled into libc,  which make use of newer BDB very difficult, if possible at all
Message-ID:  <200207051650.g65Go6BI053109@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/21659; it has been noted by GNATS.

From: Alex Zbyslaw <xfb52@dial.pipex.com>
To: freebsd-gnats-submit@FreeBSD.org, matrix@ipform.ru
Cc:  
Subject: Re: bin/21659: Berkeley db library is statically compiled into libc, 
 which make use of newer BDB very difficult, if possible at all
Date: Fri, 05 Jul 2002 17:45:14 +0100

 FreeBSD-4.4-RELEASE.
 
 If anything has materially changed since 4.4 then please advise me (I
 found nothing in the release notes).
 
 
 Surely it is possible to both have BDB 1.85 in libc, use 1.85 for
 library function and *still* allow newer versions to be installed an
 used successfully.
 
 Background: libc contains Berekeley DB 1.85 routines and these are used
 by some library functions (e.g. getpwent and friends).  You can install
 a newer version of Berekeley DB (e.g. 2.7.7) as libdb2 and link
 applications against it, but if that application also links against libc
 (pretty likely) *and* uses any libc routine which expects BDB 1.85 then
 you are in trouble.  An obvious example of such an application is Perl. 
 A version of Perl which links against libdb2 cannot do any getpwent (and
 related) system calls because the file format of /etc/pwd.db is
 incompatible with BDB versions other than  1.85 and the library
 functions pick up dbmopen etc. from libdb2.
 
 
 However, there is no need for the *libc* routines which use BDB to use
 the standard function names.  A parallel version of 1.85 with function
 names changed in some standard way (say by prefixing k_, or appending
 _185) could be used by the library functions themselves.  The standard
 dbmopen etc. can stay in libc because they can easily be overridden by
 linking against a newer BDB library.
 
 It's not pretty, but I don't believe it's as impractical as the original
 reply stated.
 
 --Alex
 
 -- 
 Email: xfb52@dial.pipex.com

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




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