[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: BDB 4.2 and mucking things up



* Andreas <andreas@conectiva.com.br> [031209 04:12]:
> On Tue, Dec 09, 2003 at 09:37:38AM +0100, Tony Earnshaw wrote:
> > with bdb stuff. If I install BDB 4.2 (/usr/local, say) alongside 4.1.25,
> > does anyone have any experience as to whether it will fsck up the 4.1.25
> > installation? I suspect not, since older RH versions I've used, with BDB
> 
> It could create problems if you compile programs that use BDB. I found out
> the hard way that, even though my BDB installation is also separate, that some
> programs look specifically for, say, -ldb4.1 -ldb4.0 in that order, but
> do not take the same care while looking for the db.h include file and
> include whatever db.h file they find first, no matter from which version it
> is. And it often compiles :)

My solution in such environments has always been to build a dedicated
version of BDB in a non-standard location using the --prefix= configure
flag (say perhaps /usr/local/bdb).  Then I know that I won't ever build
software that accidentally links to the newer version.  And on the flip
side I just have to jump through some small hoops to make sure that
openldap *does* use the newer version by using environment variables
like this:

    CPPFLAGS=-I/usr/local/bdb/include
    LDFLAGS=-L/usr/local/bdb/lib

Works for me.

Ben

-- 
_______________________________________________________________________
Ben Poliakoff                                email: benp@imap.reed.edu
Reed College                                        tel:  503-788-6674
Unix System Administrator                          PGP key: 0x6AF52019
PGP fingerprint:    A131 F813 7A0F C5B7 E74D  C972 9118 A94D 6AF5 2019