plperl's ppport.h out of date?

Lists: pgsql-hackers
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: plperl's ppport.h out of date?
Date: 2006-05-30 12:29:18
Message-ID: 22606.1148992158@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

ppport.h is throwing warnings when compiling on Fedora Core 5
(with perl-5.8.8-4). I gather from the comments in the head
of that file that we ought to look for a newer version.

regards, tom lane


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: plperl's ppport.h out of date?
Date: 2006-05-30 13:41:59
Message-ID: 447C4BA7.80200@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom Lane wrote:
> ppport.h is throwing warnings when compiling on Fedora Core 5
> (with perl-5.8.8-4). I gather from the comments in the head
> of that file that we ought to look for a newer version.
>

I don't currently have an FC5 box to test with. Here's what to try: move
the ppport.h aside, and in the plperl directory run this command to
generate a replacement:

perl -MDevel::PPPort -e 'Devel::PPPort::WriteFile();'

and then recompile.

The last substantial change to ppport.h was when I mangled the old one a
bit to get it to work with perl 5.05 - which we no longer support (see
recent discussion). It does have some fairly horrible stuff (e.g.
function bodies).

cheers

andrew


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: plperl's ppport.h out of date?
Date: 2006-05-30 14:08:03
Message-ID: 23487.1148998083@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> I don't currently have an FC5 box to test with. Here's what to try: move
> the ppport.h aside, and in the plperl directory run this command to
> generate a replacement:

> perl -MDevel::PPPort -e 'Devel::PPPort::WriteFile();'

> and then recompile.

Hm. It compiles without warnings, but the new ppport.h is about 100K
larger than the old one :-(. The change we seem to actually need is
just to put "#ifndef PERL_UNUSED_DECL" around the attempted declaration
of that macro, so I'm inclined to just commit that rather than buy into
everything else that seems to have been done to PPPort lately.
Thoughts?

regards, tom lane


From: Devrim GUNDUZ <devrim(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: plperl's ppport.h out of date?
Date: 2006-05-30 14:14:02
Message-ID: 1148998442.5301.1.camel@laptop.gunduz.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

On Tue, 2006-05-30 at 08:29 -0400, Tom Lane wrote:
> ppport.h is throwing warnings when compiling on Fedora Core 5
> (with perl-5.8.8-4). I gather from the comments in the head
> of that file that we ought to look for a newer version.

I've informed Andrew about this, he sent me a patch a few days before,
but I could not have time to test it.

Let me test it soon.
--
The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: plperl's ppport.h out of date?
Date: 2006-05-30 15:10:43
Message-ID: 23981.1149001843@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Tom Lane wrote:
>> Hm. It compiles without warnings, but the new ppport.h is about 100K
>> larger than the old one :-(. The change we seem to actually need is
>> just to put "#ifndef PERL_UNUSED_DECL" around the attempted declaration
>> of that macro, so I'm inclined to just commit that rather than buy into
>> everything else that seems to have been done to PPPort lately.

> Well, if we start to use newer APIs at some stage, or if older APIs get
> replaced and moved into ppport.h, we will probably have to upgrade. That
> doesn't seem to be the case for now, so the minimal change seems
> reasonable - in fact Devrim asked me about this a week or so ago and in
> effect that's what I suggested to him, although I never heard back from him.

A more radical solution is to remove ppport.h from our distribution
entirely, and have the Makefile generate it at build time, using that
same little bit of script you showed. Or is Devel::PPPort not part of
the standard Perl distribution?

regards, tom lane


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: plperl's ppport.h out of date?
Date: 2006-05-30 15:16:59
Message-ID: 447C61EB.6080104@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom Lane wrote:
> A more radical solution is to remove ppport.h from our distribution
> entirely, and have the Makefile generate it at build time, using that
> same little bit of script you showed. Or is Devel::PPPort not part of
> the standard Perl distribution?
>
>
>

It is, but this misses the point. You want to use the latest ppport.h
even when building with earlier perls.

The man page says:

just take the most recent copy of ppport.h that you
can find (e.g. by generating it with the latest "Devel::PPPort"
release
from CPAN), copy it into your project, adjust your project to use it,
and distribute the header along with your module.

We are using ppport.h correctly - we're just a bit out of date, that's all.

cheers

andrew


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: plperl's ppport.h out of date?
Date: 2006-05-30 15:35:12
Message-ID: 24251.1149003312@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> It is, but this misses the point. You want to use the latest ppport.h
> even when building with earlier perls.

Doh, of course. Well, for the moment I'll just put in the #ifndef.

FWIW, it looks like a large part of the bloat in the newer file is
in-line documentation, which we hardly need to include in our
distribution. I'll leave it to someone more familiar with Perl to
determine whether we want to try to use a slimmed-down copy of the
up-to-date output.

regards, tom lane


From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: plperl's ppport.h out of date?
Date: 2006-05-31 07:22:20
Message-ID: 20060531072220.GD23169@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, May 30, 2006 at 11:35:12AM -0400, Tom Lane wrote:
> FWIW, it looks like a large part of the bloat in the newer file is
> in-line documentation, which we hardly need to include in our
> distribution. I'll leave it to someone more familiar with Perl to
> determine whether we want to try to use a slimmed-down copy of the
> up-to-date output.

Not sure whether it's worth it, but this sed line strips the POD docs:

sed -e '/^=/,/^=cut/d' < ppport.h

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: plperl's ppport.h out of date?
Date: 2006-05-31 21:04:18
Message-ID: 447E04D2.1090501@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Martijn van Oosterhout wrote:
> On Tue, May 30, 2006 at 11:35:12AM -0400, Tom Lane wrote:
>
>> FWIW, it looks like a large part of the bloat in the newer file is
>> in-line documentation, which we hardly need to include in our
>> distribution. I'll leave it to someone more familiar with Perl to
>> determine whether we want to try to use a slimmed-down copy of the
>> up-to-date output.
>>
>
> Not sure whether it's worth it, but this sed line strips the POD docs:
>
> sed -e '/^=/,/^=cut/d' < ppport.h
>
> Have a nice day,
>

The changes are a lot more substantive than this, from my quick look.

We'll have to upgrade some day, but for now we are OK. This module is
regularly updated, but we should only update our copy as needed. I think
we are good to go with Tom's patch.

cheers

andrew