Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: XS.c: loadable library and perl binaries are mismatched (got handshake key 0xc100000, needed 0xc180000)

by bliako (Monsignor)
on Jul 30, 2020 at 09:37 UTC ( [id://11120055]=note: print w/replies, xml ) Need Help??


in reply to Re^2: 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)

I think you are convoluting the problem and your system even more. I would go the opposite direction and blank out both env vars you set.

If you have not installed 5.30 as root just erase it from your home dir including all additional packages it installed and make sure about that. Then use perlbrew to re-install perl 5.30. Then ask perlbrew to use 5.30 as the default perl for your account. Then install additional packages. Perhaps starting with cpanm. And report back if there is a problem. perlbrew will make sure that one perl's libraries and packages do not pollute another's.

If you have installed 5.30 as root, your problems are only surfacing now... I hope you are able to remove it and all its packages and restore the system perl and its packages.

If you want to investigate further before a re-install then use strace as Fletch suggested to see which libraries are causing the bad handshake.

you did neither of these

btw, it seems you posted already this to stackoverflow with very poor answers. None-the-less perhaps you could edit this post to notify us of it.

Replies are listed 'Best First'.
Re^4: XS.c: loadable library and perl binaries are mismatched (got handshake key 0xc100000, needed 0xc180000)
by rgren925 (Beadle) on Jul 31, 2020 at 20:11 UTC

    Yes. I posted this on stackoverflow several weeks ago and didn't get anywhere. I try to reserve only the really hard issues for perlmonks. It appears that this turned out to be one of those

    So, I deleted perl-5.30.3 and removed all associated environment variables. I installed perlbrew (which I had never used before--it's very cool). I used perlbrew to install perl-5.32.0. I then installed cpanm and tried to install List::MoreUtils. It failed.

    Here's the output from command strace -e open,stat,lstat cpanm List::MoreUtils

    (edited)...FYI, I appear to have run into a length limit on the output below. Not sure how to post the rest of the output

      (edited)...FYI, I appear to have run into a length limit on the output below. Not sure how to post the rest of the output

      I'm not sure, but you might be able to put it all on your scratchpad.

      Could you provide us with a copy'n'paste of the troublesome XS.c that's being generated with this 5.32.0 build ?
      It probably won't help ... but, OTOH, it might contain something useful.
      I'd like to compare it with the XS.c that my build of 5.32.0 generates. (It's important that you post the XS.c from the perl-5.32.0 build.)
      I assume List::MoreUtils::XS fails on the perl-5.32.0 build in the same way as with perl-5.30.3.

      Cheers,
      Rob

        List::MoreUtils::XS fails almost exactly the same way in 5.32.0 as 5.30.3. Just the hex code is different:

        5.30.3: 0xc100000, needed 0xc180000 5.32.0: 0xe100000, needed 0xe180000

        Here's the 5.32.0 XS.c

      Sorry if that sounded harsh (re: cross-posting), it's just polite to let others know.

      I think you can safely ignore those ENOENTs because it's Perl trying various locations until it hits the right one - see the eventual open ... O_RDONLY. Memo-to-self: oh poor harddisk. So, filter those out please. For example at the terminal type: whatever-strace-command-you-ran | grep -v ENOENT and feel free to filter out other irrelevant blabber. Remember you are looking for a successful library open and then a failure because of the handshake. That can be quite a few lines apart.

      Here is a successful module and library open:

      stat("/home/rg8239/perl5/perlbrew/perls/perl-5.32.0/lib/5.32.0/x86_64- +linux/Time/HiRes.pm", {st_mode=S_IFREG|0444, st_size=25689, ...}) = 0 open("/home/rg8239/perl5/perlbrew/perls/perl-5.32.0/lib/5.32.0/x86_64- +linux/Time/HiRes.pm", O_RDONLY) = 5 stat("/home/rg8239/perl5/perlbrew/perls/perl-5.32.0/lib/5.32.0/x86_64- +linux/auto/Time/HiRes/HiRes.so", {st_mode=S_IFREG|0555, st_size=28181 +, ...}) = 0

      From the output you posted my filter produced this:

      stat("/bin/tar", {st_mode=S_IFREG|0755, st_size=178728, ...}) = 0 --- SIGCHLD (Child exited) @ 0 (0) --- stat("/usr/bin/unzip", {st_mode=S_IFREG|0755, st_size=115232, ...}) = +0 --- SIGCHLD (Child exited) @ 0 (0) --- stat(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 --- SIGCHLD (Child exited) @ 0 (0) --- --> Working on List::MoreUtils Fetching http://www.cpan.org/authors/id/R/RE/REHSACK/List-MoreUtils-0. +428.tar.gz ... --- SIGCHLD (Child exited) @ 0 (0) --- stat("List-MoreUtils-0.428.tar.gz", {st_mode=S_IFREG|0644, st_size=146 +030, ...}) = 0 OK --- SIGCHLD (Child exited) @ 0 (0) --- --- SIGCHLD (Child exited) @ 0 (0) ---

      Are tar and unzip working? Why those SIGCHLD? I can't explain those, perhaps someone else can.

      Please remember that it's you doing the debugging. So, filter out irrelevant ENONENTs and perhaps other noise, zoom in to the failed handshake and make sure that in your log the failed handshake library is shown (in an open() statement hopefully)

        No offense taken. I understand the thoughtlessness and rudeness of posting the same issue concurrently on multiple forums--wasting people's time and good will. I just didn't grasp the nuances. Point taken and understood

        I pored through the output after eliminating the ENOENT. There was nothing unusual at the point of the handshake. However, these lines jumped out as pulling system libraries in at compile time...

        cc -c -I. -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFIL +E_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.428\" -DXS _VERSION=\"0.428\" -fPIC "-I/home/rg8239/perl5/perlbrew/perls/perl-5.3 +2.0/lib/5.32.0/x86_64-linux/CORE" XS.c rm -f blib/arch/auto/List/MoreUtils/XS/XS.so cc -shared -O2 -L/usr/local/lib XS.o -o blib/arch/auto/List/MoreUti +ls/XS/XS.so \ \ chmod 755 blib/arch/auto/List/MoreUtils/XS/XS.so

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11120055]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-03-28 17:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found