On Tue, Apr 6, 2010 at 11:01 AM, David E. Wheeler <da...@kineticode.com> wrote: > Sorry, meant to have this thread on dev originally. Reposting. > > On Apr 5, 2010, at 6:20 PM, Fred Moyer wrote: > >> Builds ok here on OS X 10.6.3 (tests don't start yet though). Wonder >> what the difference in our setups > > Okay, Fred and I have been hacking on this for a few hours, and thanks to a > tip from Stefan O'Rear on #p5p, we've been able to trace the basic problem. > > I can get mod_perl2 to build with Perl configured with: > > sh Configure -des -Duseshrplib > > Or > > sh Configure -des -Duseshrplib -Dusemultiplicity -Duseithreads > > But not > > sh Configure -des -Duseshrplib -Dusemultiplicity > > That is, mod_perl will build with both multiplicity and ithreads or with > neither, but not with multiplicity only. With multiplicity-only, I get: > > mod_perl.c: In function ‘modperl_shutdown’: > mod_perl.c:62: error: ‘my_perl’ undeclared (first use in this function) > mod_perl.c:62: error: (Each undeclared identifier is reported only once > mod_perl.c:62: error: for each function it appears in.) > > Fred says this is the relevant code: > > #ifndef USE_ITHREADS > static apr_status_t modperl_shutdown(void *data) > { > modperl_cleanup_data_t *cdata = (modperl_cleanup_data_t *)data; > PerlInterpreter *perl = (PerlInterpreter *)cdata->data; > void **handles; > > handles = modperl_xs_dl_handles_get(aTHX); > > And what Stefan says is: “you need to change your function declaration from > ...(void *arg) to ...(pTHX_ void *arg)”. > > I believe Fred managed to get past some of these errors by doing something > like this. Fred, can you confirm?
Perhaps, but I'm still understanding the implications of the code changes I'm making. Here's one: Index: src/modules/perl/mod_perl.c =================================================================== --- src/modules/perl/mod_perl.c (revision 930926) +++ src/modules/perl/mod_perl.c (working copy) @@ -53,7 +53,7 @@ } #ifndef USE_ITHREADS -static apr_status_t modperl_shutdown(void *data) +static apr_status_t modperl_shutdown(pTHX_ void *data) > > So there you have it. If you build perl with > > sh Configure -des -Duseshrplib -Dusemultiplicity > > and build mod_perl 2 against that, you should be able to replicate this issue. > > Anyone familiar with this stuff and able to fix? I'd love to see mod_perl > 2.05 drop when Perl 5.12.0 final drops (next week, I believe). > > Thanks, > > David > > PS: I think the apreq stuff needs to be hit with the same multiplicity > cluestick -- anyone know that code? > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@perl.apache.org > For additional commands, e-mail: dev-h...@perl.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@perl.apache.org For additional commands, e-mail: dev-h...@perl.apache.org