pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBuild error in Solaris
3+ messages / 2 participants
[nested] [flat]
Commits from this thread:
2022-02-09 d5c2a91e54 e327291e4a 5ea3b99de0 eba0f095c7 3a6e3a8902 1a8b6f0555 Remove ppport.h's broken re-implementation of eval_pv().
* Build error in Solaris
@ 2022-02-08 10:52 Wei Sun <936739278@qq.com>
2022-02-08 12:28 ` Re: Build error in Solaris Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: Wei Sun @ 2022-02-08 10:52 UTC (permalink / raw)
To: pgsql-bugs <pgsql-bugs@lists.postgresql.org>; ilmari <ilmari@ilmari.org>
Hi
When I built the latest code for branch REL_10_STABLE on the Solairs,
the following error occurred:
------------------------------------------------------
"plperl.c", line 669: syntax error before or at: if
"plperl.c", line 669: undefined symbol: _sv
"plperl.c", line 669: left operand of "->" must be pointer to struct/union
"plperl.c", line 669: warning: improper pointer/integer combination: arg #2
"plperl.c", line 669: syntax error before or at: else
"plperl.c", line 670: warning: statement not reached
"plperl.c", line 678: cannot recover from previous errors
cc: acomp failed for plperl.c
gmake: *** [plperl.o] Error 2
------------------------------------------------------
My build environment is as follows:
Solairs version : 11.3
perl version : v5.12.5
When I revert the following commit, the bulild was successful
https://github.com/postgres/postgres/commit/8be956c65c
Is there anything I can do to solve this problem?
Regards
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Build error in Solaris
2022-02-08 10:52 Build error in Solaris Wei Sun <936739278@qq.com>
@ 2022-02-08 12:28 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-02-08 21:53 ` Re: Build error in Solaris Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2022-02-08 12:28 UTC (permalink / raw)
To: Wei Sun <936739278@qq.com>; +Cc: pgsql-bugs <pgsql-bugs@lists.postgresql.org>; ilmari <ilmari@ilmari.org>
"=?utf-8?B?V2VpIFN1bg==?=" <936739278@qq.com> writes:
> When I built the latest code for branch REL_10_STABLE on the Solairs,
> the following error occurred:
> ------------------------------------------------------
> "plperl.c", line 669: syntax error before or at: if
> "plperl.c", line 669: undefined symbol: _sv
> "plperl.c", line 669: left operand of "->" must be pointer to struct/union
> "plperl.c", line 669: warning: improper pointer/integer combination: arg #2
> "plperl.c", line 669: syntax error before or at: else
> "plperl.c", line 670: warning: statement not reached
> "plperl.c", line 678: cannot recover from previous errors
> cc: acomp failed for plperl.c
> gmake: *** [plperl.o] Error 2
> ------------------------------------------------------
Hm. I saw something similar on my old dinosaur pademelon, but wrote it
off as "they don't care about pre-C99 compilers anymore". But now I
dug into ppport.h a bit more, and I think it's actually busted for
non-gcc compilers: eval_pv expands into something that tries to use
STMT_START/STMT_END inside a plain parenthesized expression (via
croak_sv).
Maybe the bleeding edge Devel::PPPort would do better? I see
Revision history for Devel-PPPort
3.64 - 2022-02-01
* Fix: better support for STMT_START / STMT_END definition
* Fix: Only use '-Wdeclaration-after-statement' if possible
which if not a smoking gun is at least firearm-adjacent.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Build error in Solaris
2022-02-08 10:52 Build error in Solaris Wei Sun <936739278@qq.com>
2022-02-08 12:28 ` Re: Build error in Solaris Tom Lane <tgl@sss.pgh.pa.us>
@ 2022-02-08 21:53 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: Tom Lane @ 2022-02-08 21:53 UTC (permalink / raw)
To: ilmari <ilmari@ilmari.org>; +Cc: Wei Sun <936739278@qq.com>; pgsql-bugs <pgsql-bugs@lists.postgresql.org>
I wrote:
> Hm. I saw something similar on my old dinosaur pademelon, but wrote it
> off as "they don't care about pre-C99 compilers anymore". But now I
> dug into ppport.h a bit more, and I think it's actually busted for
> non-gcc compilers: eval_pv expands into something that tries to use
> STMT_START/STMT_END inside a plain parenthesized expression (via
> croak_sv).
> Maybe the bleeding edge Devel::PPPort would do better? I see
Nope, 3.64 is also broken.
I traced this to this stanza, originally added in Devel-PPPort 3.54:
/* Older Perl versions have broken croak_on_error=1 */
#if (PERL_BCDVERSION < 0x5031002)
# ifdef eval_pv
# undef eval_pv
# if defined(PERL_USE_GCC_BRACE_GROUPS)
# define eval_pv(p, croak_on_error) ({ SV *_sv = Perl_eval_pv(aTHX_ p, 0); D_PPP_CROAK_IF_ERROR(croak_on_error); _sv; })
# else
# define eval_pv(p, croak_on_error) ((PL_Sv = Perl_eval_pv(aTHX_ p, 0)), D_PPP_CROAK_IF_ERROR(croak_on_error), PL_Sv)
# endif
# endif
#endif
D_PPP_CROAK_IF_ERROR goes to croak_sv which, in older Perl
versions, produces a statement block. So anything that won't
accept gcc-like statements within expressions blows up.
Now, we don't actually *care* about the case this is trying
to fix, because all our eval_pv usages pass constant-FALSE
for croak_on_error. (Possibly not unrelated to the bug
implied by the above comment ... but I digress.) Therefore,
pending a resolution to the issue I just filed [1], I suggest
that we just dike this stanza out of our copy of ppport.h.
regards, tom lane
[1] https://github.com/Dual-Life/Devel-PPPort/issues/216
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2022-02-08 21:53 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-02-08 10:52 Build error in Solaris Wei Sun <936739278@qq.com>
2022-02-08 12:28 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-02-08 21:53 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox