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

Hi,

I have been trying to use the package Data::Printer, for that it asks for a dependency Package Hash::FileHash. In windows I installed the package with ppm so everything came out fine. But in case of Linux the make test dies with the following error.

"Can't load '~/Hash-FieldHash-0.12/blib/arch/auto/Hash/FieldHash/FieldHash.so' for module Hash::FieldHash: ~/Hash-FieldHash-0.12/blib/arch/auto/Hash/FieldHash/FieldHash.so: undefined symbol: SvIS_FREED at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230."

Kindly help me to proceed further. Thanks in advance

  • Comment on Problem while installing Hash::FileHash Pacakge in Linux

Replies are listed 'Best First'.
Re: Problem while installing Hash::FileHash Pacakge in Linux
by Corion (Patriarch) on Dec 13, 2011 at 13:50 UTC

    It seems that SvIS_FREED was introduced in 2005. Perl 5.8.5 was released in 2004, so it is unlikely that the module will work unmodified on your version of Perl.

    You can try to paste the definition of SvIS_FREED into your code in the hope of making this module compile, but I recommend switching to a more recent and supported version of Perl.

    Looking at the offending code, it only seems to be an assert() clause, so maybe you can just comment it out in the hope that everything goes well.

Re: Problem while installing Hash::FileHash Pacakge in Linux
by Anonymous Monk on Dec 13, 2011 at 14:23 UTC

    Hi

    Hash::FileHash isn't the same as Hash::FieldHash

    http://pass.cpantesters.org/distro/H/Hash-FieldHash.html
    says version 0.10 works on perl 5.8.5

    http://search.cpan.org/dist/Hash-FieldHash/Changes

    says nothing functional was changed, only tests/supporting utils

    http://search.cpan.org/diff?from=Hash-FieldHash-0.10&to=Hash-FieldHash-0.12

    supports what Changes says

    So you can install 0.10 for now with cpan GFUJI/Hash-FieldHash-0.10.tar.gz

    Or you can take Corion's advice, and copy/paste the definition of SvIS_FREED to compat58.h or compat58.xsi

    #define SvIS_FREED(sv) ((sv)->sv_flags == SVTYPEMASK)

    To find when it changed http://perl5.git.perl.org/perl.git?a=search&h=HEAD&st=free&s=SvIS_FREED

    To find what it is http://perl5.git.perl.org/perl.git?a=search&h=HEAD&st=grep&s=define%20SvIS_FREED

    You should forward a full bug report to GFUJI , or better yet a patch, I'm sure he'll want to improve compat58.h compat58.xsi

      Thanks Corion. I included the definiton in the file as said by Anonymous, it worked like a charm.