Hi,

We have build Perl 5.26.1 from source and used the same Perl to create a perlmodule.c file from an XS file perlmodule.xs. But when we try to execute this C code, we get the following error.
../perlmodule.c: loadable library and perl binaries are mismatched (got handshake key 0xe280080, needed 0xde00080)

Previously we were using Perl 5.16 and there were no issues. Could you please let us know whether we need to rewrite the XS module for Perl 5.26. Currently we are using the same XS module which is used in Perl 5.16. I am not sure if that is creating the issue here.

We are generating the .c files with following command.
perl ExtUtils/xsubpp -typemap typemap -typemap ExtUtils/typemap perlmodule.xs > perlmodule.cpp

Following is the configuration details.

Summary of my perl5 (revision 5 version 26 subversion 1) configuration +: Platform: osname=linux osvers=2.6.16.21-0.8-default archname=x86_64-linux-thread-multi uname='linux 2.6.16.21-0.8-default #1 mon jul 3 18:25:39 utc 2006 +x86_64 x86_64 x86_64 gnulinux ' config_args='-d -s -e -U uselargefiles -U use64bitint -U usemorebi +ts -D usemultiplicity -D usethreads -D prefix=/opt/perl/a -D installu +srbinperl=no -D useshrplib -D ccflags= -D libperl=libperl.so -D man1d +ir= -D perladmin=none -D pager=/usr/bin/less -D otherlibdirs=/opt/pe +rl/a/lib/site_perl' hint=recommended useposix=true d_sigaction=define useithreads=define usemultiplicity=define use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=n default_inc_excludes_dot=define bincompat5005=undef Compiler: cc='cc' ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -f +stack-protector -I/usr/local/include -D_FORTIFY_SOURCE=2' optimize='-O2' cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -f +stack-protector -I/usr/local/include' ccversion='' gccversion='4.1.0 (SUSE Linux)' gccosandvers='' intsize=4 longsize=8 ptrsize=8 doublesize=8 byteorder=12345678 doublekind=3 d_longlong=define longlongsize=8 d_longdbl=define longdblsize=16 longdblkind=3 ivtype='long' ivsize=8 nvtype='double' nvsize=8 Off_t='off_t' lseeksize=8 alignbytes=8 prototype=define Linker and Libraries: ld='cc' ldflags =' -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../.. +/../../x86_64-suse-linux/lib /usr/lib /lib/../lib64 /usr/lib/../lib64 + /lib /lib64 /usr/lib64 /usr/local/lib64 libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdb +m_compat perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=libc-2.4.so so=so useshrplib=true libperl=libperl.so gnulibc_version='2.4' Dynamic Linking: dlsrc=dl_dlopen.xs dlext=so d_dlsymun=undef ccdlflags='-Wl,-E -Wl,-rpath,/opt/perl/a/lib/5.26.1/x86_64-linux-t +hread-multi/CORE' cccdlflags='-fPIC' lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_OP_PARENT PERL_PRESERVE_IVUV USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API Built under linux

Thanks and Regards,
Jobin Joseph

In reply to Using Perl XS in 5.26 fails with error loadable library and perl binaries are mismatched by jobinjoseph121

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.