From: | "Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at> |
---|---|
To: | <pgsql-patches(at)postgresql(dot)org>, "Tom Lane *EXTERN*" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Fix linking of OpenLDAP libraries |
Date: | 2006-09-07 15:17:40 |
Message-ID: | 52EF20B2E3209443BC37736D00C3C1380A4019FE@EXADV1.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
>> I have realized that my modifications in configure.in and
>> src/interfaces/libpq/Makefile to link libpq against
>> OpenLDAP are buggy.
>>
>> Here is a proposed patch to fix it.
[...]
>> # The backend doesn't need everything that's in LIBS, however
>> ! LIBS := $(filter-out -lz -lreadline -ledit -ltermcap
>> -lncurses -lcurses -lldap_r $(PTHREAD_LIBS), $(LIBS))
>
> This seems pretty risky. What if PTHREAD_LIBS contains -L switches?
> They'd get removed even if needed for other libraries.
>
> It would probably be safer not to put LDAP into LIBS at all,
> but invent two new macros for configure to set, say LDAP_LIBS
> and LDAP_LIBS_R, and add these to the link lines in the backend
> and libpq respectively.
Here is a new patch that replaces the previous one; it adds two
macros LDAP_LIBS_FE and LDAP_LIBS_BE for frontend and backend,
respectively.
I did not only add them to the Makefile for interfaces/libpq,
but also everywhere something is linked against libpq in case
somebody links static.
I don't know if that's necessary, or if static builds are
supported - if not, the changes to those Makefiles should
perhaps not be applied.
Tested on Linux, AIX and Windows.
Yours,
Laurenz Albe
Attachment | Content-Type | Size |
---|---|---|
ldaplink2.patch | application/octet-stream | 10.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2006-09-07 15:26:17 | Re: Problems with extended-Query logging code |
Previous Message | Tom Lane | 2006-09-07 15:08:26 | Re: Problems with extended-Query logging code |
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2006-09-07 16:54:40 | Re: [HACKERS] Backend SSL configuration enhancement |
Previous Message | Tom Lane | 2006-09-07 14:59:16 | Re: Timezone List |