Subject: | Digest::SHA1 XS compile hangs (IRIX) |
Background:
I am the humble administrator of an SGI Indy (150MHz MIPS R4400), running IRIX 6.5.22m with the MIPSpro 7.4 compilers installed. When building the .so file for Digest::SHA1, the backend compiler (a wacky SGI thing) spun off into the weeds, eating all the CPU for a half an hour before I finally killed it. I recall the Digest::MD5 module doing the same thing to me several months back, but I did not try installing the current release to verify.
Synopsis:
Making a long, boring story into a short, boring one, Makefile.PL builds a Makefile that feeds a "-O3" switch to the compiler. Bumping this down to "-O2" made the module build (in only a few seconds, too!), and everything now works properly. Other Perl modules build with "-O3", just not Digest::SHA1 (and MD5) I'd prefer not to guess what the SGI compiler is getting stuck on in your case, as I didn't look at your XS code; perhaps he's trying to unroll an infinite loop or something equally unwise. ;) But it does cause a certain amount of pain in a "fully automatic" environment such as CPAN, one needs to break out, fiddle with the Makefiles by hand, run "make test" and "make install" by hand, then go back into CPAN and resume their work. Not difficult, but it interferes with the virtue of Laziness. ;)
Solution:
I do not know if this happens on all IRIX machines, or just the really old ones like mine, but I offer you a simple fix to your Makefile.PL that takes the position of "better safe than sorry"; and will set the OPTIMIZE flag to "-O2" on all IRIX installations of Perl. The file is attached.
And thanks for the software!
--- Makefile.PL.orig Sat Dec 18 15:18:37 2004
+++ Makefile.PL Sat Dec 18 15:18:17 2004
@@ -8,4 +8,5 @@
'Digest::base' => '1.00',
},
'dist' => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+ 'OPTIMIZE' => (($^O eq 'irix') ? '-O2' : undef),
);