Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Perl API version v5.18.0 of ... does not match v5.16.0 ...

by Nightgem (Initiate)
on Jul 21, 2016 at 09:18 UTC ( #1168214=perlquestion: print w/replies, xml ) Need Help??

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

Hi!

I'm having trouble getting a Perl module (File::Sync) to work:
perl -e "use File::Sync" Perl API version v5.18.0 of File::Sync does not match v5.16.0 at /usr/ +lib64/perl5/DynaLoader.pm line 213. Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1.

The Perl version installed on the system is v5.16.3, built for x86_64-linux-thread-multi. I was wondering if anyone here could point me in the right direction to get this fixed and working properly. The File::Sync module was installed using cpanm.

Thanks!

Replies are listed 'Best First'.
Re: Perl API version v5.18.0 of ... does not match v5.16.0 ...
by kcott (Bishop) on Jul 21, 2016 at 10:01 UTC

    G'day Nightgem,

    Welcome to the Monastery.

    Firstly, you can search for errors in perldiag. In this case you'll find:

    Perl API version %s of %s does not match %s

    (F) The XS module in question was compiled against a different incompatible version of Perl than the one that has loaded the XS module.

    So, the fix would be to install File::Sync using the same version of Perl that you want to 'use File::Sync'.

    I did a couple of tests and there doesn't appear to be anything intrinsically wrong with installing or loading this module.

    Using my current perl:

    $ perl -v ... (v5.24.0) built for darwin-thread-multi-2level ... $ cpan cpan[1]> install File::Sync ... BRIANSKI/File-Sync-0.11.tar.gz /usr/bin/make install -- OK cpan[2]> q Lockfile removed. $ perl -e 'use File::Sync' $

    After changing to the oldest perl version I have (with perlbrew):

    $ perl -v ... (v5.14.2) built for darwin-thread-multi-2level ... $ cpan cpan[1]> install File::Sync ... BRIANSKI/File-Sync-0.11.tar.gz /usr/bin/make install -- OK cpan[2]> q Lockfile removed. $ perl -e 'use File::Sync' $

    — Ken

Re: Perl API version v5.18.0 of ... does not match v5.16.0 ...
by marto (Archbishop) on Jul 21, 2016 at 09:38 UTC

    I've seen similar things caused by botched OS upgrades. Have you upgraded your OS recently, or changed your perl install?

      The cluster has been set up for us recently by another party... We have not changed the perl verison since we began using it.

      Is there a way we can fix this?

        File::Sync is an XS module, changing versions of perl means that such modules are not binary compatible and must be recompiled. You can't copy these things between different versions of perl, that won't work. Did you build modules in another system running a different version of perl and copy them over to this cluster? It looks like File::Sync was built with v5.18. If your supplier maintains the clusters perhaps they've changed something. In the past I've seen OS upgrades cause problems when bumping perl versions. To resolve try a manual build of the module.

Re: Perl API version v5.18.0 of ... does not match v5.16.0 ...
by Nightgem (Initiate) on Jul 22, 2016 at 11:32 UTC

    Thanks to all for your input, we have solved the issue by building a docker for the process and bypassing the issue until the sys admins can sort it out :)

      An alternative would be to install your own perl for your application elsewhere on the system, you'd be safe from any OS upgrade shenanigans. INSTALL.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1168214]
Approved by Erez
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2019-06-26 17:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Is there a future for codeless software?



    Results (110 votes). Check out past polls.

    Notices?