RE: loadable library and perl binaries are mismatched
[email protected] (bulk 88) Fri, 15 Jul 2016 08:40:45 -0400
| Newsgroups | perl.xs |
|---|---|
| Message-ID | <[email protected]> |
=0A= =0A= ----------------------------------------=0A= > To: [email protected]=0A= > Subject: loadable library and perl binaries are mismatched=0A= > From: [email protected]=0A= > Date: Wed=2C 13 Jul 2016 18:18:24 +0200=0A= >=0A= > I have an XS module to permit Perl scripts access SQL Server through OLE = DB.=0A= > Besides a source-code only distribution=2C I also maintain a binary=0A= > distribution for ActivePerl and for 5.18 and 5.20 I have also supported= =0A= > Strawberry Perl.=0A= >=0A= > Up to Perl 5.16 it was easy - since ActivePerl was labeled to have been= =0A= > built with Visual Studio (MSVC)=2C I could build my module with Visual=0A= > Studio as well.=0A= >=0A= > With Perl 5.18=2C ActiveState switched to gcc. What I did was to build Pe= rl=0A= > from sources with MSVC and build my module in that Perl environment. The= =0A= > binary produced runs well with ActivePerl and Strawberry Perl.=0A= >=0A= > I am not trying to redo that stunt with Perl 5.22 and 5.24 and it works= =0A= > for 64-bit Perl. However=2C for 32-bit Perl=2C I get this error message w= hen=0A= > I try to invoke the module on ActivePerl or Strawberry Perl 5.22:=0A= >=0A= > SqlServer.c: loadable library and perl binaries are mismatched (got=0A= > handshake key 0B080080=2C needed 0AF00080)=0A= >=0A= > (The error message for 5.24 is the same=2C but with different handshake= =0A= > keys.)=0A= >=0A= =0A= Your XS DLL and perl core do not agree on -D options=2C or the config.h fil= es used to compile both are different. Perl XS DLLs/SOs are not binary comp= atible with anything but the perl binary that built them. The high 16 bits = of the handshake key are the size of the interp struct. Your XS module and = perl core do NOT agree on where the memory offsets for various members in t= he interp struct are.=0A= =