- Learn Linux
- Learn Electronics
- Raspberry Pi
- LPI certification
- News & Reviews
As I've already mentioned I'm creating a Autocue Program for Linux using Perl/Tk.
I've made a start on this, and the initial development (with very limited functionality) was well received at the last rehearsal. It has much more functionality than the old Macromedia Flash based autocue program that I created for the last show, and the improved version that we've been using in the rehearsals so far.
This program is written using the Perl/Tk toolkit, which is provides a means of creating GUI applications using perl. As I'm already well into perl programming this is a logical step for my first real GUI based program.
Now that I've been working with Perl/Tk I've been trying it out on a few different machines. It works under Windows (as long as you install the ActivePerl software first), and here are a couple of issues on two different Linux distributions, Fedora and Ubuntu. I had similar issues with them both, so first I've put the pre-requisites and then I'll explain the problem later.
From a clean install of Ubuntu none of the development packages or libraries are installed. The following commands will install them so that we can then use CPAN to install the required modules.
apt-get install build-essential
apt-get install lynx
apt-get install curl
apt-get install tk8.4-dev
I had already chosen the development packages during the install process. If you did not then you should go into Add/Remove Programs and then add the make and related packages. You may also need to install the Tk development libraries.
My first attempt at installing the module went as follows:
perl -MCPAN -e "install Tk"
If this is the first time you've used CPAN then you will be asked a number of questions. You can normally just take the defaults, answering your own country for the repositories etc.
The install went OK until was performing the tests on the module. The last few lines of the command are shown below:
t/zzScrolled.................ok 1/94# Test 66 got: "589x341+0+32" (t/zzScrolled.t at line 104 fail #2)
# Expected: "589x341+0+0" (Sizechk: geometry has not changed not reset for -height => 24+(5))
# t/zzScrolled.t line 104 is: ok($newgeo, $oldgeo, "Sizechk: geometry has not changed not reset" .
# Test 94 got: "589x341+17+32" (t/zzScrolled.t at line 104 fail #4)
# Expected: "589x341+0+32" (Sizechk: geometry has not changed not reset for -width => 80+(5))
t/zzScrolled.................FAILED tests 66, 94
Failed 2/94 tests, 97.87% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
t/JP.t 0 11 294 582 197.96% 4-294
t/KR.t 0 11 271 534 197.05% 5-271
t/zzScrolled.t 94 2 2.13% 66 94
(3 subtests UNEXPECTEDLY SUCCEEDED), 23 subtests skipped.
Failed 3/47 test scripts, 93.62% okay. 560/2619 subtests failed, 78.62% okay.
make: *** [test_dynamic] Error 255
There appear to be a few issues with the zzScrolled function. I couldn't find any reason for this, and earlier questions on the topic resulted in no reply. I therefore decided to try and use a force to install regardless of the test.
perl -MCPAN -e shell
> force install Tk
Whch then resulted in the following:
Appending installation info to /usr/local/lib/perl/5.8.7/perllocal.pod
/usr/bin/make install -- OK
Failed during this command:
NI-S/Tk-804.027.tar.gz : make_test FAILED but failure ignored because 'force' in effect
At this point the module has loaded. It appears to be working OK with my current program, even the bit that uses the scrolled wrapper. Hopefully it is working OK.
Another thing I was looking at was instructions for using a Live CD. Obviously if there are problems installing the modules this is not going to work well as a Live CD. Fortunately Knoppix (the original Live CD distribution), includes the perl/tk module, at least it does on the DVD version - I haven't tried the CD version yet. So it still looks as though I will be able to create Live CD/DVD instructions for those that are new to Linux, although it won't be using the Ubuntu Live CD which is the one I originally hoped to use.