[Date Prev][Date Next]
Re: (ITS#3809) db library detection procedure
At 11:57 PM 6/29/2005, email@example.com wrote:
>> At 03:55 PM 6/29/2005, Pierangelo Masarati wrote:
>>>>This environment is not proper. A 4.3.28 version of db.h
>>>>should have been provided (first) to go along with 4.3.27
>>>>version of -ldb-4.3.
>>>I think the point Walter is trying to make is that since version 4.3.27
>>> must exist in the default location of that system for other reasons, and
>>> he's trying to have the OpenLDAP suite pick the specific version 4.2.52
>>> from /opt/foo/*, as indicated by the -L and -I flags; but then the
>>> configure looks for special versions of the db library to link, going
>>> from newer to older,
>> Because it generally proper to use the latest release of a library.
>>>so it first detects the 4.3 in /usr/lib (which has to be in the search
>>> path for other reasons) instead of the 4.2 in (opt/foo/lib it was
>>> instructed to use by the -I and -L flags.
>> configure was never instructed to use the 4.2 library.
>Not true. configure *have* been instructed to use proper headers and
>libraries using CPPFLAGS and LDFLAGS environment variables
But this is not an instruction to use a particular version of
the library. configure has no idea whether 4.2 or 4.3 was
>and, in fact,
>it detects the correct headers in the location specified by the CPPFLAGS
>-I include path.
Correct only to what you desire. But someone else could have
provided the exact same flags and had desired to configure to use
4.3. In that case, the incorrect headers would have been chosen.
>On the other hand, it searches for a specific list of
>possible library names and, this way, it finds the wrong library (in this
>case the system one that does not match the headers).
For someone desiring 4.3, it would have been correct.
As configure doesn't know which version the user wants, it errors.
This, I think is quite appropriate. It shouldn't be guessing.
>>>As soon as one version is detected as usable in terms of headers, the
>>> configure could try to locate the corresponding library instead of trying
>>> a given fixed order and fail because of the mismatch. If the headers of
>>> version 4.2 have been detected, the search for the library could start
>>> from db-4.2 instead of db-4.3.
I would be more inclined to support specification of the
desired version on the command line, like --with-berkeley-db-lib=db-4.2,
then to pull the parts of <db.h> and use that for the library
(subject to compatibility test).
>> But how does configure know that the user wanted to use db-4.2 over
>> db-4.3? Maybe the user really wanted to use db-4.3 but goofed
>> the include path. In this case, the error is quite appropriate.
>> I note that if the user wants a particular version of the library
>> to be ignored, it should tell configure to ignore it.
>> env ol_cv_db_db_4_dot_2=no ./configure ...
>This seems to me a good piece of info that could go into the FAQ, and
>since they are interactive (I'm foreseeing what you are going to say ;)
>I'll add it to them.
>> It seems pointless to me to try to guess at what the user wanted.
>>> SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497
> SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497