| Lists: | pgsql-hackers |
|---|
| From: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de> |
| Cc: | pgsql-hackers(at)postgresql(dot)org, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
| Subject: | windows cfbot failing: my_perl |
| Date: | 2022-08-26 11:55:46 |
| Message-ID: | 20220826115546.GE2342@telsasoft.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
The last 20 some consecutive builds failed:
https://cirrus-ci.com/github/postgresql-cfbot/postgresql
like this:
[09:29:27.711] C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\ucrt\malloc.h(159,17): error C2065: 'my_perl': undeclared identifier (compiling source file src/pl/plperl/SPI.c) [c:\cirrus\plperl.vcxproj]
[09:29:27.711] C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\ucrt\malloc.h(159,17): error C2065: 'my_perl': undeclared identifier (compiling source file src/pl/plperl/Util.c) [c:\cirrus\plperl.vcxproj]
[09:29:27.711] C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\ucrt\malloc.h(159,17): error C2223: left of '->IMem' must point to struct/union (compiling source file src/pl/plperl/SPI.c) [c:\cirrus\plperl.vcxproj]
[09:29:27.711] C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\ucrt\malloc.h(159,17): error C2223: left of '->IMem' must point to struct/union (compiling source file src/pl/plperl/Util.c) [c:\cirrus\plperl.vcxproj]
I imagine it may be due to an error hit while rebuilding the ci's docker image.
--
Justin
| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | Justin Pryzby <pryzby(at)telsasoft(dot)com>, John Naylor <john(dot)naylor(at)postgresql(dot)org> |
| Cc: | pgsql-hackers(at)postgresql(dot)org, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
| Subject: | Re: windows cfbot failing: my_perl |
| Date: | 2022-08-26 13:21:51 |
| Message-ID: | 20220826132151.sj6pieswskq4vp4z@awork3.anarazel.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
Hi,
On 2022-08-26 06:55:46 -0500, Justin Pryzby wrote:
> The last 20 some consecutive builds failed:
> https://cirrus-ci.com/github/postgresql-cfbot/postgresql
>
> like this:
> [09:29:27.711] C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\ucrt\malloc.h(159,17): error C2065: 'my_perl': undeclared identifier (compiling source file src/pl/plperl/SPI.c) [c:\cirrus\plperl.vcxproj]
> [09:29:27.711] C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\ucrt\malloc.h(159,17): error C2065: 'my_perl': undeclared identifier (compiling source file src/pl/plperl/Util.c) [c:\cirrus\plperl.vcxproj]
> [09:29:27.711] C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\ucrt\malloc.h(159,17): error C2223: left of '->IMem' must point to struct/union (compiling source file src/pl/plperl/SPI.c) [c:\cirrus\plperl.vcxproj]
> [09:29:27.711] C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\ucrt\malloc.h(159,17): error C2223: left of '->IMem' must point to struct/union (compiling source file src/pl/plperl/Util.c) [c:\cirrus\plperl.vcxproj]
>
> I imagine it may be due to an error hit while rebuilding the ci's docker image.
I don't think it's CI specific, see
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hamerkop&dt=2022-08-26%2011%3A00%3A11
Looks like the failures might have started with
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=121d2d3d70ecdb2113b340c5f3b99a61341291af
based on
https://cirrus-ci.com/github/postgres/postgres/
Not immediately obvious why that would be.
Greetings,
Andres Freund
| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | Justin Pryzby <pryzby(at)telsasoft(dot)com>, John Naylor <john(dot)naylor(at)postgresql(dot)org> |
| Cc: | pgsql-hackers(at)postgresql(dot)org, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
| Subject: | Re: windows cfbot failing: my_perl |
| Date: | 2022-08-26 13:40:47 |
| Message-ID: | 20220826134047.vr3bppkwqhy5ppn3@awork3.anarazel.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
Hi,
On 2022-08-26 06:21:51 -0700, Andres Freund wrote:
> On 2022-08-26 06:55:46 -0500, Justin Pryzby wrote:
> > The last 20 some consecutive builds failed:
> > https://cirrus-ci.com/github/postgresql-cfbot/postgresql
> >
> > like this:
> > [09:29:27.711] C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\ucrt\malloc.h(159,17): error C2065: 'my_perl': undeclared identifier (compiling source file src/pl/plperl/SPI.c) [c:\cirrus\plperl.vcxproj]
> > [09:29:27.711] C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\ucrt\malloc.h(159,17): error C2065: 'my_perl': undeclared identifier (compiling source file src/pl/plperl/Util.c) [c:\cirrus\plperl.vcxproj]
> > [09:29:27.711] C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\ucrt\malloc.h(159,17): error C2223: left of '->IMem' must point to struct/union (compiling source file src/pl/plperl/SPI.c) [c:\cirrus\plperl.vcxproj]
> > [09:29:27.711] C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\ucrt\malloc.h(159,17): error C2223: left of '->IMem' must point to struct/union (compiling source file src/pl/plperl/Util.c) [c:\cirrus\plperl.vcxproj]
> >
> > I imagine it may be due to an error hit while rebuilding the ci's docker image.
>
> I don't think it's CI specific, see
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hamerkop&dt=2022-08-26%2011%3A00%3A11
>
> Looks like the failures might have started with
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=121d2d3d70ecdb2113b340c5f3b99a61341291af
> based on
> https://cirrus-ci.com/github/postgres/postgres/
>
> Not immediately obvious why that would be.
Reproduces in a VM, it starts to fail with that commit. Looks like somehow
different macros are trampling on each other. Something in perl is interfering
with msvc's malloc.h, turning
if (_Marker == _ALLOCA_S_HEAP_MARKER)
{
free(_Memory);
}
into
if (_Marker == 0xDDDD)
{
(*(my_perl->IMem)->pFree)((my_perl->IMem), (_Memory));
}
after preprocessing. No idea how.
Greetings,
Andres Freund
| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | Justin Pryzby <pryzby(at)telsasoft(dot)com>, John Naylor <john(dot)naylor(at)postgresql(dot)org> |
| Cc: | pgsql-hackers(at)postgresql(dot)org, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
| Subject: | Re: windows cfbot failing: my_perl |
| Date: | 2022-08-26 14:27:00 |
| Message-ID: | 20220826142700.fecymkdgdelktrlp@awork3.anarazel.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
Hi,
On 2022-08-26 06:40:47 -0700, Andres Freund wrote:
> On 2022-08-26 06:21:51 -0700, Andres Freund wrote:
> > On 2022-08-26 06:55:46 -0500, Justin Pryzby wrote:
> > > The last 20 some consecutive builds failed:
> > > https://cirrus-ci.com/github/postgresql-cfbot/postgresql
> > >
> > > like this:
> > > [09:29:27.711] C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\ucrt\malloc.h(159,17): error C2065: 'my_perl': undeclared identifier (compiling source file src/pl/plperl/SPI.c) [c:\cirrus\plperl.vcxproj]
> > > [09:29:27.711] C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\ucrt\malloc.h(159,17): error C2065: 'my_perl': undeclared identifier (compiling source file src/pl/plperl/Util.c) [c:\cirrus\plperl.vcxproj]
> > > [09:29:27.711] C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\ucrt\malloc.h(159,17): error C2223: left of '->IMem' must point to struct/union (compiling source file src/pl/plperl/SPI.c) [c:\cirrus\plperl.vcxproj]
> > > [09:29:27.711] C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\ucrt\malloc.h(159,17): error C2223: left of '->IMem' must point to struct/union (compiling source file src/pl/plperl/Util.c) [c:\cirrus\plperl.vcxproj]
> > >
> > > I imagine it may be due to an error hit while rebuilding the ci's docker image.
> >
> > I don't think it's CI specific, see
> > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hamerkop&dt=2022-08-26%2011%3A00%3A11
> >
> > Looks like the failures might have started with
> > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=121d2d3d70ecdb2113b340c5f3b99a61341291af
> > based on
> > https://cirrus-ci.com/github/postgres/postgres/
> >
> > Not immediately obvious why that would be.
>
> Reproduces in a VM, it starts to fail with that commit. Looks like somehow
> different macros are trampling on each other. Something in perl is interfering
> with msvc's malloc.h, turning
>
> if (_Marker == _ALLOCA_S_HEAP_MARKER)
> {
> free(_Memory);
> }
> into
>
> if (_Marker == 0xDDDD)
> {
> (*(my_perl->IMem)->pFree)((my_perl->IMem), (_Memory));
> }
>
> after preprocessing. No idea how.
Because perl, extremely unhelpfully, #defines free. Which, not surprisingly,
causes issues when including system headers referencing free as well.
I don't really see a good solution to this other than hoisting the
mb/pg_wchar.h include out to before we include all the perl stuff. That does
fix the issue.
Greetings,
Andres Freund
| From: | John Naylor <john(dot)naylor(at)enterprisedb(dot)com> |
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de> |
| Cc: | Justin Pryzby <pryzby(at)telsasoft(dot)com>, John Naylor <john(dot)naylor(at)postgresql(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
| Subject: | Re: windows cfbot failing: my_perl |
| Date: | 2022-08-26 14:39:05 |
| Message-ID: | CAFBsxsFew_-eaa6geJsR5WcRLeQ9afrPg4rZL59g=3GGu5g_+Q@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
On Fri, Aug 26, 2022 at 9:27 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> Because perl, extremely unhelpfully, #defines free. Which, not surprisingly,
> causes issues when including system headers referencing free as well.
>
> I don't really see a good solution to this other than hoisting the
> mb/pg_wchar.h include out to before we include all the perl stuff. That does
> fix the issue.
We could also move is_valid_ascii somewhere else. It's only
tangentially related to "wide chars" anyway.
--
John Naylor
EDB: http://www.enterprisedb.com
| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | John Naylor <john(dot)naylor(at)enterprisedb(dot)com> |
| Cc: | Justin Pryzby <pryzby(at)telsasoft(dot)com>, John Naylor <john(dot)naylor(at)postgresql(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
| Subject: | Re: windows cfbot failing: my_perl |
| Date: | 2022-08-26 14:47:40 |
| Message-ID: | 20220826144740.ff3berqoeoi6lnd4@awork3.anarazel.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
Hi,
On 2022-08-26 21:39:05 +0700, John Naylor wrote:
> On Fri, Aug 26, 2022 at 9:27 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
> >
> > Because perl, extremely unhelpfully, #defines free. Which, not surprisingly,
> > causes issues when including system headers referencing free as well.
> >
> > I don't really see a good solution to this other than hoisting the
> > mb/pg_wchar.h include out to before we include all the perl stuff. That does
> > fix the issue.
>
> We could also move is_valid_ascii somewhere else. It's only
> tangentially related to "wide chars" anyway.
Given the crazy defines of stuff like free, it seems like a good idea to have
a rule that no headers should be included after plperl.h with
PG_NEED_PERL_XSUB_H defined. It's not like there's not other chances of of
pulling in malloc.h from within pg_wchar.h somehow.
It's a bit ugly to have the mb/pg_wchar.h in plperl.h instead of
plperl_helpers.h, but ...
Greetings,
Andres Freund
| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | John Naylor <john(dot)naylor(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org> |
| Cc: | Justin Pryzby <pryzby(at)telsasoft(dot)com>, John Naylor <john(dot)naylor(at)postgresql(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
| Subject: | Re: windows cfbot failing: my_perl |
| Date: | 2022-08-26 20:28:30 |
| Message-ID: | 20220826202830.26fn67xocpryulrj@awork3.anarazel.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
Hi,
Tom, Ilmari, you seem to have hacked on this stuff most (not so) recently. Do
you have a better suggestion than moving the mb/pg_wchar.h include out of
plperl_helpers.h as I suggest below?
On 2022-08-26 07:47:40 -0700, Andres Freund wrote:
> On 2022-08-26 21:39:05 +0700, John Naylor wrote:
> > On Fri, Aug 26, 2022 at 9:27 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
> > >
> > > Because perl, extremely unhelpfully, #defines free. Which, not surprisingly,
> > > causes issues when including system headers referencing free as well.
> > >
> > > I don't really see a good solution to this other than hoisting the
> > > mb/pg_wchar.h include out to before we include all the perl stuff. That does
> > > fix the issue.
> >
> > We could also move is_valid_ascii somewhere else. It's only
> > tangentially related to "wide chars" anyway.
>
> Given the crazy defines of stuff like free, it seems like a good idea to have
> a rule that no headers should be included after plperl.h with
> PG_NEED_PERL_XSUB_H defined. It's not like there's not other chances of of
> pulling in malloc.h from within pg_wchar.h somehow.
>
> It's a bit ugly to have the mb/pg_wchar.h in plperl.h instead of
> plperl_helpers.h, but ...
Greetings,
Andres Freund
| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de> |
| Cc: | John Naylor <john(dot)naylor(at)enterprisedb(dot)com>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, John Naylor <john(dot)naylor(at)postgresql(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
| Subject: | Re: windows cfbot failing: my_perl |
| Date: | 2022-08-26 20:32:15 |
| Message-ID: | 2021463.1661545935@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
Andres Freund <andres(at)anarazel(dot)de> writes:
> Tom, Ilmari, you seem to have hacked on this stuff most (not so) recently. Do
> you have a better suggestion than moving the mb/pg_wchar.h include out of
> plperl_helpers.h as I suggest below?
I agree with the conclusion that we'd better #include all our own
headers before any of Perl's. No strong opinions about which
rearrangement is least ugly --- but let's add some comments about
that requirement.
regards, tom lane
| From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de>, John Naylor <john(dot)naylor(at)enterprisedb(dot)com> |
| Cc: | Justin Pryzby <pryzby(at)telsasoft(dot)com>, John Naylor <john(dot)naylor(at)postgresql(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
| Subject: | Re: windows cfbot failing: my_perl |
| Date: | 2022-08-26 21:05:52 |
| Message-ID: | 213a7840-f3eb-e294-7d9a-9602d833dad7@dunslane.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
On 2022-08-26 Fr 10:47, Andres Freund wrote:
> Hi,
>
> On 2022-08-26 21:39:05 +0700, John Naylor wrote:
>> On Fri, Aug 26, 2022 at 9:27 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
>>> Because perl, extremely unhelpfully, #defines free. Which, not surprisingly,
>>> causes issues when including system headers referencing free as well.
>>>
>>> I don't really see a good solution to this other than hoisting the
>>> mb/pg_wchar.h include out to before we include all the perl stuff. That does
>>> fix the issue.
>> We could also move is_valid_ascii somewhere else. It's only
>> tangentially related to "wide chars" anyway.
> Given the crazy defines of stuff like free, it seems like a good idea to have
> a rule that no headers should be included after plperl.h with
> PG_NEED_PERL_XSUB_H defined. It's not like there's not other chances of of
> pulling in malloc.h from within pg_wchar.h somehow.
>
> It's a bit ugly to have the mb/pg_wchar.h in plperl.h instead of
> plperl_helpers.h, but ...
>
It's already included directly in plperl.c, so couldn't we just lift it
directly into SPI.xs and Util.xs?
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
| Cc: | John Naylor <john(dot)naylor(at)enterprisedb(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, John Naylor <john(dot)naylor(at)postgresql(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
| Subject: | Re: windows cfbot failing: my_perl |
| Date: | 2022-08-26 21:15:07 |
| Message-ID: | 20220826211507.vaepb2nzlh3krxdg@awork3.anarazel.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
Hi,
On 2022-08-26 17:05:52 -0400, Andrew Dunstan wrote:
> On 2022-08-26 Fr 10:47, Andres Freund wrote:
> > Given the crazy defines of stuff like free, it seems like a good idea to have
> > a rule that no headers should be included after plperl.h with
> > PG_NEED_PERL_XSUB_H defined. It's not like there's not other chances of of
> > pulling in malloc.h from within pg_wchar.h somehow.
> >
> > It's a bit ugly to have the mb/pg_wchar.h in plperl.h instead of
> > plperl_helpers.h, but ...
> It's already included directly in plperl.c, so couldn't we just lift it
> directly into SPI.xs and Util.xs?
I think it'd also be needed in hstore_plperl.c, jsonb_plperl.c. Putting the
include in plperl.h would keep that aspect transparent, because plperl_utils.h
includes plperl.h.
I don't think manually including all dependencies, even if it's just one, in
each of the six files currently using plperl_utils.h is a good approach.
Greetings,
Andres Freund
| From: | John Naylor <john(dot)naylor(at)enterprisedb(dot)com> |
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de> |
| Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, John Naylor <john(dot)naylor(at)postgresql(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
| Subject: | Re: windows cfbot failing: my_perl |
| Date: | 2022-08-27 02:32:45 |
| Message-ID: | CAFBsxsGYrjEyt+taR1et9bpK6PJeVMAm2dwNR52Gpd84aZ2rHA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
On Sat, Aug 27, 2022 at 4:15 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> Hi,
>
> On 2022-08-26 17:05:52 -0400, Andrew Dunstan wrote:
> > On 2022-08-26 Fr 10:47, Andres Freund wrote:
> > > Given the crazy defines of stuff like free, it seems like a good idea to have
> > > a rule that no headers should be included after plperl.h with
> > > PG_NEED_PERL_XSUB_H defined. It's not like there's not other chances of of
> > > pulling in malloc.h from within pg_wchar.h somehow.
> > >
> > > It's a bit ugly to have the mb/pg_wchar.h in plperl.h instead of
> > > plperl_helpers.h, but ...
>
> > It's already included directly in plperl.c, so couldn't we just lift it
> > directly into SPI.xs and Util.xs?
>
> I think it'd also be needed in hstore_plperl.c, jsonb_plperl.c. Putting the
> include in plperl.h would keep that aspect transparent, because plperl_utils.h
> includes plperl.h.
Since plperl_helpers.h already includes plperl.h, I'm not sure why
both are included everywhere the former is. If .c/.xs files didn't
include plperl.h directly, we could keep pg_wchar.h in
plperl_helpers.h. Not sure if that's workable or any better...
--
John Naylor
EDB: http://www.enterprisedb.com
| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | John Naylor <john(dot)naylor(at)enterprisedb(dot)com> |
| Cc: | Andres Freund <andres(at)anarazel(dot)de>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
| Subject: | Re: windows cfbot failing: my_perl |
| Date: | 2022-08-27 03:02:06 |
| Message-ID: | 2167247.1661569326@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
John Naylor <john(dot)naylor(at)enterprisedb(dot)com> writes:
> On Sat, Aug 27, 2022 at 4:15 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
>> I think it'd also be needed in hstore_plperl.c, jsonb_plperl.c. Putting the
>> include in plperl.h would keep that aspect transparent, because plperl_utils.h
>> includes plperl.h.
> Since plperl_helpers.h already includes plperl.h, I'm not sure why
> both are included everywhere the former is. If .c/.xs files didn't
> include plperl.h directly, we could keep pg_wchar.h in
> plperl_helpers.h. Not sure if that's workable or any better...
Maybe we should flush the separate plperl_helpers.h header and just
put those static-inline functions in plperl.h.
regards, tom lane
| From: | John Naylor <john(dot)naylor(at)enterprisedb(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Andres Freund <andres(at)anarazel(dot)de>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
| Subject: | Re: windows cfbot failing: my_perl |
| Date: | 2022-08-27 04:20:29 |
| Message-ID: | CAFBsxsFmctf3x7zywC=4026EehRpy4kbwiC0=EriNb9fjeQLFg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
On Sat, Aug 27, 2022 at 10:02 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> John Naylor <john(dot)naylor(at)enterprisedb(dot)com> writes:
> > On Sat, Aug 27, 2022 at 4:15 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
> >> I think it'd also be needed in hstore_plperl.c, jsonb_plperl.c. Putting the
> >> include in plperl.h would keep that aspect transparent, because plperl_utils.h
> >> includes plperl.h.
>
> > Since plperl_helpers.h already includes plperl.h, I'm not sure why
> > both are included everywhere the former is. If .c/.xs files didn't
> > include plperl.h directly, we could keep pg_wchar.h in
> > plperl_helpers.h. Not sure if that's workable or any better...
>
> Maybe we should flush the separate plperl_helpers.h header and just
> put those static-inline functions in plperl.h.
Here's a patch with that idea, not tested on Windows yet.
--
John Naylor
EDB: http://www.enterprisedb.com
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-Be-more-careful-to-avoid-including-system-headers.patch | text/x-patch | 12.9 KB |
| From: | John Naylor <john(dot)naylor(at)enterprisedb(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Andres Freund <andres(at)anarazel(dot)de>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
| Subject: | Re: windows cfbot failing: my_perl |
| Date: | 2022-08-27 05:53:24 |
| Message-ID: | CAFBsxsG7ucvmBiK5R75RV7jUXJ0S42sGSCULY-eBypgZs60vvw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
On Sat, Aug 27, 2022 at 11:20 AM John Naylor
<john(dot)naylor(at)enterprisedb(dot)com> wrote:
>
> Here's a patch with that idea, not tested on Windows yet.
Update: I tried taking the CI for a spin, but ran into IT issues with
Github when I tried to push my branch to remote.
--
John Naylor
EDB: http://www.enterprisedb.com
| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | John Naylor <john(dot)naylor(at)enterprisedb(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
| Subject: | Re: windows cfbot failing: my_perl |
| Date: | 2022-08-27 07:11:13 |
| Message-ID: | 20220827071113.nl4q3frnizt4a6zw@awork3.anarazel.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
On 2022-08-26 23:02:06 -0400, Tom Lane wrote:
> John Naylor <john(dot)naylor(at)enterprisedb(dot)com> writes:
> > On Sat, Aug 27, 2022 at 4:15 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
> >> I think it'd also be needed in hstore_plperl.c, jsonb_plperl.c. Putting the
> >> include in plperl.h would keep that aspect transparent, because plperl_utils.h
> >> includes plperl.h.
>
> > Since plperl_helpers.h already includes plperl.h, I'm not sure why
> > both are included everywhere the former is. If .c/.xs files didn't
> > include plperl.h directly, we could keep pg_wchar.h in
> > plperl_helpers.h. Not sure if that's workable or any better...
>
> Maybe we should flush the separate plperl_helpers.h header and just
> put those static-inline functions in plperl.h.
+1
| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | John Naylor <john(dot)naylor(at)enterprisedb(dot)com> |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
| Subject: | Re: windows cfbot failing: my_perl |
| Date: | 2022-08-27 07:23:44 |
| Message-ID: | 20220827072344.p3bx7cjvhdawuigw@awork3.anarazel.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
Hi,
On 2022-08-27 12:53:24 +0700, John Naylor wrote:
> On Sat, Aug 27, 2022 at 11:20 AM John Naylor
> <john(dot)naylor(at)enterprisedb(dot)com> wrote:
> >
> > Here's a patch with that idea, not tested on Windows yet.
>
> Update: I tried taking the CI for a spin, but ran into IT issues with
> Github when I tried to push my branch to remote.
A github, not a CI issue? Just making sure...
As a workaround you can just open a CF entry, that'll run the patch soon.
But either way, I ran the patch "manually" in a windows VM that I had running
anyway. With the meson patchset, but I don't see how it could matter here.
1/5 postgresql:setup / tmp_install OK 1.30s
2/5 postgresql:jsonb_plperl / jsonb_plperl/regress OK 8.30s
3/5 postgresql:bool_plperl / bool_plperl/regress OK 8.30s
4/5 postgresql:hstore_plperl / hstore_plperl/regress OK 8.64s
5/5 postgresql:plperl / plperl/regress OK 10.41s
Ok: 5
I didn't test other platforms.
WRT the patch's commit message: The issue isn't that perl's free() is
redefined, it's that perl's #define free (which references perl globals!)
breaks windows' header...
Greetings,
Andres Freund
| From: | John Naylor <john(dot)naylor(at)enterprisedb(dot)com> |
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de> |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
| Subject: | Re: windows cfbot failing: my_perl |
| Date: | 2022-08-27 07:36:09 |
| Message-ID: | CAFBsxsFv2Ln-Hk8pq_Az_uyyJ3e7+9-S0ZZHiEghK3B9gyQs0w@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
On Sat, Aug 27, 2022 at 2:23 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> Hi,
>
> On 2022-08-27 12:53:24 +0700, John Naylor wrote:
> > Update: I tried taking the CI for a spin, but ran into IT issues with
> > Github when I tried to push my branch to remote.
>
> A github, not a CI issue? Just making sure...
Yeah, I forked PG from the Github page, cloned it locally, applied the
patch and tried to push to origin.
> As a workaround you can just open a CF entry, that'll run the patch soon.
Yeah, I did that after taking a break -- there are compiler warnings
for contrib/sepgsql/label.c where pfree's argument is cast to void *,
so seems unrelated.
> But either way, I ran the patch "manually" in a windows VM that I had running
> anyway. With the meson patchset, but I don't see how it could matter here.
>
> 1/5 postgresql:setup / tmp_install OK 1.30s
> 2/5 postgresql:jsonb_plperl / jsonb_plperl/regress OK 8.30s
> 3/5 postgresql:bool_plperl / bool_plperl/regress OK 8.30s
> 4/5 postgresql:hstore_plperl / hstore_plperl/regress OK 8.64s
> 5/5 postgresql:plperl / plperl/regress OK 10.41s
>
> Ok: 5
>
>
> I didn't test other platforms.
>
>
> WRT the patch's commit message: The issue isn't that perl's free() is
> redefined, it's that perl's #define free (which references perl globals!)
> breaks windows' header...
Ah, thanks for that detail and for testing, will push.
--
John Naylor
EDB: http://www.enterprisedb.com