Re: undefined symbol modperl_xs_sv2request_rec

Fred Moyer <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
Can you post the code and the httpd conf?

On Wed, Feb 2, 2011 at 10:28 PM, Mark Hedges <[email protected]> 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 <[email protected]>
> To: [email protected]
> Subject: Re: [rt.cpan.org #65382]
>
> <URL: 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.000000000 -0800
>> +++ /usr/lib/perl5/site_perl/5.8.8/Module/Build/Base.pm       2011-02-02
>> 15:07:21.000000000 -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/
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.