Re: Bugfix and new feature for PGXS - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Bugfix and new feature for PGXS
Date
Msg-id 546D6A0E.9080608@gmx.net
Whole thread Raw
In response to Re: Bugfix and new feature for PGXS  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Bugfix and new feature for PGXS  (Robert Haas <robertmhaas@gmail.com>)
Re: Bugfix and new feature for PGXS  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
On 1/31/14 9:28 PM, Bruce Momjian wrote:
> On Fri, Jan 31, 2014 at 09:28:06PM -0500, Andrew Dunstan wrote:
>>
>> On 01/31/2014 09:19 PM, Bruce Momjian wrote:
>>> On Thu, Oct 10, 2013 at 11:00:30PM -0400, Andrew Dunstan wrote:
>>>> On 10/10/2013 09:35 PM, Peter Eisentraut wrote:
>>>>> On Tue, 2013-10-08 at 10:04 -0400, Andrew Dunstan wrote:
>>>>>> On 10/07/2013 08:47 PM, Peter Eisentraut wrote:
>>>>>>> I suspect this line
>>>>>>>
>>>>>>> submake-libpq: $(libdir)/libpq.so ;
>>>>>>>
>>>>>>> will cause problems on platforms with a different extension (e.g. OS X).
>>>>>> suggested fix is below.
>>>>> Hmm, this would duplicate information about shared library naming in a
>>>>> place outside of Makefile.shlib.  That doesn't look right.
>>>>
>>>> Please suggest an alternative.
>>> Did we ever address this?
>>>
>>
>> No. I never got a reply, AFAIK.
>
> OK, seems there is no known fix then.  Thanks.

I noticed this item was still in the 9.4 code.  Looking at the original
submission
(http://www.postgresql.org/message-id/201306181552.36673.cedric@2ndquadrant.com,
patch 0001), I think the original reason for adding this was wrong to
begin with.  Attached patch 0001 fixes that.  The applicable parts of
that patch could be backpatched as a bug fix (but evidently no one cares
about building contrib with pgxs (except when I submit a patch to remove
it)).

In that topic, I also propose attached patch 0002 for 9.4, which removes
the use of the USE_VPATH variable and just uses VPATH.  There is no need
for this additional indirection.  Also, USE_FOO variables are typically
Boolean, so this is misnamed.

I note that the documentation in this topic
(http://www.postgresql.org/docs/devel/static/extend-pgxs.html) suggests
the use of config/prep_buildtree, but that is not installed, so I don't
know how much use that advice is.  (I don't know at this point whether
just installing it would be a solution.)

Thirdly, I propose attached patch 0003, which reverts patch 0004 in the
original submission.  I believe that patch was unnecessary, and I think
the new code is uglier.  (Of course, I'm biased, because I wrote the old
code.)  Technically, this ought to be for 9.5 only.

Finally, I have written a test suite for PGXS to support all these
outrageous claims: https://github.com/petere/test_pgxs.  This tests most
of the variables supported in PGXS makefiles and tests that both
documented ways of vpath builds work.  I don't propose this for
inclusion at the moment, because that would require more work, but it's
a good reference.


Attachment

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Nitpicky doc corrections for BRIN functions of pageinspect
Next
From: Abhijit Menon-Sen
Date:
Subject: Re: What exactly is our CRC algorithm?