Skip Menu |

This queue is for tickets about the POSIX-RT-Spawn CPAN distribution.

Report information
The Basics
Id: 125666
Status: open
Priority: 0/
Queue: POSIX-RT-Spawn

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.11
Fixed in: (no value)



Subject: Does not compile anymore with perl 5.28.0
With perl 5.28.0 (more precisely: since 5.27.7) the module does not compile anymore: ... cc -c -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -DVERSION=\"0.11\" -DXS_VERSION=\"0.11\" -fPIC "-I/opt/perl-5.28.0t/lib/5.28.0/x86_64-linux-thread-multi/CORE" Spawn.c In file included from /opt/perl-5.28.0t/lib/5.28.0/x86_64-linux-thread-multi/CORE/perl.h:2465:0, from Spawn.xs:4: Spawn.xs: In function 'do_posix_spawn_free': Spawn.xs:43:14: error: 'PL_Argv' undeclared (first use in this function) Safefree(PL_Argv); ^ ... More information in a related perl ticket: https://rt.perl.org/Ticket/Display.html?id=132777
On 2018-06-23 10:19:25, SREZIC wrote: Show quoted text
> With perl 5.28.0 (more precisely: since 5.27.7) the module does not > compile anymore: > > ... > cc -c -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe > -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE > -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -DVERSION=\"0.11\" > -DXS_VERSION=\"0.11\" -fPIC "-I/opt/perl-5.28.0t/lib/5.28.0/x86_64- > linux-thread-multi/CORE" Spawn.c > In file included from /opt/perl-5.28.0t/lib/5.28.0/x86_64-linux- > thread-multi/CORE/perl.h:2465:0, > from Spawn.xs:4: > Spawn.xs: In function 'do_posix_spawn_free': > Spawn.xs:43:14: error: 'PL_Argv' undeclared (first use in this > function) > Safefree(PL_Argv); > ^ > ... > > More information in a related perl ticket: > https://rt.perl.org/Ticket/Display.html?id=132777
With the following hack (possibly not reliable or not working with threaded perls) it compile and passes the test suite: diff --git a/Spawn.xs b/Spawn.xs index 7c35779..7054fb4 100644 --- a/Spawn.xs +++ b/Spawn.xs @@ -13,6 +13,11 @@ extern char **environ; +#if PERL_VERSION > 27 || (PERL_VERSION == 27 && PERL_SUBVERSION >= 7) +const char ** PL_Argv; +char * PL_Cmd; +#endif + Pid_t do_posix_spawn (const char *cmd, char **argv) { Pid_t pid; But actually it should make the same changes like in perl5 commit 282fc0b3cc2439f69587d980b62bef7f5d5bdfef
On Mon Jan 07 17:14:23 2019, SREZIC wrote: Show quoted text
> On 2018-06-23 10:19:25, SREZIC wrote:
> > With perl 5.28.0 (more precisely: since 5.27.7) the module does not > > compile anymore: > > > > ... > > cc -c -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe > > -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE > > -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -DVERSION=\"0.11\" > > -DXS_VERSION=\"0.11\" -fPIC "-I/opt/perl-5.28.0t/lib/5.28.0/x86_64- > > linux-thread-multi/CORE" Spawn.c > > In file included from /opt/perl-5.28.0t/lib/5.28.0/x86_64-linux- > > thread-multi/CORE/perl.h:2465:0, > > from Spawn.xs:4: > > Spawn.xs: In function 'do_posix_spawn_free': > > Spawn.xs:43:14: error: 'PL_Argv' undeclared (first use in this > > function) > > Safefree(PL_Argv); > > ^ > > ... > > > > More information in a related perl ticket: > > https://rt.perl.org/Ticket/Display.html?id=132777
> > With the following hack (possibly not reliable or not working with > threaded perls) it compile and passes the test suite: > > diff --git a/Spawn.xs b/Spawn.xs > index 7c35779..7054fb4 100644 > --- a/Spawn.xs > +++ b/Spawn.xs > @@ -13,6 +13,11 @@ > > extern char **environ; > > +#if PERL_VERSION > 27 || (PERL_VERSION == 27 && PERL_SUBVERSION >= 7) > +const char ** PL_Argv; > +char * PL_Cmd; > +#endif > + > Pid_t > do_posix_spawn (const char *cmd, char **argv) { > Pid_t pid; > > > > But actually it should make the same changes like in perl5 commit > 282fc0b3cc2439f69587d980b62bef7f5d5bdfef
Please see discussion in relevant bug ticket in Perl 5 bug queue: https://rt.perl.org/Ticket/Display.html?id=132777#txn-1652656 Thank you very much. Jim Keenan