rtwingfield has asked for the wisdom of the Perl Monks concerning the following question:

When I try to execute the following Perl script, failure as indicated.

# perl -T create_roster_db.pl DBI.c: loadable library and perl binaries are mismatched (got handshake key 0x7ac0080, needed 0x7b80080)

This "handshake" thing -- successful fresh make install of both perl5.22.2 and p5-DBI-1.636 from updated ports, reproducible running on two different platforms of FreeBSD v10.2.

What to do?

Replies are listed 'Best First'.
Re: DBI.c: loadable library and perl binaries are mismatched
by GotToBTru (Prior) on May 17, 2016 at 19:44 UTC

    What does perl -v show?

    But God demonstrates His own love toward us, in that while we were yet sinners, Christ died for us. Romans 5:8 (NASB)

      First, thanks for your interest!

      On two different platforms:

      • some Pentium-4:   This is perl 5, version 22, subversion 2 (v5.22.2) built for i386-freebsd-thread-multi-64int
      • Dell 2950:   This is perl 5, version 22, subversion 2 (v5.22.2) built for amd64-freebsd-thread-multi

      . . .from the make install process:
      ===> p5-DBI-1.636 depends on package: perl5>=5.22<5.23 - found

      Can this be some sort of compiler version issue?

        Can this be some sort of compiler version issue?

        Maybe. Perl and XS modules should be compiled with the same compiler.

        But it also may be just a library search path issue. Perhaps you mixed two perl versions that share at least some directories.

        Alexander

        --
        Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
Re: DBI.c: loadable library and perl binaries are mismatched
by Anonymous Monk on May 17, 2016 at 21:49 UTC
      I wonder how the handshake key values are calculated ?
      Can we derive the respective perl version numbers from them ?

      Cheers,
      Rob
Re: DBI.c: loadable library and perl binaries are mismatched
by rtwingfield (Acolyte) on May 20, 2016 at 02:07 UTC

    Still not confident in navigating this web forum (hope this finds an audience); regardless, after a solid week of screwing with this Perl5.22/DBI install on FreeBSD v10.2, the system still complains that "DBI.c: loadable library and perl binaries are mismatched (got handshake key 0x7ac0080, needed 0x7b80080)".

    I've effectively waxed all things Perl on the system and started with fresh installs. The sequence of events were as follows:

    • # pkg delete perl5\*
    • # pkg info -ix perl . . .returns nothing
    • # rm -rf /usr/local/lib/perl5/ . . .actually nothing was there to begin with.
    • File, /etc/make.conf . . . specifies DEFAULT_VERSIONS+= perl5=5.22
    • # portmaster databases/p5-DBI . . .installed perl5.22 and p5-DBI
      . . .all in same breath, i.e., should be built with the same compiler.
      (FYI, Portmaster is a FreeBSD source/version manager. Runs the make system.)
    • Test still complains, "DBI.c: loadable library and perl binaries are mismatched (got handshake key 0x7ac0080, needed 0x7b80080)"

    Doesn't someone know what can be done about this?

      run strace, get list of filenames involved, determine who is responsible for those files, complain, compile stuff yourself

        Believe me, I have complained (see this thread https://forums.freebsd.org/threads/56247/). Yet, other members of this Perl Monk forum seem to be unsure of why the handshake key values are mismatched, and for that matter, where, what and why they are created . . .and what is the source of them. All I know is that they are part of "XS World", and that's way above my pay grade.

        I'm just an applications programmer -- not a compiler writer.