Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Activestate TK::JPEG compatibility issue

by insensate (Hermit)
on Sep 06, 2002 at 16:23 UTC ( [id://195691]=perlquestion: print w/replies, xml ) Need Help??

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

After installing the ppm packages for Tk and Tk::JPEG I am greeted with the following error when I try to run my program.
Tk::JPEG object version 800.023 does not match $Tk::JPEG::XS_VERSION 800.022 at C:/Perl/lib/DynaLoader.pm line 225.
This issue is documented here. I am wondering if anyone here has insight into a way around this? Thanks for your time and consideration.
Jason

Replies are listed 'Best First'.
Re: Activestate TK::JPEG compatibility issue
by hiseldl (Priest) on Sep 06, 2002 at 18:35 UTC
    I found a couple articles in news:comp.lang.perl.tk about this problem.

    1. "Tk and Tk::JPEG version must be the same" --Stephen Lidie
    2. "Please ask ActiveState to update the Tk::JPEG ppm." --Slaven Rezic
    I suggest that you try to install Tk::JPEG on your box via the CPAN shell, and send an email to activestate asking them to update their Tk::JPEG.ppm file because their Tk and Tk::JPEG ppm's are out of sync, which *is* their fault.

    --
    hiseldl

Re: Activestate TK::JPEG compatibility issue -- QUICK WORK AROUND FOUND, Any Better Ideas?
by PERLscienceman (Curate) on Aug 23, 2003 at 04:39 UTC
    Working with Perl/Tk on Windows XP and Build 635 of ActiveState Perl 5.6.1 I came up with a similiar error as shown below:

    Tk::JPEG object version 800.023 does not match Tk::JPEG::XS_VERSION 800.024 at C:/Perl/lib/DynaLoader.pm line 225.

    A search on PerlMonks for info lead me to this node I have read that this problem has been submitted to ActiveState with no solution as of yet for Windows. This likely isn't a problem for *nix users since they would compile the module on their own OS, however, it does still appear to be a nagging little annoyance for Windows users to this date.

    Anyway... I figured I would do a little more tinkering so I went into the module itself (JPEG.pm) and came up with the following rather klugey solution/fix: (this is line 13 of the module)

    #$XS_VERSION = $Tk::VERSION; #old line $XS_VERSION = 800.023; #new line (now line 14)
    Note: On Windows you must release (uncheck in file properties) the READ ONLY lock on this file in order to properly save your changes.

    And sure enough the script with Tk::JPEG worked! No more errors!

    This 1 line 'fix' corrected my error; I would imagine that it would work similiarly for the problem mentioned in the parent node by setting $XS_VERSION to 800.022 .

    One last thought: All this is indeed is just 'a-work-around', and kind of a scratchy one at that. If there are any fellow monks out there who have run across this problem with Windows Perl/Tk and this particular module and have a better, 'cleaner' solution I would really like to hear about it.

    Thanks in Advance for Any Thoughts on this Matter!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-23 22:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found