Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIrmW-0003ke-67 for pgsql-bugs@arkaria.postgresql.org; Wed, 25 Aug 2021 12:13:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mIrmV-0005Nl-4W for pgsql-bugs@arkaria.postgresql.org; Wed, 25 Aug 2021 12:13:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIn0o-0001jb-78 for pgsql-bugs@lists.postgresql.org; Wed, 25 Aug 2021 07:07:50 +0000 Received: from mail.aegee.org ([144.76.142.78]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIn0i-0000F6-27 for pgsql-bugs@lists.postgresql.org; Wed, 25 Aug 2021 07:07:49 +0000 Authentication-Results: mail.aegee.org/17P77emB1550720; auth=pass (LOGIN) smtp.auth=didopalauzov@aegee.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aegee.org; s=k4096; t=1629875261; i=dkim+MSA-tls@aegee.org; bh=+wvE9aMab3GzliDiC0ZImd2/PMS8HBXpE4gTZVv8Iv8=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=lq1JMmPOD3XSCC4B4uteIKr0IYaVQBGhGRldLmXBQKA16fooCAhbR46RNMst/hA8g lObZzU4fzqODWEDmT/BbSjWT5q3N9EPDGEGh2ktEksX4xjzY100BG8e14udRytkRPu KIwYcztOMZI85jSDjL1OHS1IXC7iJ+msJgk5rE++VxbmeNBweE2I/Cd+rgPQ05ZfgY fKDJy5lpccKaA3VGzT3CcuBuxk9d1n1yhxpUcK6ErdxbnujtbdSkjj6wf2S9M92A/H qLrIDUnu7iwVNkknhyhqfaAokJB17yZg2N70SBEdgu6LL3VdlTtmEY0TKaBYcC/xeb L2iMYvxVBf3LJvOpYD7iSXkCopXKgkO1AaeMQdtm3JHwJcSWlSh7wgcvk+iLwWkGT5 DctDuHxRHGFKBW15JVs1mQlw/EkmG4mW9+Wa00qCimgzz8C4h54wYxPXDMLWbnmrqr oUpKQqH3oX0lirWCzMY6Xr/ik3gwWuczfhgeEBQV455/NkNxIzEuKPCDG2yEXWYe8k xHvKzNwz0YTZXLKdOMSLIOoi2s1HpOKWWkBz2NVpa/HqKWcUrI86DSb1hAnp6D1Li2 63eTkksgb4KPYbDkuRI1alFzd2NMZ6dIO5Kkw+GnYqLjURWhwc6djAXOfV6nZKGimt ha41Io/E03NvkMfdXzJd/xos= Authentication-Results: mail.aegee.org/17P77emB1550720; dkim=none Received: from [192.168.0.199] (87.118.146.153.topnet.bg [87.118.146.153] (may be forged)) (authenticated bits=0) by mail.aegee.org (8.15.2/8.15.2) with ESMTPSA id 17P77emB1550720 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 25 Aug 2021 07:07:41 GMT Message-ID: <3894d2a91d141b0fe454da01b3b7faad6fa9d07a.camel@aegee.org> Subject: Re: No libldap_r in OpenLDAP 2.5 - use LDAP_API_FEATURE_X_OPENLDAP_REENTRANT from ldap_features.h From: =?UTF-8?Q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD_?= =?UTF-8?Q?=D0=9F=D0=B0=D0=BB=D0=B0=D1=83=D0=B7=D0=BE=D0=B2?= To: Tom Lane Cc: pgsql-bugs@lists.postgresql.org Date: Wed, 25 Aug 2021 10:07:40 +0300 In-Reply-To: <520273.1629872978@sss.pgh.pa.us> References: <20210825052142.Horde.fX47Irhz5YmXoRVbIbyYUJm@webmail.aegee.org> <520273.1629872978@sss.pgh.pa.us> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.41.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 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