Skip Menu |

This queue is for tickets about the Digest-SHA1 CPAN distribution.

Report information
The Basics
Id: 8999
Status: resolved
Priority: 0/
Queue: Digest-SHA1

People
Owner: Nobody in particular
Requestors: spam [...] submedia.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.10
Fixed in: (no value)



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), );
Hi there! Sorry about not replying earlier. For Digest::MD5 we include a hints/irix_6.pl file that reads like this: # The Mongoose v7.1 compiler freezes up somewhere in the optimization of # MD5Transform() in MD5.c with optimization -O3. This is a workaround: if ($Config{cc} =~ /64|n32/ && `$Config{cc} -version 2>&1` =~ /\s7\.1/) { $self->{OPTIMIZE} = "-O1"; } This might be the same issue, so could you verify if your problem is fixed by dropping the same hints file into the Digest-SHA1-2.10/hints directory?
I've just included the MD5 hints file :-)