Thanks again Rob for your help and interest!

I added the line you suggested to DynaLoader.pm (I guess you meant lines
212 and 213). Below is the output of 'make test'.  In the interim I
realized that NetCDF has a new verion: 4.3, and updated it. The problem
persists though.

I am very busy this week so I will probably not have time to investigate
this further. I will report back when I find something. Thanks for your
help.

Hernán


PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01-Netcdf3.t .. 1/52
#   Failed test 'use PDL;'
#   at t/01-Netcdf3.t line 6.
#     Tried to use 'PDL'.
#     Error:  Unrecognized character \xE2; marked by <-- HERE after warn
<-- HERE near column 6 at
/usr/lib/perl5/5.16.2/i586-linux-thread-multi/DynaLoader.pm line 212.
# Compilation failed in require at Basic/Core/Core.pm.PL (i.e.
PDL::Core.pm) line 315.
# BEGIN failed--compilation aborted at Basic/Core/Core.pm.PL (i.e.
PDL::Core.pm) line 315.
# Compilation failed in require at (eval 6) line 6.
# BEGIN failed--compilation aborted at (eval 6) line 6.
# BEGIN failed--compilation aborted at (eval 5) line 2.

#   Failed test 'use PDL::NetCDF;'
#   at t/01-Netcdf3.t line 7.
#     Tried to use 'PDL::NetCDF'.
#     Error:  Attempt to reload PDL/Core.pm aborted.
# Compilation failed in require at
/root/.cpan/build/PDL-NetCDF-4.17-5KE3nB/blib/lib/PDL/NetCDF.pm line 10.
# BEGIN failed--compilation aborted at
/root/.cpan/build/PDL-NetCDF-4.17-5KE3nB/blib/lib/PDL/NetCDF.pm line 10.
# Compilation failed in require at (eval 7) line 2.
# BEGIN failed--compilation aborted at (eval 7) line 2.

#   Failed test 'use PDL::Char;'
#   at t/01-Netcdf3.t line 8.
#     Tried to use 'PDL::Char'.
#     Error:  Attempt to reload PDL/Core.pm aborted.
# Compilation failed in require at (eval 9) line 6.
# BEGIN failed--compilation aborted at (eval 9) line 6.
# BEGIN failed--compilation aborted at (eval 8) line 2.
Number found where operator expected at t/01-Netcdf3.t line 52, near "pdl 1"
    (Do you need to predeclare pdl?)
Variable "$pdl" is not imported at t/01-Netcdf3.t line 105.
syntax error at t/01-Netcdf3.t line 25, near "pdl ["
Global symbol "$in1" requires explicit package name at t/01-Netcdf3.t line
26.
syntax error at t/01-Netcdf3.t line 52, near "pdl 1"
Global symbol "$in3" requires explicit package name at t/01-Netcdf3.t line
53.
syntax error at t/01-Netcdf3.t line 61, near "pdl ["
Global symbol "$in2" requires explicit package name at t/01-Netcdf3.t line
62.
syntax error at t/01-Netcdf3.t line 104, near "pdl ["
Global symbol "$pdl" requires explicit package name at t/01-Netcdf3.t line
105.
syntax error at t/01-Netcdf3.t line 114, near "pdl ["
Global symbol "$attin" requires explicit package name at t/01-Netcdf3.t
line 115.
syntax error at t/01-Netcdf3.t line 117, near "long ["
t/01-Netcdf3.t has too many errors.
# Looks like you planned 52 tests but ran 3.
# Looks like you failed 3 tests of 3 run.
# Looks like your test exited with 2 just after 3.
t/01-Netcdf3.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 52/52 subtests
t/02-Netcdf4.t .. Unrecognized character \xE2; marked by <-- HERE after
warn <-- HERE near column 6 at
/usr/lib/perl5/5.16.2/i586-linux-thread-multi/DynaLoader.pm line 212.
Compilation failed in require at Basic/Core/Core.pm.PL (i.e. PDL::Core.pm)
line 315.
BEGIN failed--compilation aborted at Basic/Core/Core.pm.PL (i.e.
PDL::Core.pm) line 315.
Compilation failed in require at
/usr/lib/perl5/site_perl/5.16.2/i586-linux-thread-multi/PDL/Lite.pm line 38.
BEGIN failed--compilation aborted at
/usr/lib/perl5/site_perl/5.16.2/i586-linux-thread-multi/PDL/Lite.pm line 38.
Compilation failed in require at t/02-Netcdf4.t line 6.
BEGIN failed--compilation aborted at t/02-Netcdf4.t line 6.
# Looks like your test exited with 255 before it could output anything.
t/02-Netcdf4.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 21/21 subtests

Test Summary Report
-------------------
t/01-Netcdf3.t (Wstat: 512 Tests: 3 Failed: 3)
  Failed tests:  1-3
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 52 tests but ran 3.
t/02-Netcdf4.t (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 21 tests but ran 0.
Files=2, Tests=3,  1 wallclock secs ( 0.03 usr  0.01 sys +  0.09 cusr  0.01
csys =  0.14 CPU)
Result: FAIL
Failed 2/2 test programs. 3/3 subtests failed.
make: *** [test_dynamic] Error 255



2013/9/15 <[email protected]>

>   Hi Hernan,
>
> Well ... it was never going to actually be a solution anyway. We would
> still want to find out why the behaviour was occurring :-)
>
> I’ve just checked, and I’m running the same version of netcdf as you are
> (4.2.1.1). And PDL::NetCDF built fine for me (on MS Windows).
>
> It’s probably not a good idea to be messing with the contents of
> DynaLoader.pm, but that’s exactly what I’d do if I was getting that error.
> Line 122 of DynaLoader.pm is currently a blank line. I would change it to:
>
> warn “\n\$xs: $xs\n”;
>
> If it’s not a coderef, let’s try and find out what the hell it is !
>
> Be aware that the error message could be bogus. Just a few lines before
> line 123 in DynaLoader.pm we find the following comments:
>
> # Many dynamic extension loading problems will appear to come from
> # this section of code: XYZ failed at line 123 of DynaLoader.pm.
> # Often these errors are actually occurring in the initialisation
> # C code of the extension XS file. Perl reports the error as being
> # in this perl code simply because this was the last perl code
> # it executed.
>
> However, I think this one might just turn out to be legitimate.
>
> Cheers,
> Rob
>
>   *From:* Hernán De Angelis <[email protected]>
> *Sent:* Sunday, September 15, 2013 10:31 PM
> *To:* [email protected]
> *Cc:* [email protected]
> *Subject:* Re: [Perldl] PDL::NetCDF problem "Not a CODE reference..."
>    Rob, thanks for the answer and the suggested solution.
>
> Unfortunately it did not work. I get the same messages as when running
> "make test":
>
> PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
> "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
> t/01-Netcdf3.t .. 1/52
> #   Failed test 'use PDL::NetCDF;'
> #   at t/01-Netcdf3.t line 7.
> #     Tried to use 'PDL::NetCDF'.
> #     Error:  Not a CODE reference at
> /usr/lib/perl5/5.16.2/i586-linux-thread-multi/DynaLoader.pm line 213.
> # END failed--call queue aborted at
> /root/.cpan/build/PDL-NetCDF-4.17-V_3ZUS/blib/lib/PDL/NetCDF.pm line 213.
> # Compilation failed in require at (eval 42) line 2.
> # BEGIN failed--compilation aborted at (eval 42) line 2.
> Use of uninitialized value in subroutine entry at
> /root/.cpan/build/PDL-NetCDF-4.17-V_3ZUS/blib/lib/PDL/NetCDF.pm line 1380.
> put:  Cannot define variable -- NetCDF: Not a valid data type or
> _FillValue type mismatch at t/01-Netcdf3.t line 26.
> # Looks like you planned 52 tests but ran 5.
> # Looks like you failed 1 test of 5 run.
> # Looks like your test exited with 2 just after 5.
> t/01-Netcdf3.t .. Dubious, test returned 2 (wstat 512, 0x200)
> Failed 48/52 subtests
> t/02-Netcdf4.t .. 1/21
> #   Failed test 'use PDL::NetCDF;'
> #   at t/02-Netcdf4.t line 8.
> #     Tried to use 'PDL::NetCDF'.
> #     Error:  Not a CODE reference at
> /usr/lib/perl5/5.16.2/i586-linux-thread-multi/DynaLoader.pm line 213.
> # END failed--call queue aborted at
> /root/.cpan/build/PDL-NetCDF-4.17-V_3ZUS/blib/lib/PDL/NetCDF.pm line 213.
> # Compilation failed in require at (eval 29) line 2.
> # BEGIN failed--compilation aborted at (eval 29) line 2.
> Use of uninitialized value in subroutine entry at
> /root/.cpan/build/PDL-NetCDF-4.17-V_3ZUS/blib/lib/PDL/NetCDF.pm line 1380.
> put:  Cannot define variable -- NetCDF: Not a valid data type or
> _FillValue type mismatch at t/02-Netcdf4.t line 40.
> # Looks like you planned 21 tests but ran 14.
> # Looks like you failed 1 test of 14 run.
> # Looks like your test exited with 2 just after 14.
> t/02-Netcdf4.t .. Dubious, test returned 2 (wstat 512, 0x200)
> Failed 8/21 subtests
>
> Test Summary Report
> -------------------
> t/01-Netcdf3.t (Wstat: 512 Tests: 5 Failed: 1)
>   Failed test:  2
>   Non-zero exit status: 2
>   Parse errors: Bad plan.  You planned 52 tests but ran 5.
> t/02-Netcdf4.t (Wstat: 512 Tests: 14 Failed: 1)
>   Failed test:  1
>   Non-zero exit status: 2
>   Parse errors: Bad plan.  You planned 21 tests but ran 14.
> Files=2, Tests=19,  0 wallclock secs ( 0.03 usr  0.01 sys +  0.39 cusr
> 0.04 csys =  0.47 CPU)
> Result: FAIL
> Failed 2/2 test programs. 2/19 subtests failed.
> make: *** [test_dynamic] Error 2
>
>
> I keep searching for a solution. No ideas yet ....
>
> Hernán
>
>
>
>
> 2013/9/15 <[email protected]>
>
>>
>> From: Hernán De Angelis
>>
>>
>> I repeatedly get the following error during test:
>>>
>>> Error:  Not a CODE reference at /usr/lib/perl5/5.16.2/i586-**
>>> linux-thread-multi/DynaLoader.**pm line 213.
>>>
>>
>> Try running the test script as:
>>
>> perl -Mblib t/scriptname.t
>>
>> DynaLoader.pm line 213 (perl-5.16.0) was throwing up a warning for me in
>> a test suite I was running just yesterday. When I ran the particular test
>> file as 'perl -Mblib t/script.t' the warning went away.
>>
>> I'm wondering whether the same approach will make your error go away.
>>
>> Cheers,
>> Rob
>>
>>
>>
>
>
> --
> Hernán De Angelis
> http://talesoficeandstone.blogspot.se/
>
>


-- 
Hernán De Angelis
http://talesoficeandstone.blogspot.se/
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to