Re: [HACKERS] Fix linking of OpenLDAP libraries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] Fix linking of OpenLDAP libraries
Date: 2006-09-11 13:42:24
Message-ID: 22242.1157982144@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

"Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at> writes:
> Tom Lane wrote:
>> Applied, but without that last part. It builds OK for me on Darwin,
>> which is moderately picky about that sort of thing, but someone should
>> try AIX.

> It builds fine on AIX 5.3 as long as you tell it to link with
> libpq.so. Static builds against libpq.a will fail.

Hm. We have been assuming that AIX's problem is that dynamic libraries
don't remember their dependencies properly, but maybe the real issue is
that it prefers static over dynamic libraries? If so, what we ought to
be doing is adding the prefer-dynamic-libraries switch to the default
LDFLAGS on that platform.

> Should -lldap or -lldap_r be added to pg_config --libs?

You have a mistaken idea of the purpose of pg_config --libs. It exists
to record what LIBS was at build time, not more, not less. It is
certainly not intended as a guide to how to link libpq.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2006-09-11 13:48:19 Buildfarm vs. Linux Distro classification
Previous Message Gregory Stark 2006-09-11 13:36:27 Emacs local vars at the tail of every file

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-09-11 13:49:46 Re: [HACKERS] Fix linking of OpenLDAP libraries
Previous Message Martijn van Oosterhout 2006-09-11 11:20:55 Re: [HACKERS] Fix linking of OpenLDAP libraries