Yenya's World

Wed, 22 Nov 2006


I am migrating the IS MU cluster to Fedora 6 - the front-end servers are already migrated, and now I am working on migrating the web cluster. This is a bigger change than it may seem, because we are also migrating the old 32-bit system to a fully 64-bit one. So I am recompiling everything from Apache to Perl. While testing the Perl modules I found the following regressions:

The Text::Tabs module does not work correctly on UTF-8 characters. Here is the test case - the output is misaligned:

perl -CS -Mutf8 -MText::Tabs -e \
	 'print expand("\taa\t.\n\t\x{010a}\x{010a}\t."), "\n"'

I did not dig into this further, replacing from the older version worked.

Another regression was in Crypt::Cracklib, which we use for generating and checking passwords. I have seen random crashes when using this module. The problem was that it did not #include the <crack.h> header file, so the compiler thought that some function returns int where in fact it returned a pointer. On AMD64 the integer is smaller than the pointer, so the pointer got truncated. I have solved this with modifying Makefile.PL the following way:

                $include = $_;
                if (-f "$include/packer.h") {
+                        if (-f "$include/crack.h") {
+                                $incfile .= ' -Dcrack=1';
+                        }
                } elsif (-f "$include/crack.h") {

In both cases I have contacted the authors, but it would be nice to have a bug-tracking system for CPAN modules. Is there anything like that available? If there isn't I hope at least this blog entry helps somebody to solve the problems I had with those two modules - especially Crypt::Cracklib has not been updated for years.

Section: /computers (RSS feed) | Permanent link | 2 writebacks


Yenya's World: Linux and beyond - Yenya's blog.


RSS feed

Jan "Yenya" Kasprzak

The main page of this blog



Blog roll:

alphabetically :-)