-
Notifications
You must be signed in to change notification settings - Fork 55
Description
While building and loading a simple XS module using Strawberry Perl 5.40.2.1 and gmake, we encountered the following runtime error:
loadable library and perl binaries are mismatched
(got first handshake key 0000000012d00080, needed 0000000012c00080)
Details:
We are using both perl.exe and libperl540.a directly from the Strawberry Perl 5.40.2.1 installation.
The XS module is built using standard ExtUtils::MakeMaker tooling and compiled with gmake on Windows.
The build links against the following library:
C:\strawberry-perl-5.40.2.1\perl\lib\CORE\libperl540.a
Despite this, the resulting .dll fails to load due to a binary handshake mismatch with the interpreter.
Conclusion:
It seems the libperl540.a provided in the Strawberry Perl 5.40.2.1 distribution is not correctly aligned with the shipped perl.exe and perl540.dll. This prevents successful dynamic linking for XS modules, even when using only Strawberry Perl’s own toolchain.
We're happy to provide a minimal reproducible test case if needed.
perlxs_test.zip
/c/strawberry-perl-5.38.4.1/perl/bin/perl.exe Makefile.PL
gmake
/c/strawberry-perl-5.38.4.1/perl/bin/perl.exe -Mblib -MSimple -e "print Simple::add(2, 3), '\n';"
Code Fails with 5.40.2.1 and 5.40.2.2 but works 5.38.4.1
Best regards,
Alan O Flanagan