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

Re: BDB mismatch problem



On Tue, 2 Aug 2005, Buchan Milne wrote:

> >
> > Another complication is that different installed versions create different
> > versions of the db databases and that would require different versions of
> > db_recover among other things.  That is a different can of worms, though.
>
> Yes, most distributions handle this ... and usually any package that may
> require the utils will require the correct version.
>

Do they? One particular RedHat version provided db_recover, db3_recover,
db31_recover, and db32_recover.  How do you know which one to use for
which db database.

>
> But, because the runtime library is the library with the soname, if
> OpenLDAP's configure script can't choose better, it's going to find the
> wrong library in many cases.

Runtime and link time library are the same physical file.  The soname
extracted during linking is used by the runtime loader to find the
runtime library.  That is why linking with -ldb works as long as
libdb.so is a symblic link to the correct version of the runtime
library or a copy thereof.

> >
> > That would be nice: if configure could select the proper library given
> > a db.h and for example select db4.2 when the header is db4.2 even if
> > db4.3 is also installed on the system.
>
> Exactly, now you're seeing the problem.

If it had worked properly there would not be this discussion.

One cause of the problem, though, is that configure during selection
of the link library is making a small test program to extract the major
and minor version and compare these values againts DB_VERSION_MAJOR and
DB_VERSION_MINOR from db.h.  At this point in time it will accept any
runtime library where major is equal to DB_VERSION_MAJOR and minor not
less than DB_VERSION_MINOR.  This should probably be "equal to" only --
all 44 occurences in the configure script.

Much later in the script it will compare minor for equality and complain
if it found a mismatch.  Without this check you would have run into
problems with crashing programs during testing.

>  Avoiding having the
> run-time library for db-4.3 installed on a shared (by many contributors,
> building all kinds of software) build host may not be possible for much
> longer.
>

If configure would ignore the runtime libraries you could have all possible
versions of db runtime installed and configure would never get confused.

Villy