Re: [PATCHES] Fix linking of OpenLDAP libraries - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCHES] Fix linking of OpenLDAP libraries
Date
Msg-id 22242.1157982144@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCHES] Fix linking of OpenLDAP libraries  ("Albe Laurenz" <all@adv.magwien.gv.at>)
List pgsql-hackers
"Albe Laurenz" <all@adv.magwien.gv.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

pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Emacs local vars at the tail of every file
Next
From: Andrew Dunstan
Date:
Subject: Buildfarm vs. Linux Distro classification