http://qs321.pair.com?node_id=11120282


in reply to Re^7: XS.c: loadable library and perl binaries are mismatched (got handshake key 0xc100000, needed 0xc180000)
in thread XS.c: loadable library and perl binaries are mismatched (got handshake key 0xc100000, needed 0xc180000)

P.S. I think you should also send a message to syphilis too about this last error.

Which error is that ?

I don't understand how it happens that the XS module Test::LeakTrace is fine for the OP, but the XS module List::MoreUtils::XS is not.
I keep thinking that should be giving us a clue ... but I don't see any clues.
I compared the way both modules built on the OP's perl-5.30.3 and both build in essentially the same way. In the (below) copy'n'paste, the first line of each pair of lines is from the Test::LeakTrace build, the second line is from the List::MoreUtils::XS build:
Running Mkbootstrap for LeakTrace () Running Mkbootstrap for XS () chmod 644 "LeakTrace.bs" chmod 644 "XS.bs" "/home/rg8239/perl/bin/perl" "-Iinc" -MExtUtils::Command::MM -e 'cp_no +nempty' -- LeakTrace.bs blib/arch/auto/Test/LeakTrace/LeakTrace.bs 64 +4 "/home/rg8239/perl/bin/perl" -MExtUtils::Command::MM -e 'cp_no +nempty' -- XS.bs blib/arch/auto/List/MoreUtils/XS/XS.bs 644 "/home/rg8239/perl/bin/perl" "-Iinc" "/home/rg8239/perl/lib/5.30.3/Ext +Utils/xsubpp" -typemap '/home/rg8239/perl/lib/5.30.3/ExtUtils/typema +p' LeakTrace.xs > LeakTrace.xsc "/home/rg8239/perl/bin/perl" "/home/rg8239/perl/lib/5.30.3/Ext +Utils/xsubpp" -typemap '/home/rg8239/perl/lib/5.30.3/ExtUtils/typema +p' XS.xs > XS.xsc mv LeakTrace.xsc LeakTrace.c mv XS.xsc XS.c gcc -c -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFI +LE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.16\" -DXS_VERSI +ON=\"0.16\" -fPIC "-I/home/rg8239/perl/lib/5.30.3/x86_64-linux/CORE" + LeakTrace.c gcc -c -I. -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFI +LE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.428\" -DXS_VERSI +ON=\"0.428\" -fPIC "-I/home/rg8239/perl/lib/5.30.3/x86_64-linux/CORE" + XS.c rm -f blib/arch/auto/Test/LeakTrace/LeakTrace.so rm -f blib/arch/auto/List/MoreUtils/XS/XS.so gcc -shared -O2 -L/usr/local/lib LeakTrace.o -o blib/arch/auto/Test +/LeakTrace/LeakTrace.so \ gcc -shared -O2 -L/usr/local/lib XS.o -o blib/arch/auto/List +/MoreUtils/XS/XS.so \ \ \ chmod 755 blib/arch/auto/Test/LeakTrace/LeakTrace.so chmod 755 blib/arch/auto/List/MoreUtils/XS/XS.so Manifying 3 pod documents Manifying 1 pod document LEEJO/Test-LeakTrace-0.16.tar.gz REHSACK/List-MoreUtils-XS-0.428.tar.gz /usr/bin/make -- OK /usr/bin/make -- OK
In both cases we see the same process, and the same flags - yet one results in a runtime mismatch and the other doesn't.
The L::MU::XS build inserts a -I. in a couple of spots (needed to load headers that are located in the L::MU::XS top-level source directory), and the T::LT build inserts a "-Iinc" in a couple of spots - but I don't see anything telling in those minor differences.
And, apart from those 2 minor discrepancies, the builds are identical.
How can one module incur a mismatch, and the other not ?

Cheers,
Rob
  • Comment on Re^8: XS.c: loadable library and perl binaries are mismatched (got handshake key 0xc100000, needed 0xc180000)
  • Select or Download Code

Replies are listed 'Best First'.
Re^9: XS.c: loadable library and perl binaries are mismatched (got handshake key 0xc100000, needed 0xc180000)
by bliako (Monsignor) on Aug 04, 2020 at 15:49 UTC

      I will delete the perl and start over again after ensuring there are no environment variables that pertain to perl things (anything else I should consider there?)

      BTW, the messed up XS.c I posted the other day was due to a posting length limitation on this site. The site truncated the lion's share of the module and my closing code tag as well. FWIW, I edited that post to enter as much as I could without truncation. Sadly, the "preview" tool gives no indication of the truncation, so it all looked pretty rosy to me when I submitted it. Lesson learned

      Also, I just want you all to know how much I appreciate the time you are taking to help me out and, hopefully, others will be able to learn from this

      Rick

      One more thing... I'll be out for the remainder of the week and will pick this back up Monday

        BTW, the messed up XS.c I posted the other day was due to a posting length limitation on this site

        Bummer ... and the file is also too big for the public scratchpad, too. (I guess it's the same limit.)
        I'll msg you my email address, and you can send the file over if you like. (I still wouldn't mind seeing what, if any, difference exists.)

        Cheers,
        Rob

        One more thing to check perhaps is to create a fresh new user which also uses perlbrew and see if that makes a difference, i.e. if it's something in your current user settings / leftover libraries. Linux tip: if you manage to find a place to deposit large files with the output, then you can use the command script outfile.txt to capture all output including what you type at the ecommand line. When you are done, type exit and publish "outfile.txt" to say googledocs

        the messed up XS.c I posted the other day was due to a posting length limitation on this site.

        I'm about to post a discussion regarding the misleading preview of large posts. Thanks for bringing this to my attention.

        If you really need to post such large sections then your 2 main options are either to use an off-site location (like a pastebin or a Gitlab snippet or your own site, even) and link to that or else the old favourite of gzip and uuencode.

        (massive temporary code section removed) and the discussion is now here.

        I removed perlbrew and made certain I had no offensive environment variables before reinstalling it.

        After reinstallation, I loaded up cpanm and tried first an XS module I have historically had no issues with (JSON::XS); then List::MoreUtils...

        gcp4al16:rg8239$ which cpanm ~/perl5/perlbrew/bin/cpanm gcp4al16:rg8239$ cpanm JSON::XS --> Working on JSON::XS Fetching http://www.cpan.org/authors/id/M/ML/MLEHMANN/JSON-XS-4.02.tar +.gz ... OK ==> Found dependencies: Canary::Stability --> Working on Canary::Stability Fetching http://www.cpan.org/authors/id/M/ML/MLEHMANN/Canary-Stability +-2013.tar.gz ... OK Configuring Canary-Stability-2013 ... OK Building and testing Canary-Stability-2013 ... OK Successfully installed Canary-Stability-2013 Configuring JSON-XS-4.02 ... OK ==> Found dependencies: common::sense, Types::Serialiser --> Working on common::sense Fetching http://www.cpan.org/authors/id/M/ML/MLEHMANN/common-sense-3.7 +5.tar.gz ... OK Configuring common-sense-3.75 ... OK Building and testing common-sense-3.75 ... OK Successfully installed common-sense-3.75 --> Working on Types::Serialiser Fetching http://www.cpan.org/authors/id/M/ML/MLEHMANN/Types-Serialiser +-1.0.tar.gz ... OK Configuring Types-Serialiser-1.0 ... OK Building and testing Types-Serialiser-1.0 ... OK Successfully installed Types-Serialiser-1.0 Building and testing JSON-XS-4.02 ... OK Successfully installed JSON-XS-4.02 4 distributions installed
        gcp4al16:rg8239$ cpanm List::MoreUtils --> Working on List::MoreUtils Fetching http://www.cpan.org/authors/id/R/RE/REHSACK/List-MoreUtils-0. +428.tar.gz ... OK Configuring List-MoreUtils-0.428 ... OK ==> Found dependencies: List::MoreUtils::XS, Test::LeakTrace, Exporter +::Tiny --> Working on List::MoreUtils::XS Fetching http://www.cpan.org/authors/id/R/RE/REHSACK/List-MoreUtils-XS +-0.428.tar.gz ... OK Configuring List-MoreUtils-XS-0.428 ... OK Building and testing List-MoreUtils-XS-0.428 ... FAIL ! Installing List::MoreUtils::XS failed. See /home/rg8239/.cpanm/work/ +1597187453.8905/build.log for details. Retry with --force to f orce install it. --> Working on Test::LeakTrace Fetching http://www.cpan.org/authors/id/L/LE/LEEJO/Test-LeakTrace-0.16 +.tar.gz ... OK Configuring Test-LeakTrace-0.16 ... OK Building and testing Test-LeakTrace-0.16 ... OK Successfully installed Test-LeakTrace-0.16 --> Working on Exporter::Tiny Fetching http://www.cpan.org/authors/id/T/TO/TOBYINK/Exporter-Tiny-1.0 +02002.tar.gz ... OK Configuring Exporter-Tiny-1.002002 ... OK Building and testing Exporter-Tiny-1.002002 ... OK Successfully installed Exporter-Tiny-1.002002 ! Installing the dependencies failed: Module 'List::MoreUtils::XS' is +not installed ! Bailing out the installation for List-MoreUtils-0.428. 2 distributions installed

        Obviously, still no luck