I have a project which uses a number of XS modules; this is something I developed over a few years and released publicly, but have never considered it to be of much interest to others: http://perl-sloop.net/; I just wanted to see it through from start to a particular finish. I do think it's the greatest thing since sliced bread and use it wherever I need a web server (including that site), but all this is mostly besides the point.

By far the most unpleasant part of that experience was creating portable packages for the XS modules, which mostly ended up as an adventure in cargo-cult style reliance on ExtUtils::MakeMaker with simple Makefile.PL's like this:

use 5.010000; use ExtUtils::MakeMaker; WriteMakefile ( NAME => 'Sloop::Socket::Standard', VERSION_FROM => 'lib/Sloop/Socket/Standard.pm', MIN_PERL_VERSION => 5.10.0, CCFLAGS => '-Wall -g -O2 --std=gnu99', INC => '-I.', NO_META => 1, NO_MYMETA => 1 );

And a version of ppport.h that I created or copied from somewhere at some point.

Anyway, that's the backstory, here's the problem: I recently installed this on an ARMv6 machine (Raspberry Pi) running a version of Debian 8. I've had Pi's almost as long as I've had Sloop, and never had a problem using the tarball from my website to install it. Same thing this time.

However, for unrelated reasons, the system had to be upgraded to Debian "stretch"/testing, aka., what will be Debian 9, which upgraded perl from 5.20.2 to 5.22.1, and I had to then rebuild Sloop.

The modules build, then they're installed before testing because some of the tests are circular and/or a bit of laziness is involved at this point (not a big concern since, as mentioned, this is not a project I've ever expected anyone else to take interest in). Unfortunately, what then happens when I go run the tests is:

Lib.c: loadable library and perl binaries are mismatched (got handshak +e key 0x9200080, needed 0x9400080)

Note the "Lib.c" here presumably refers to part of the Sloop::Lib module. This happens nearly right away, before any of the actual .t tests are ran, when a check is done by the installer:

eval { load Sloop::Client };

Sloop::Client is pure perl but makes use of Sloop::Lib, which has XS bits, and this is the first point where those are needed.

Any other similar test/example requiring the compiled XS code produces the same problem. Note, with a bit of re-iteration:

Where do I start diagnosing this problem? I am very willing to abandon ExtUtils::MakeMaker and use some other method -- I really don't care.


In reply to "loadable library" mismatch on new installation by halfcountplus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.