ovedpo15 has asked for the wisdom of the Perl Monks concerning the following question:

So I'm trying to create a coverage report for my scripts but I get the following error:
Can't load '/usr/pkgs/perl/5.14.1/lib64/module/x86_64-linux/auto/Data/ +Dumper/Dumper.so' for module Data::Dumper: /usr/pkgs/perl/5.14.1/lib6 +4/module/x86_64-linux/auto/Data/Dumper/Dumper.so: undefined symbol: P +L_hints at /usr/pkgs/perl/5.26.1/lib64/5.26.1/XSLoader.pm line 96. at /usr/pkgs/perl/5.14.1/lib64/module/x86_64-linux/Data/Dumper.pm li +ne 36. Compilation failed in require at /disk/19.04.003/bin/script.pl line 13 +8. BEGIN failed--compilation aborted at /disk/19.04.003/bin/script.pl lin +e 138.
On line 36 of Dumper.pm the code is:
XSLoader::load( 'Data::Dumper' ) unless $Useperl;
And on line 96 of XSLoader.pm the code is:
# 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. my $libref = dl_load_file($file, 0) or do { require Carp; Carp::croak("Can't load '$file' for module $module: " . dl_error() +); };
The way I did the coverage report:
setenv PERL5LIB /disk/coverage/perl/lib setenv PERL5OPT -MDevel::Cover setenv DEVEL_COVER_DB_FORMAT JSON
How should I debug such issue? Where should I start?

Replies are listed 'Best First'.
Re: undefined symbol: PL_hints
by davido (Cardinal) on Oct 31, 2019 at 23:17 UTC
    • /usr/pkgs/perl/5.14.1/lib64/module/x86_64-linux/auto/Data/Dumper/Dumper­.so
    • /usr/pkgs/perl/5.26.1/lib64/5.26.1/XSLoader.pm

    Solve for that discrepancy first. 5.14 vs 5.26 is a long stretch of commits that could well have resulted in binary incompatibility in compiled libraries built from XS code. Which Perl version are you using? Why is that Perl version using libraries built out for a different Perl version?


    Dave

Re: undefined symbol: PL_hints
by stevieb (Canon) on Oct 31, 2019 at 23:38 UTC
    "So I'm trying to create a coverage report for my scripts"

    You're doing a tremendous job presenting the perceived problems, and that's great. Can we see the code that's triggering these issues?

    Look at how to hide information in code. What did you learn from there? A lot of the English language it appears.

    Since you've learned a lot with the language, you can explain what it is you want specifically.

Re: undefined symbol: PL_hints
by Anonymous Monk on Nov 01, 2019 at 08:29 UTC

    hi. fix your @INC you can't mix perl versions. 5.14 compiled modules can't load not-5.14 compiled modules

    And on line 96 of XSLoader.pm the code is

    why look inside if you can't fix it? Search the search