Bug 795443 - When attempting to run script requiring Tk.pm, perl generates error.
Summary: When attempting to run script requiring Tk.pm, perl generates error.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-Tk
Version: 16
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Andreas Bierfert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-20 14:52 UTC by Wayne Hammond
Modified: 2012-02-21 02:31 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-21 01:37:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Wayne Hammond 2012-02-20 14:52:53 UTC
Description of problem:
Perl cannot locate Tk.pm in the @INC path.  The installed path for Tk.pm is different from the @INC path.  Remval and reinstall of tk.x86_64 does not resolve the problem.

Version-Release number of selected component (if applicable):
tk-8.5.11-1.fc16.x86_64

How reproducible:
Every time 

Steps to Reproduce:
1.issue command for script requiring Tk.pm and press enter.
2.Receive error message
3.
  
Actual results:
 perl ./guiguts.pl &
[1] 9731
[root@waynesworld guiguts]# Can't locate Tk.pm in @INC (@INC contains: /home/wayne/dp/guiguts/lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./guiguts.pl line 45.
BEGIN failed--compilation aborted at ./guiguts.pl line 45.

Expected results:
Expect script to complete normally.

Additional info:
Tk.pm is installed by yum in:
/usr/share/perl5/vendor_perl/AnyEvent/Impl/Tk.pm
Attempts to locate directions to change the path have resulted in no help.  According to some articles, the path is generated by perl at install and cannot be changed.

Comment 1 Iain Arnell 2012-02-20 15:02:23 UTC
I suspect that you only need to "yum install perl-Tk". The AnyEvent/Impl/Tk.pm module is something else entirely.

Comment 2 Wayne Hammond 2012-02-20 23:29:57 UTC
Perhaps, but that is where yum placed the Tk.pm file.  I uninstalled and re-installed using yum and that't where the file was again.

Also, I have not been able to find Tk widgets on my computers.  The perl script I'm trying to run needs it.  I assume this is still part of the Tk package?


I have Fedora 16 installed and run updates at least weekly so all of the software should be up to date.

Thank you for your input.

Comment 3 Paul Howarth 2012-02-20 23:47:13 UTC
Have you actually tried doing "yum install perl-Tk"?

You appear to have perl-AnyEvent installed, but not perl-Tk. The latter is what your script is looking for, not the former; both contain a Tk.pm but the path by which they are reached is significant and that's why your script is (correctly) disregarding the version from perl-AnyEvent.

Comment 4 Iain Arnell 2012-02-21 00:06:41 UTC
Ah, but even if you do install perl-Tk, you'll still be stuck because guiguts also needs perl-Tk-ToolBar which we don't have packaged (yet) in Fedora. If I get some spare time, I'll take a look at adding it...

Comment 5 Wayne Hammond 2012-02-21 01:03:20 UTC
The commands I ran were:
yum remove tk.x86_64

When that finished I ran:
yum install tk.x86_64

The reason I ran those commands was because Tk.pm was found only in one place on my computers (2, a laptop and a desktop both with the latest version of Fedora 16), the AnyEvent/Impl subdirectory which is why I reported this as a bug.

When I added the lines:

use lib "/usr/share/perl5/vendor_perl/AnyEventImpl", "Tk.pm";

require Tk;
import Tk;

to the beginning of the script, perl ran and then gave a different error, Tk-widgets not found.  Very frustrating for me.  

Could you give me directions as to how to repair my perl installation?  Would you advise removing the packages and installing the previous version with the latest perl package?

Thanks for your help.

Comment 6 Wayne Hammond 2012-02-21 01:22:53 UTC
Now I feel really dumb.  I ran yum install perl-tk before and received an error about "no package available".  I just ran yum install perl-Tk and the package installed.  I ran the guiguts script again and the script ran flawlessly.

Thank you for your patience and help.

Comment 7 Wayne Hammond 2012-02-21 01:23:14 UTC
Now I feel really dumb.  I ran yum install perl-tk before and received an error about "no package available".  I just ran yum install perl-Tk and the package installed.  I ran the guiguts script again and the script ran flawlessly.

Thank you for your patience and help.

Comment 8 Iain Arnell 2012-02-21 01:37:54 UTC
I'm glad you're up and running.

I was testing with a much older version of guiguts - fortunately for you, the latest version bundles a copy of Tk::ToolBar, so does work out-of-the-box on Fedora. 

As a pgdp member and one-time user of guiguts, though, I'm still interested in getting this properly packaged. Hopefully, in future, it should be possible to "yum install guiguts".

Comment 9 Iain Arnell 2012-02-21 02:30:43 UTC
For info, review requests are filed for Tk-ToolBar and Tk-CursorControl at bug 79605 and bug 795603.

Comment 10 Iain Arnell 2012-02-21 02:31:51 UTC
Oops. That should be bug 795605 and bug 795603.


Note You need to log in before you can comment on or make changes to this bug.