I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2009-08-25 14:11:59-07 by philipl
Help with TK debugger
Hi John, This is Philip again. Are you using the perl "TK" debugger under AIX 5.3? I have run into some issues which I will try to describe. perl -d:ptkdb test.pl (The debugger pops up no problem) However, when I mouse over the TK debugger window the mouse movement coredumps the application. Now, one thing I did notice is that the unix guy who installed TK, downloaded a pre-built version of libpng.a instead of building the one that came with the Perl::Tk 804.028 package? I am just wondering whether this could be the reason for the TK debugger behaving abnormally. Thank you once more for your invaluable help. Regards, Phil
Direct Responses: 11365 | Write a response
Posted on 2009-08-25 20:27:23-07 by philipl in response to 11361
Re: Help with TK debugger
Hi John, I get the feeling that the problem I am experiencing is due to an improper install of the "Tk" package. I have narrowed the problem to libpng.a I get the following error messages when I simply try to: [CI ,prod, D_CI_DEV_SS]#> perl -MTk::PNG -e '' Can't load '/usr/opt/perl5/lib64/site_perl/5.8.2/aix-thread-multi-64all/auto/Tk/PNG/PNG.so' for module Tk::PNG: 0509-022 Cannot load module /usr/opt/perl5/lib64/site_perl/5.8.2/aix-thread-multi-64all/auto/Tk/PNG/PNG.so. 0509-150 Dependent module libpng/libpng.a(libpng.so.3) could not be loaded. 0509-022 Cannot load module libpng/libpng.a(libpng.so.3). 0509-026 System error: A file or directory in the path name does not exist. 0509-022 Cannot load module /usr/opt/perl5/lib64/site_perl/5.8.2/aix-thread-multi-64all/auto/Tk/PNG/PNG.so. 0509-150 Dependent module /usr/opt/perl5/lib64/site_perl/5.8.2/aix-thread-multi-64all/auto/Tk/PNG/PNG.so could not be loaded. at /usr/opt/perl5/lib64/5.8.2/aix-thread-multi-64all/DynaLoader.pm line 229. at -e line 0 Compilation failed in require. BEGIN failed--compilation aborted. Any idea what can be wrong? My LIBPATH environment variable is correct. Any help will be appreciated. Regards, Phil
Direct Responses: 11385 | Write a response
Posted on 2009-08-31 15:11:18-07 by johnlumby in response to 11365
Re: Help with TK debugger
Hello Phil. I had not tried doing that but, Yes, on investigating, the way that the package has built the PNG.so does seem strange, with that path. You can fix it like this:
1. since your PNG.so is in a public dir, first make sure no-one is using that lib: as root slibclean genkld | fgrep PNG.so make sure it does not appear in that output - if it does - ask users to stop and repeat! (Yes I know unix is supposed to be able to handle this but in my experience this is a worthwhile +step to avoid confusion) 2. rm -f /usr/opt/perl5/lib64/site_perl/5.8.2/aix-thread-multi-64all/auto/Tk/PNG /PNG.so 3. cd to <your Tk build directory>/PNG (i.e. the dir in which you see files such as PNG.o and libpng subdir) 4. ld -bhalt:4 -bexpall -G -bnoentry -lpthreads -lc PNG.o imgPNG.o -o /usr/opt/perl5/lib64/site_ +perl/5.8.2/aix-thread-multi-64all/auto/Tk/PNG/PNG.so -L$PWD/libpng -lpng -L$PWD/zlib -lz -lm
Now, one other thing - I see you are on perl 5.8.2. I could not get Tk to work on that version and have read elsewhere that 5.8.3 is a minimum for Tk. I installed 5.10.0 and it works fine. I installed into my own local dir, not into /usr, and people who use my TK programs set my dir in their PATH, to avoid hassles with whoever else may be relaying on 5.8.2. Just mentioning it but if you find everything ok on 5.8.2 then that's fine.
Direct Responses: 11386 | Write a response
Posted on 2009-08-31 15:39:42-07 by johnlumby in response to 11385
Re: Help with TK debugger
Well, it just occurred to me that my suggestion in my previous posting presumes that
<your Tk build directory>/PNG/libpng
directory is accessible to all your users and that the libpng.a in that dir is readable by all users. If not, or if you you don't like the idea that some installed code under /usr relies on some lib in a build directory being readable, then modify the suggested procedure slightly -
. copy the libpng.a to somewhere that is world-readable, e.g. /usr/opt/perl5/lib64/site_perl/5.8. +2/aix-thread-multi-64all/auto/Tk/png or wherever - call this dir <directory_containing_libpng.a> . in my ld command, change -L$PWD/libpng to -L<directory_containing_libpng.a>
Direct Responses: Write a response