Re: configure.in / xml / quoting trouble - Mailing list pgsql-patches

From Tom Lane
Subject Re: configure.in / xml / quoting trouble
Date
Msg-id 3682.1183134944@sss.pgh.pa.us
Whole thread Raw
In response to Re: configure.in / xml / quoting trouble  (Patrick Welche <prlw1@newn.cam.ac.uk>)
Responses Re: configure.in / xml / quoting trouble  (Patrick Welche <prlw1@newn.cam.ac.uk>)
List pgsql-patches
Patrick Welche <prlw1@newn.cam.ac.uk> writes:
> On Thu, Jun 28, 2007 at 04:16:37PM -0400, Tom Lane wrote:
>> What exactly does xml2-config --libs produce on your machine?

> -Wl,-R/usr/local/lib -L/usr/local/lib -lxml2 -lz -lpthread -lm

> but because I added the -R - it isn't the default as distributed,

Hm.  This doesn't seem like a bright way to be forcing an rpath.
The problem is that you have no idea what search order will result
when this is combined with any -R we ourselves might have included
or will later include into our LDFLAGS.  As an example of possible
breakage, suppose you are trying to install PG into /opt/postgres
and there is already an old version of PG in /usr/local.  You've
got about a fifty-fifty chance whether the produced binaries will
search /opt/postgres/lib before or after /usr/local/lib --- and
the second way is wrong, because they'd find the old version of
libpq.so.

Ugly as it sounds, I think you'd be better off setting the entire
Postgres rpath by hand by specifying LDFLAGS to configure.

The other thing that's a bit strange here is the reference to
libpthread --- does libxml2 really depend on that?  I'd definitely
advise against linking libpthread into the backend if you can
avoid it.

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: configure.in / xml / quoting trouble
Next
From: Alvaro Herrera
Date:
Subject: Re: Cancel autovacuum conflicting with DROP TABLE