Re: BUG #17083: [PATCH] PostgreSQL fails to build with OpenLDAP 2.5.x - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17083: [PATCH] PostgreSQL fails to build with OpenLDAP 2.5.x
Date
Msg-id 1860066.1625677051@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #17083: [PATCH] PostgreSQL fails to build with OpenLDAP 2.5.x  (Adrian Ho <ml+postgresql@03s.net>)
Responses Re: BUG #17083: [PATCH] PostgreSQL fails to build with OpenLDAP 2.5.x  (Daniel Gustafsson <daniel@yesql.se>)
List pgsql-bugs
Adrian Ho <ml+postgresql@03s.net> writes:
> Thanks, Tom, that turned out to only require one additional line, since 
> $LIBS is already being saved and restored around that block:

I poked at this a bit further and realized that it's got a showstopper
problem: in OpenLDAP 2.4, ldap_simple_bind() exists in both libldap.so
and libldap_r.so.  Thus, if we were dealing with an installation that
does not have a thread-safe libldap, the patched configure would
incorrectly seize on libldap.so as being an acceptable substitute,
allowing weird hard-to-diagnose failures at runtime.

IOW, while it might look from our existing coding like there's something
about ldap_simple_bind() that is tied to reentrancy, there isn't.  How
else can we determine whether an OpenLDAP library is reentrant, if we
can no longer depend on the _r suffix?

Maybe we can decide that in 2021 such situations no longer exist in
the wild, but I'm unsure.

            regards, tom lane



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #17091: Cannot install with EDB installer when username contains diacritics
Next
From: Moti
Date:
Subject: problem in app installation