in reply to Module compilation hell

If every single one of a module's tests failed, there is probably a good reason for it (module failing to load would be my guess). This is particularly true for a popular module like HTML::Mason. Likely, this indicates that your system is setup in bizzare ways, in which case your problem isn't really Perl. The other alternative is that you're attempting to install a development version of HTML::Mason, in which case you still have other problems.

If don't think you can take the time to find out why it failed, think about this: how much time are you saving by getting that CPAN module working over coding your own solution?

----
: () { :|:& };:

Note: All code is untested, unless otherwise stated

Replies are listed 'Best First'.
Re: Re: Module compilation hell
by Anonymous Monk on Mar 30, 2004 at 23:29 UTC

    From the HTML::Mason site:

    Why do Mason tests fail during install?
    The user that your web server runs as ("nobody" is a common choice, and the default on many systems), needs to be able to read the Mason build directory. If you are installing via CPAN as root, that directory is likely down root.cpan, which will have restrictive permissions. Try chmod'ding the build directory, or moving to a different (perhaps world-readable) build directory for the install.

    Why am I getting segmentation faults (or silently failing on startup)?
    There are a few known mod_perl issues that cause segmentation faults or a silent failure on the part of Apache to start itself up. Though not specific to HTML::Mason, they are worth keeping in mind:
    * Are you using a dynamically-linked mod_perl?
    Unfortunately, DSO mod_perl builds seem to be reliably unstable, especially under heavy traffic. Rebuild Apache with mod_perl linked statically.

    How could I ever recommend this state of affairs to anyone, let alone clients?

      If you dont have sufficient skill to deal with these issues, you shouldnt recommend them or yourself to your clients.
      Ah, that first FAQ is a bit out of date. A while back we gave up on trying to run the tests that use a live web server during CPAN installs, and just run them for us developers.

      Anyway, I can't see exactly what your complaint about this "state of affairs" is. Like most software, we are unable to guarantee that Mason will work 100% perfectly on all platforms, on all machines, under all circumstances. This is pretty much the state of _all_ software today.

      I also note that I don't recall seeing a post to the Mason users list recently regarding Fedora RC1 install failures. Maybe if you went to the correct forum for help, you'd get some. If you complain on some random forum, you're less likely to get help.

Re: Re: Module compilation hell
by Anonymous Monk on Mar 30, 2004 at 23:15 UTC

    These are the most widely used UNIX distributions in the open source world today (OSX Panther & Fedora Core 1) so I can't see how I have a non-standard Perl on either of them.

    Coding my own solution isn't the alternative. PHP is - and I don't like to have to change but the more Perl modules fail to compile on standard UNIX platforms the more I think it wiser to go for a language which has most of what you need in the core installation.

    Some modules have compiled OK but they seem to be the smaller ones like Mail::Sendmail

    My point about excessive modularity is born-out, I would argue, by what appears to be a host of version headaches revolving around Apache1 and 2. The mod_perl developers seem to have had a hard time getting version 2 out, not that I belittle their efforts in any way.

      I wouldn't call either of those "the most widely used UNIX distributions in the open source world today".

      Looking at the Apple website we see, that that line is almost an exact quote. Let me tell you that that line is nothing more than Apple marketing lingo for 'many people own an Apple running OS X and OS X is based on a modified version of FreeBSD, therefore it must be the most widely used UNIX distribution.' Ah! But FreeBSD is not UNIX, "FreeBSD is a UN*X-like operating system" (source: http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/introduction.html).

      Fedora Core 1? Pah... lease! Sure, quite a few people have made the switch but there are still too many people using Slackware, Debian, Gentoo, Mandrake, etc to even come close.

      OS X and Fedora are both non-standard so why *should* the defaults work? I would expect that you would have to work to get things to install in a standard way.

      Exactly what type of failures are you experiencing? If you type % perl Makefile.pl && make && make test && make install and there is an error in make test, it is most likely due to the fact that there is a module dependency. Generally speaking, if you install the module dependency, and make test again, everything will clear up. This is not a problem with compilation; this is operator error -- failing to get everything in the right order.

      Now, on the other hand, if you are saying that the make invariably fails on a module like GD::Graph -- which requires you to compile C code, I wonder if it's due to the platform you are using. Are there known issues with the modules you are trying to install, when you attempt compiling on a PowerPC based platform? If there are, it ísn't perls fault, but C's. There are so many C / C++ compilers out there, with so many foibles, that it is almost impossible for a programmer to create a program that will compile on every platform that is or ever will be.


      Want to support the EFF and FSF by buying cool stuff? Click here.
      These are the most widely used UNIX distributions in the open source world today (OSX Panther & Fedora Core 1)

      Fedora is one of several distros with a sufficiently large install base that it's difficult to tell which is most widely used. SUSE and Mandrake and Debian for example all seem to be pretty much neck-and-neck with Fedora. (RedHat _sells_ more, but most of the sales are corporate support contracts, a small percentage of the total install base, which is much more difficult to measure.)

      As for Mac OS X, yeah, a lot of people have it on their computers, but most of them installing any Perl modules. If you only count people who are familiar with *nix and use the Darwin underpinnings in any meaningful way, its install base is definitely smaller than Linux, probably smaller than any of the major Linux distros, and quite possibly smaller than FreeBSD as well.

      Some modules have compiled OK but they seem to be the smaller ones like Mail::Sendmail

      Mail::Sendmail is pure Perl, so if there are serious problems with your build environment, that won't matter. For example, you can install it even if you don't actually have a C compiler or if you don't have the header files for the standard C libraries or other essential things without which you can't successfully compile pretty much anything. In other words, your problem might not be a Perl problem at all, but a build environment problem, and Mail::Sendmail won't be affected because it doesn't require a build environment.


      ;$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$;[-1]->();print