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

Re: (ITS#3809) db library detection procedure



Kurt@OpenLDAP.org disse:
> At 03:55 PM 6/29/2005, Pierangelo Masarati wrote:
>>Kurt@OpenLDAP.org 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 and, in fact,
it detects the correct headers in the location specified by the CPPFLAGS
-I include path. 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).

>
>>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.
>
> 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.

L.

>
> It seems pointless to me to try to guess at what the user wanted.
>
> Kurt
>
>
>
>>p.
>>
>>
>>   SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497
>
>
>


    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497