perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Hay <>
Subject Re: Compile errors with SVN revision 1733039 for unthreaded perl
Date Fri, 04 Mar 2016 08:42:59 GMT
On 2 March 2016 at 10:15, Klaus S. Madsen <> wrote:
> Hi,
> I'm looking into upgrading our perl version to 5.22.1. Since mod_perl 2.0.9
> doen't work with 5.22, I thought that it would be a good idea to test the
> SVN version of mod_perl.
> We compile our own perl, and we compile it without ithread support, which
> the new env-support doesn't appear to work with. I get the following compile
> errors:
> modperl_env.c: In function 'modperl_env_init':
> modperl_env.c:657:10: error: 'my_perl' undeclared (first use in this
> function)
> modperl_env.c:657:10: note: each undeclared identifier is reported only once
> for each function it appears in
> modperl_env.c: In function 'modperl_env_unload':
> modperl_env.c:688:10: error: 'my_perl' undeclared (first use in this
> function)
> As far as I can tell, this is because pTHX expands to define a my_perl
> parameter for modperl_env_init and modperl_env_unload if perl is compiled
> with ithreads support. However without ithreads support pTHX expands to
> nothing, causing the compile error.
> To fix this, I've tried to simply delete the if (!my_perl) tests in
> modperl_env_init and modperl_env_unload. I'm fairly sure that this is safe
> to do for modperl_env_unload, since it is only called from
> modperl_perl_destruct, which appears to have a perl interpreter instance.
> However I'm not so sure for modperl_env_init.
> Removing those two if-statements reveal that we should call
> modperl_env_unload with aTHX as the parameter in modperl_perl_descruct, so
> that the number of arguments is correct both with and without ithread
> support enabled.
> The attached patch makes both changes. Apply with -p0.
> I've tested this against our "home-compiled" perl 5.22 where it now compiles
> and passes the tests. I've also tried against the Ubuntu 12.04 supplied perl
> with ithreads support, which also compiles and passes all the tests.

Thanks, committed in r1733563.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message