Re: No libldap_r in OpenLDAP 2.5 - use LDAP_API_FEATURE_X_OPENLDAP_REENTRANT from ldap_features.h

From: Дилян Палаузов <dilyan(dot)palauzov(at)aegee(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: No libldap_r in OpenLDAP 2.5 - use LDAP_API_FEATURE_X_OPENLDAP_REENTRANT from ldap_features.h
Date: 2021-08-25 07:07:40
Message-ID: 3894d2a91d141b0fe454da01b3b7faad6fa9d07a.camel@aegee.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello Tom,

on my system I have installed first OpenLDAP 2.4, and then in addition
OpenLDAP 2.5. The problem is, that postgresql (daemon) links with
libldap-2.5, and libpq links with libldap_r-2.4 . So any executable
(e.g. php) which links with both libldap and libpq, loads at the end at
the same time libldap-2.5 andl libldap_r-2.4 - two different versions.
This is not good.

When libldap( 2.5) is reentrant, and when libldap_r-2.4 is present,
libldap_r-2.4 shall not be used for linking.

Greetings
Дилян

On Wed, 2021-08-25 at 02:29 -0400, Tom Lane wrote:
> Dilyan Palauzov <Dilyan(dot)Palauzov(at)aegee(dot)org> writes:
> > The current postgres/configure.ac logic is: if libldap_r is
> > availabe, 
> > then use it, otherwise use libldap.
>
> Right.
>
> > I propose, instead of looking for the presence of libldap_r, to
> > check 
> > the feature macro, and if libldap is reentrant, not to use
> > libldap_r .
>
> Why?  This seems more fragile (i.e., it adds an assumption that the
> visible header file matches the available libraries), and if there is
> a concrete benefit, you did not say what that is.
>
>                         regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message tanghy.fnst@fujitsu.com 2021-08-25 08:22:57 RE: Bug in error reporting for multi-line JSON
Previous Message Rainer Tammer 2021-08-25 07:04:41 Re: Postgres 9.2.13 on AIX 7.1