Problems with Perl, CPAN, and Bugzilla

apps

#1

Since the recent upgrades to Ubuntu 12.04, my Bugzilla installation has been broken. The error messages pointed to compilation errors, indicating DateTime::TimeZone as the possible culprit. Running checksetup.pl showed some missing modules (DateTime-TimeZone and Math-Random-ISAAC), but crashed partway through with:

The only relevant thread I could find on this error was from 2010, but indicated that they solved the problems by removing their Bugzilla perl modules folder (bugs/lib) and reinstalling the modules. I went ahead with that, but now I cannot seem to get DateTime::TimeZone to install. Following the instructions from the DreamHost Wiki page on Bugzilla, I used:

However, every time the process has been killed by the procwatch daemon.

I’ve tried installing CPAN Minus, but that failed in a different way.

I got a notice that CPAN had an update available, but I could not get it to update properly.

I’ve just now managed to get the DateTime::TimeZone module installed, but Bugzilla’s checksetup.pl does not detect that it is installed. I’m very nearly about to just remove and reinstall Bugzilla from scratch, though I was hoping that I wouldn’t have to do this. Any thoughts?


#2

Memory limits during CPAN module installation are usually related to tests run after installing the modules. These tests are typically used to ensure the module was written correctly, and aren’t really necessary for you to run — you can disable them by passing the “notest” argument to cpan, e.g.

or the “-n” option to cpanm:

I’m not familiar with bugzilla’s “install-module.pl”, but I expect it has something analogous.


#3

What’s extra puzzling to me is that I had somehow managed to get DateTime::TimeZone installed, but:

[quote=“RytoEX, post:1, topic:62007”]I’ve just now managed to get the DateTime::TimeZone module installed, but Bugzilla’s checksetup.pl does not detect that it is installed. I’m very nearly about to just remove and reinstall Bugzilla from scratch, though I was hoping that I wouldn’t have to do this. Any thoughts?
[/quote]

I could think of two possibilities. One was this troubleshooting entry in Bugzilla’s documentation (I’ve excerpted the entry below):

[quote=‘The Bugzilla Guide’]A.3. I installed a Perl module, but checksetup.pl claims it’s not installed!

This could be caused by one of two things:

  1. You have two versions of Perl on your machine. You are installing modules into one, and Bugzilla is using the other.
  2. The permissions on your library directories are set incorrectly.
    [/quote]
    Though, I’m not sure how to address either of those possible problems.

The second possibility was that perhaps I needed to handle the installation of DateTime differently as suggested on the DH Wiki. Though, I don’t recall having to do that when I previously installed Bugzilla (which might have been in August 2013).

According to Bugzilla’s API documentation on install-module.pl:

[quote=‘Bugzilla API Documentation’]install-module.pl - Installs or upgrades modules from CPAN. This script does not run on Windows.

[…]
–global
This makes install-module install modules globally for all applications, instead of just for Bugzilla.
[/quote]
So I would guess that it tries to install the modules locally to the Bugzilla installation instead of installing them to the user’s space or the system space for Perl modules.

If Bugzilla (and CPAN/Perl module) installations are doomed to fail on shared hosting and the recommended solution is to force CPAN to avoid default behavior (force it to not run tests during installation), then perhaps the instructions for installing Bugzilla on DreamHost need a good once over by people who have a good understanding of the process and caveats. Alternatively, maybe the procwatch daemon could be reconfigured to recognize Bugzilla’s installation scripts as installers and be more lenient with them.


#4

As an update, I’ve tried to get the installation of the DateTime::TimeZone module to work by skipping the tests. I went into CPAN, used:

The installations still failed. Here are the last lines of the installation output:

[code]Skipping test because of notest pragma
Running make install
!!!
ERROR: Can’t create '/usr/local/man/man3’
mkdir /usr/local/man/man3: Permission denied at /usr/share/perl/5.14/ExtUtils/Install.pm line 494

!!!
at -e line 1
make: *** [pure_site_install] Error 13
DROLSKY/DateTime-TimeZone-1.75.tar.gz
/usr/bin/make install – NOT OK
Failed during this command:
PEVANS/Scalar-List-Utils-1.41.tar.gz : install NO
ETHER/Test-Warnings-0.016.tar.gz : install NO
DROLSKY/List-AllUtils-0.09.tar.gz : install NO
DROLSKY/DateTime-TimeZone-1.75.tar.gz : install NO
[/code]