Re: undefined symbol modperl_xs_sv2request_rec
The next release of apreq will contain a package called APR::Request::Magic, for apps that are meant to be portable between cgi and mp2. What you've reported isn't a bug in apreq or mp2, it's a bug in how your app uses apreq. APR::Request::Apache2 shouldn't be used outside a running modperl server. If you change your code to use APR::Request::Magic, it'll work in both contexts. HTH - Original Message > From: Mark Hedges > To: modperl@perl.apache.org > Sent: Thu, February 3, 2011 4:06:59 PM > Subject: undefined symbol modperl_xs_sv2request_rec > > > A change in Module::Build recently brought it in line with > the behavior of ExtUtils::MakeMaker, which caused an error > to crop up in test cases that 'require_ok'. > > # Error: Can't load >'/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/APR/Request/Apache2/Apache2.so' > for module APR::Request::Apache2: >/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/APR/Request/Apache2/Apache2.so: > undefined symbol: modperl_xs_sv2request_rec at >/usr/lib/perl5/5.8.8/i386-linux-thread-multi/DynaLoader.pm line 230. > # at > /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Apache2/Request.pm >line 3 > # Compilation failed in require at >/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Apache2/Request.pm line > >3. > # BEGIN failed--compilation aborted at >/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Apache2/Request.pm line > >3. > > ... but only with `Build test` and not `prove -r t/`. > > This is because $ENV{PERL_DL_NONLAZY} is now always set by > Module::Build::Base when running the test suite, which makes > it try to resolve all undefined symbols. > > This only seems to happen in the test script trying to > 'require' packages that use Apache2::Request (libapreq2) but > people seem inclined to think it is a problem with mod_perl > and not apreq. > > mod_perl 2.0.4 6.el5, perl 5.8.8 32.el5_5.2 CentOS > > Any ideas? Thanks. --mark-- > > > -- Forwarded message -- > Date: Thu, 3 Feb 2011 01:02:16 -0500 > From: Michael G Schwern via RT > To: mar...@cpan.org > Subject: Re: [rt.cpan.org #65382] > > https://rt.cpan.org/Ticket/Display.html?id=65382 > > > If that fixes it then you're likely papering over an error. > > perlrun explains PERL_DL_NONLAZY and why you'd set it to true for tests. > > PERL_DL_NONLAZY > Set to one to have perl resolve all undefined symbols when > it loads a dynamic library. The default behaviour is to > resolve symbols when they are used. Setting this variable > is useful during testing of extensions as it ensures that > you get an error on misspelled function names even if the > test suite doesn't call it. > > So the test is trying to tell you that modperl_xs_sv2request_rec is not > defined in your shared library. > > Also, `prove -I blib` is not correct. You want `prove -b` which will pull in > blib/lib and blib/arch. > > > On 2011.2.3 9:08 AM, Mark Hedges via RT wrote: > > It looks like this is the problem, or at least, this fixes it for me. > > Why does do_tests() need to explicitly set this? --m-- > > > > --- /usr/lib/perl5/site_perl/5.8.8/Module/Build/Base.pm.orig 2011-02-02 > > 15:04:07.0 -0800 > > +++ /usr/lib/perl5/site_perl/5.8.8/Module/Build/Base.pm 2011-02-02 > > 15:07:21.0 -0800 > > @@ -2667,8 +2667,6 @@ > > > >my $tests = $self->find_test_files; > > > > - local $ENV{PERL_DL_NONLAZY} = 1; > > - > >if(@$tests) { > > my $args = $self->tap_harness_args; > > if($self->use_tap_harness or ($args and %$args)) { > > > > -- > 10. Not allowed to purchase anyone's soul on government time. > -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army >http://skippyslist.com/list/ > >
Re: undefined symbol modperl_xs_sv2request_rec
Can you post the code and the httpd conf? On Wed, Feb 2, 2011 at 10:28 PM, Mark Hedges wrote: > > A change in Module::Build recently brought it in line with > the behavior of ExtUtils::MakeMaker, which caused an error > to crop up in test cases: > > # Error: Can't load > '/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/APR/Request/Apache2/Apache2.so' > for module APR::Request::Apache2: > /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/APR/Request/Apache2/Apache2.so: > undefined symbol: modperl_xs_sv2request_rec at > /usr/lib/perl5/5.8.8/i386-linux-thread-multi/DynaLoader.pm line 230. > # at > /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Apache2/Request.pm > line 3 > # Compilation failed in require at > /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Apache2/Request.pm > line 3. > # BEGIN failed--compilation aborted at > /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Apache2/Request.pm > line 3. > > ... but only with `Build test` and not `prove -r t/`. > > This is because $ENV{PERL_DL_NONLAZY} is now always set by > Module::Build::Base when running the test suite, which makes > it try to resolve all undefined symbols. > > This only seems to happen in the test script trying to 'require' > packages that use Apache2::Request (libapreq2) but people seem > inclined to think it is a problem with mod_perl and not apreq. > > Any ideas? Thanks. --mark-- > > > -- Forwarded message -- > Date: Thu, 3 Feb 2011 01:02:16 -0500 > From: Michael G Schwern via RT > To: mar...@cpan.org > Subject: Re: [rt.cpan.org #65382] > > https://rt.cpan.org/Ticket/Display.html?id=65382 > > > If that fixes it then you're likely papering over an error. > > perlrun explains PERL_DL_NONLAZY and why you'd set it to true for tests. > > PERL_DL_NONLAZY > Set to one to have perl resolve all undefined symbols when > it loads a dynamic library. The default behaviour is to > resolve symbols when they are used. Setting this variable > is useful during testing of extensions as it ensures that > you get an error on misspelled function names even if the > test suite doesn't call it. > > So the test is trying to tell you that modperl_xs_sv2request_rec is not > defined in your shared library. > > Also, `prove -I blib` is not correct. You want `prove -b` which will pull in > blib/lib and blib/arch. > > > On 2011.2.3 9:08 AM, Mark Hedges via RT wrote: >> It looks like this is the problem, or at least, this fixes it for me. >> Why does do_tests() need to explicitly set this? --m-- >> >> --- /usr/lib/perl5/site_perl/5.8.8/Module/Build/Base.pm.orig 2011-02-02 >> 15:04:07.0 -0800 >> +++ /usr/lib/perl5/site_perl/5.8.8/Module/Build/Base.pm 2011-02-02 >> 15:07:21.0 -0800 >> @@ -2667,8 +2667,6 @@ >> >> my $tests = $self->find_test_files; >> >> - local $ENV{PERL_DL_NONLAZY} = 1; >> - >> if(@$tests) { >> my $args = $self->tap_harness_args; >> if($self->use_tap_harness or ($args and %$args)) { > > > > -- > 10. Not allowed to purchase anyone's soul on government time. > -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army > http://skippyslist.com/list/ > >
Re: undefined symbol modperl_xs_sv2request_rec
On Wed, 2 Feb 2011, Mark Hedges wrote: > > A change in Module::Build recently brought it in line with > the behavior of ExtUtils::MakeMaker, which caused an error > to crop up in test cases: > > # Error: Can't load > '/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/APR/Request/Apache2/Apache2.so' > for module APR::Request::Apache2: > /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/APR/Request/Apache2/Apache2.so: > undefined symbol: modperl_xs_sv2request_rec at > /usr/lib/perl5/5.8.8/i386-linux-thread-multi/DynaLoader.pm line 230. BTW mod_perl 2.0.4 6.el5, perl 5.8.8 32.el5_5.2 CentOS --m--
undefined symbol modperl_xs_sv2request_rec
A change in Module::Build recently brought it in line with the behavior of ExtUtils::MakeMaker, which caused an error to crop up in test cases: # Error: Can't load '/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/APR/Request/Apache2/Apache2.so' for module APR::Request::Apache2: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/APR/Request/Apache2/Apache2.so: undefined symbol: modperl_xs_sv2request_rec at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/DynaLoader.pm line 230. # at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Apache2/Request.pm line 3 # Compilation failed in require at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Apache2/Request.pm line 3. # BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Apache2/Request.pm line 3. ... but only with `Build test` and not `prove -r t/`. This is because $ENV{PERL_DL_NONLAZY} is now always set by Module::Build::Base when running the test suite, which makes it try to resolve all undefined symbols. This only seems to happen in the test script trying to 'require' packages that use Apache2::Request (libapreq2) but people seem inclined to think it is a problem with mod_perl and not apreq. Any ideas? Thanks. --mark-- -- Forwarded message -- Date: Thu, 3 Feb 2011 01:02:16 -0500 From: Michael G Schwern via RT To: mar...@cpan.org Subject: Re: [rt.cpan.org #65382] https://rt.cpan.org/Ticket/Display.html?id=65382 > If that fixes it then you're likely papering over an error. perlrun explains PERL_DL_NONLAZY and why you'd set it to true for tests. PERL_DL_NONLAZY Set to one to have perl resolve all undefined symbols when it loads a dynamic library. The default behaviour is to resolve symbols when they are used. Setting this variable is useful during testing of extensions as it ensures that you get an error on misspelled function names even if the test suite doesn't call it. So the test is trying to tell you that modperl_xs_sv2request_rec is not defined in your shared library. Also, `prove -I blib` is not correct. You want `prove -b` which will pull in blib/lib and blib/arch. On 2011.2.3 9:08 AM, Mark Hedges via RT wrote: > It looks like this is the problem, or at least, this fixes it for me. > Why does do_tests() need to explicitly set this? --m-- > > --- /usr/lib/perl5/site_perl/5.8.8/Module/Build/Base.pm.orig 2011-02-02 > 15:04:07.0 -0800 > +++ /usr/lib/perl5/site_perl/5.8.8/Module/Build/Base.pm 2011-02-02 > 15:07:21.0 -0800 > @@ -2667,8 +2667,6 @@ > >my $tests = $self->find_test_files; > > - local $ENV{PERL_DL_NONLAZY} = 1; > - >if(@$tests) { > my $args = $self->tap_harness_args; > if($self->use_tap_harness or ($args and %$args)) { -- 10. Not allowed to purchase anyone's soul on government time. -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army http://skippyslist.com/list/
undefined symbol modperl_xs_sv2request_rec
A change in Module::Build recently brought it in line with the behavior of ExtUtils::MakeMaker, which caused an error to crop up in test cases that 'require_ok'. # Error: Can't load '/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/APR/Request/Apache2/Apache2.so' for module APR::Request::Apache2: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/APR/Request/Apache2/Apache2.so: undefined symbol: modperl_xs_sv2request_rec at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/DynaLoader.pm line 230. # at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Apache2/Request.pm line 3 # Compilation failed in require at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Apache2/Request.pm line 3. # BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Apache2/Request.pm line 3. ... but only with `Build test` and not `prove -r t/`. This is because $ENV{PERL_DL_NONLAZY} is now always set by Module::Build::Base when running the test suite, which makes it try to resolve all undefined symbols. This only seems to happen in the test script trying to 'require' packages that use Apache2::Request (libapreq2) but people seem inclined to think it is a problem with mod_perl and not apreq. mod_perl 2.0.4 6.el5, perl 5.8.8 32.el5_5.2 CentOS Any ideas? Thanks. --mark-- -- Forwarded message -- Date: Thu, 3 Feb 2011 01:02:16 -0500 From: Michael G Schwern via RT To: mar...@cpan.org Subject: Re: [rt.cpan.org #65382] https://rt.cpan.org/Ticket/Display.html?id=65382 > If that fixes it then you're likely papering over an error. perlrun explains PERL_DL_NONLAZY and why you'd set it to true for tests. PERL_DL_NONLAZY Set to one to have perl resolve all undefined symbols when it loads a dynamic library. The default behaviour is to resolve symbols when they are used. Setting this variable is useful during testing of extensions as it ensures that you get an error on misspelled function names even if the test suite doesn't call it. So the test is trying to tell you that modperl_xs_sv2request_rec is not defined in your shared library. Also, `prove -I blib` is not correct. You want `prove -b` which will pull in blib/lib and blib/arch. On 2011.2.3 9:08 AM, Mark Hedges via RT wrote: > It looks like this is the problem, or at least, this fixes it for me. > Why does do_tests() need to explicitly set this? --m-- > > --- /usr/lib/perl5/site_perl/5.8.8/Module/Build/Base.pm.orig 2011-02-02 > 15:04:07.0 -0800 > +++ /usr/lib/perl5/site_perl/5.8.8/Module/Build/Base.pm 2011-02-02 > 15:07:21.0 -0800 > @@ -2667,8 +2667,6 @@ > >my $tests = $self->find_test_files; > > - local $ENV{PERL_DL_NONLAZY} = 1; > - >if(@$tests) { > my $args = $self->tap_harness_args; > if($self->use_tap_harness or ($args and %$args)) { -- 10. Not allowed to purchase anyone's soul on government time. -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army http://skippyslist.com/list/