Skip Menu |

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

Report information
The Basics
Id: 80157
Status: resolved
Estimated: 1 hour (60 min)
Worked: 1 hour (60 min)
Priority: 0/
Queue: Digest-SHA

People
Owner: mshelor [...] cpan.org
Requestors: sms [...] antinode.info
Cc: craig.a.berry [...] gmail.com
jkeenan [...] cpan.org
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 5.72
Fixed in: 5.73



CC: jkeenan [...] cpan.org, craig.a.berry [...] gmail.com
Subject: [RT #85932]: VMS VAX (V7.3) build of Perl 5.12.3 hangs at sha.c
The following bug was reported in the Perl 5 bug queue at https://rt.perl.org/rt3//Ticket/Display.html?id=85932 by "Steven M. Schweda" <sms@antinode.info> on Fri, 11 Mar 2011 14:53:34 -0600 (CST). On the recommendation of Craig A. Berry, I am moving this bug to the Digest-SHA queue. I am including the original post as well as Craig's most recent post. # Steven Schweda ##### Greetings: Lately I've been trying to build Perl 5.12.3 on my (old, slow) VAX using what I believe is the latest (last?) DEC/Compaq/HP C compiler: GIMP $ cc /version Compaq C V6.4-005 on OpenVMS VAX V7.3 As with "md5.c" ("[.CPAN.DIGEST-MD5]MD5.C"), "sha.c" ("[.CPAN.DIGEST-SHA]SHA.C") needs some special help to work around a known compiler bug, namely, "/OPTIMIZE = NODISJOINT". (With normal optimization, the compiler loops.) Sadly, while the builder parts for "md5.c" ("[.CPAN.DIGEST-MD5]MAKEFILE.PL") include this accommodation, there seems to be no such help for "sha.c", so the build hangs where it tries to compile that module. If I understood Perl well enough to puzzle out the details of these "makefile.pl" files, then I might be able to offer an actual patch, but I don't, and the two "makefile.pl" files are not identical enough to let me be confident in a guess. None of this matters much, but for completeness: GIMP $ perl "-V" Summary of my perl5 (revision 5 version 12 subversion 3) configuration: Platform: osname=VMS, osvers=V7.3, archname=VMS_VAX uname='VMS gimp V7.3 VAX 4000-200' config_args='' hint=none, useposix=false, d_sigaction=define useithreads=undef, usemultiplicity=undef useperlio=define, d_sfio=undef, uselargefiles=undef, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=undef, bincompat5005=undef Compiler: cc='CC/DECC', ccflags ='/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj ', optimize='/NoList', cppflags='undef' ccversion='60490005', gccversion='', gccosandvers='undef' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=0, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='int', lseeksize=4 alignbytes=8, prototype=define Linker and Libraries: ld='Link/nodebug', ldflags ='/NoTrace/NoMap' libpth=/sys$share /sys$library libs= perllibs= libc=(DECCRTL), so=exe, useshrplib=true, libperl=undef gnulibc_version='undef' Dynamic Linking: dlsrc=dl_vms.c, dlext=exe, d_dlsymun=undef, ccdlflags='' cccdlflags='', lddlflags='/Share' Characteristics of this PERLSHR image: Compile-time options: DECCRTL_SOCKETS PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP USE_PERLIO USE_PERL_ATOF VMS_DO_SOCKETS Built under VMS Compiled at Mar 3 2011 17:39:00 %ENV: PERLSHR="PERL_ROOT:[000000]PERLSHR.EXE" PERL_ROOT="GIMP$DUA0:[PERL-5_12_3.]" @INC: perl_root:[lib.site_perl.VMS_VAX] perl_root:[lib.site_perl] perl_root:[lib.VMS_VAX.5_12_3] perl_root:[lib] . ##### # Craig Berry: ##### It should really be forwarded upstream to the Digest::SHA queue. The following should do the trick, though I don't currently have a working VAX build environment to test it. --- Makefile.PL;-0 2012-09-25 05:45:07 -0500 +++ Makefile.PL 2012-10-12 08:54:03 -0500 @@ -26,6 +26,12 @@ if ($Config{archname} =~ /^i[3456]86/) { my $define = join(' ', @defines); +my @optimize = (); +if ($^O eq 'VMS' && $Config{archname} =~ m/VMS_VAX/) { + # VAX compiler optimizer even as late as v6.4 gets stuck + push(@optimize, 'OPTIMIZE' => '/Optimize=(NODISJOINT)'); +} + my %att = ( 'NAME' => 'Digest::SHA', 'VERSION_FROM' => $PM, @@ -34,6 +40,7 @@ my %att = ( 'INC' => '-I.', 'EXE_FILES' => [ 'shasum' ], 'INSTALLDIRS' => ($] >= 5.010 and $] < 5.011) ? 'perl' : 'site', + @optimize, ); my $MMversion = $ExtUtils::MakeMaker::VERSION || 0; [end] ##### Thank you very much. Jim Keenan
On Fri Oct 12 20:02:51 2012, JKEENAN wrote: Show quoted text
> # Craig Berry: > ##### > It should really be forwarded upstream to the Digest::SHA queue. The > following should do the trick, though I don't currently have a working > VAX build environment to test it. > > --- Makefile.PL;-0 2012-09-25 05:45:07 -0500 > +++ Makefile.PL 2012-10-12 08:54:03 -0500 > @@ -26,6 +26,12 @@ if ($Config{archname} =~ /^i[3456]86/) { > > my $define = join(' ', @defines); > > +my @optimize = (); > +if ($^O eq 'VMS' && $Config{archname} =~ m/VMS_VAX/) { > + # VAX compiler optimizer even as late as v6.4 gets stuck > + push(@optimize, 'OPTIMIZE' => '/Optimize=(NODISJOINT)'); > +} > + > my %att = ( > 'NAME' => 'Digest::SHA', > 'VERSION_FROM' => $PM, > @@ -34,6 +40,7 @@ my %att = ( > 'INC' => '-I.', > 'EXE_FILES' => [ 'shasum' ], > 'INSTALLDIRS' => ($] >= 5.010 and $] < 5.011) ? 'perl' : 'site', > + @optimize, > ); > > my $MMversion = $ExtUtils::MakeMaker::VERSION || 0; > [end] > #####
In Digest::MD5, Gisle's workaround for the compiler bug has an extra bit of logic, viz. if ($^O eq 'VMS') { if (defined($Config{ccname})) { if (grep(/VMS_VAX/, @INC) && ($Config{ccname} eq 'DEC')) { # VAX compiler optimizer even as late as v6.4 gets stuck push(@extra, OPTIMIZE => "/Optimize=(NODISJOINT)"); } } } Once I get a rationale for which is the better patch, I'll be happy to include it in the next release of Digest::SHA. Also, some assurance should be provided that the logic is indeed restrictive enough so as not to break builds that are currently compiling just fine. Regards, Mark Shelor
CC: sms [...] antinode.info, jkeenan [...] cpan.org
Subject: Re: [rt.cpan.org #80157] [RT #85932]: VMS VAX (V7.3) build of Perl 5.12.3 hangs at sha.c
Date: Sat, 13 Oct 2012 09:59:53 -0500
To: bug-Digest-SHA [...] rt.cpan.org
From: "Craig A. Berry" <craig.a.berry [...] gmail.com>
On Sat, Oct 13, 2012 at 3:58 AM, Mark Shelor via RT <bug-Digest-SHA@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=80157 > > > On Fri Oct 12 20:02:51 2012, JKEENAN wrote: >
>> # Craig Berry: >> ##### >> It should really be forwarded upstream to the Digest::SHA queue. The >> following should do the trick, though I don't currently have a working >> VAX build environment to test it. >> >> --- Makefile.PL;-0 2012-09-25 05:45:07 -0500 >> +++ Makefile.PL 2012-10-12 08:54:03 -0500 >> @@ -26,6 +26,12 @@ if ($Config{archname} =~ /^i[3456]86/) { >> >> my $define = join(' ', @defines); >> >> +my @optimize = (); >> +if ($^O eq 'VMS' && $Config{archname} =~ m/VMS_VAX/) { >> + # VAX compiler optimizer even as late as v6.4 gets stuck >> + push(@optimize, 'OPTIMIZE' => '/Optimize=(NODISJOINT)'); >> +} >> + >> my %att = ( >> 'NAME' => 'Digest::SHA', >> 'VERSION_FROM' => $PM, >> @@ -34,6 +40,7 @@ my %att = ( >> 'INC' => '-I.', >> 'EXE_FILES' => [ 'shasum' ], >> 'INSTALLDIRS' => ($] >= 5.010 and $] < 5.011) ? 'perl' : 'site', >> + @optimize, >> ); >> >> my $MMversion = $ExtUtils::MakeMaker::VERSION || 0; >> [end] >> #####
> > In Digest::MD5, Gisle's workaround for the compiler bug has an extra bit > of logic, viz. > > if ($^O eq 'VMS') { > if (defined($Config{ccname})) { > if (grep(/VMS_VAX/, @INC) && ($Config{ccname} eq 'DEC')) { > # VAX compiler optimizer even as late as v6.4 gets stuck > push(@extra, OPTIMIZE => "/Optimize=(NODISJOINT)"); > } > } > } > > Once I get a rationale for which is the better patch, I'll be happy to > include it in the next release of Digest::SHA. Also, some assurance > should be provided that the logic is indeed restrictive enough so as not > to break builds that are currently compiling just fine. > > Regards, Mark Shelor
The check for the definedness of $Config{ccname} doesn't do any harm but is probably overkill as I added that variable to the VMS configuration process way back in <http://perl5.git.perl.org/perl.git/commit/414b89ccea265fe71267b799abd1b083fb5c443d?f=configure.com>. The check for $Config{ccname} itself presupposes that someone could be using a compiler other than DEC C, which is pretty unlikely but theoretically possible. Adding C<&& $Config{ccname} eq 'DEC'> at the end of the check I posted earlier would be a reasonable defensive programming strategy.
RT-Send-CC: gisle [...] ActiveState.com, jkeenan [...] cpan.org, craig.a.berry [...] gmail.com
OK, what I plan to do is apply Gisle's DEC compiler bug workaround to the Digest::SHA Makefile. His Digest::MD5 module has gotten very wide and heavy usage since the workaround was applied in 1999. One can be reasonably confident that it's robust and won't cause inadvertent breakage. If I don't receive any further comments or replies, I'll assume everyone's happy with this approach. Mark
CC: gisle [...] activestate.com, jkeenan [...] cpan.org
Subject: Re: [rt.cpan.org #80157] [RT #85932]: VMS VAX (V7.3) build of Perl 5.12.3 hangs at sha.c
Date: Sat, 13 Oct 2012 14:30:40 -0500
To: bug-Digest-SHA [...] rt.cpan.org
From: "Craig A. Berry" <craig.a.berry [...] gmail.com>
On Sat, Oct 13, 2012 at 12:37 PM, Mark Shelor via RT <bug-Digest-SHA@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=80157 > > > OK, what I plan to do is apply Gisle's DEC compiler bug workaround to > the Digest::SHA Makefile. His Digest::MD5 module has gotten very wide > and heavy usage since the workaround was applied in 1999. One can be > reasonably confident that it's robust and won't cause inadvertent breakage. > > If I don't receive any further comments or replies, I'll assume > everyone's happy with this approach.
I'm happy with that approach but do note you can't simply drop in the Digest::MD5 code verbatim as it's using an @extra array that includes both defines and optimization options. My patch added @optimize as a separate array since you're handling defines somewhat differently. Maybe that's too obvious to mention, but I'm mentioning it anyway on the better safe than sorry principle.
RT-Send-CC: craig.a.berry [...] gmail.com, jkeenan [...] cpan.org
On Sat Oct 13 15:30:59 2012, craig.a.berry@gmail.com wrote: Show quoted text
> On Sat, Oct 13, 2012 at 12:37 PM, Mark Shelor via RT > <bug-Digest-SHA@rt.cpan.org> wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=80157 > > > > > OK, what I plan to do is apply Gisle's DEC compiler bug workaround
> to
> > the Digest::SHA Makefile. His Digest::MD5 module has gotten very
> wide
> > and heavy usage since the workaround was applied in 1999. One can
> be
> > reasonably confident that it's robust and won't cause inadvertent
> breakage.
> > > > If I don't receive any further comments or replies, I'll assume > > everyone's happy with this approach.
> > I'm happy with that approach but do note you can't simply drop in the > Digest::MD5 code verbatim as it's using an @extra array that includes > both defines and optimization options. My patch added @optimize as a > separate array since you're handling defines somewhat differently. > Maybe that's too obvious to mention, but I'm mentioning it anyway on > the better safe than sorry principle.
I prepared a trial version of Digest::SHA to workaround the DEC compiler bug, but there seems to be no one with a functioning VAX/Perl environment who can actually confirm whether it works. Untested changes aren't acceptable in a core module, so I'm rejecting the bug report until someone can test the workaround. Mark
CC: sms [...] antinode.info, jkeenan [...] cpan.org
Subject: Re: [rt.cpan.org #80157] [RT #85932]: VMS VAX (V7.3) build of Perl 5.12.3 hangs at sha.c
Date: Sat, 20 Oct 2012 07:49:16 -0500
To: bug-Digest-SHA [...] rt.cpan.org
From: "Craig A. Berry" <craig.a.berry [...] gmail.com>
On Fri, Oct 19, 2012 at 9:35 PM, Mark Shelor via RT <bug-Digest-SHA@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=80157 > > > On Sat Oct 13 15:30:59 2012, craig.a.berry@gmail.com wrote:
>> On Sat, Oct 13, 2012 at 12:37 PM, Mark Shelor via RT >> <bug-Digest-SHA@rt.cpan.org> wrote:
>> > <URL: https://rt.cpan.org/Ticket/Display.html?id=80157 > >> > >> > OK, what I plan to do is apply Gisle's DEC compiler bug workaround
>> to
>> > the Digest::SHA Makefile. His Digest::MD5 module has gotten very
>> wide
>> > and heavy usage since the workaround was applied in 1999. One can
>> be
>> > reasonably confident that it's robust and won't cause inadvertent
>> breakage.
>> > >> > If I don't receive any further comments or replies, I'll assume >> > everyone's happy with this approach.
>> >> I'm happy with that approach but do note you can't simply drop in the >> Digest::MD5 code verbatim as it's using an @extra array that includes >> both defines and optimization options. My patch added @optimize as a >> separate array since you're handling defines somewhat differently. >> Maybe that's too obvious to mention, but I'm mentioning it anyway on >> the better safe than sorry principle.
> > > I prepared a trial version of Digest::SHA to workaround the DEC compiler > bug, but there seems to be no one with a functioning VAX/Perl > environment who can actually confirm whether it works. > > Untested changes aren't acceptable in a core module,
As I explained in private e-mail, I *have* tested the change by simulating the architecture name on another system. It's not a perfect test, but it's not a bad one either. Show quoted text
> so I'm rejecting > the bug report until someone can test the workaround.
And in doing so you're preferring a state of affairs that is 100% guaranteed to fail over a state of affairs that is 99.9% guaranteed to succeed. I don't get it. I have been tinkering with getting a VAX build going again and may eventually succeed. It would have a higher chance of succeeding if this change were already there when I get that far.
RT-Send-CC: craig.a.berry [...] gmail.com, jkeenan [...] cpan.org
On Sat Oct 20 08:49:25 2012, craig.a.berry@gmail.com wrote: Show quoted text
> On Fri, Oct 19, 2012 at 9:35 PM, Mark Shelor via RT > <bug-Digest-SHA@rt.cpan.org> wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=80157 > > > > > On Sat Oct 13 15:30:59 2012, craig.a.berry@gmail.com wrote:
> >> On Sat, Oct 13, 2012 at 12:37 PM, Mark Shelor via RT > >> <bug-Digest-SHA@rt.cpan.org> wrote:
> >> > <URL: https://rt.cpan.org/Ticket/Display.html?id=80157 > > >> > > >> > OK, what I plan to do is apply Gisle's DEC compiler bug workaround
> >> to
> >> > the Digest::SHA Makefile. His Digest::MD5 module has gotten very
> >> wide
> >> > and heavy usage since the workaround was applied in 1999. One can
> >> be
> >> > reasonably confident that it's robust and won't cause inadvertent
> >> breakage.
> >> > > >> > If I don't receive any further comments or replies, I'll assume > >> > everyone's happy with this approach.
> >> > >> I'm happy with that approach but do note you can't simply drop in the > >> Digest::MD5 code verbatim as it's using an @extra array that includes > >> both defines and optimization options. My patch added @optimize as a > >> separate array since you're handling defines somewhat differently. > >> Maybe that's too obvious to mention, but I'm mentioning it anyway on > >> the better safe than sorry principle.
> > > > > > I prepared a trial version of Digest::SHA to workaround the DEC compiler > > bug, but there seems to be no one with a functioning VAX/Perl > > environment who can actually confirm whether it works. > > > > Untested changes aren't acceptable in a core module,
> > As I explained in private e-mail, I *have* tested the change by > simulating the architecture name on another system. It's not a > perfect test, but it's not a bad one either. >
> > so I'm rejecting > > the bug report until someone can test the workaround.
> > And in doing so you're preferring a state of affairs that is 100% > guaranteed to fail over a state of affairs that is 99.9% guaranteed to > succeed. I don't get it. > > I have been tinkering with getting a VAX build going again and may > eventually succeed. It would have a higher chance of succeeding if > this change were already there when I get that far.
You now have a trial fix. When and if you get around to having an actual test environment rather than a simulated one, you can try it out and report back to me. I'll then publish it. But I'll need two transcripts: the first showing a failed build prior to the fix, and the second showing success with the fix applied. Issuing trouble tickets is a formal process with requirements for precision. You're using it instead as a means of convenience for getting something that might be useful to you in the future. Even though no one provided an actual failure report as part of the trouble ticket, I prepared a trial fix anyway and submitted it informally for test. If you can't arrange to actually find someone with a working environment, then I'll have to assume that the problem is marginal at best and of no real interest to anyone. Mark
CC: sms [...] antinode.info, jkeenan [...] cpan.org
Subject: Re: [rt.cpan.org #80157] [RT #85932]: VMS VAX (V7.3) build of Perl 5.12.3 hangs at sha.c
Date: Fri, 26 Oct 2012 13:38:03 -0500
To: bug-Digest-SHA [...] rt.cpan.org
From: "Craig A. Berry" <craig.a.berry [...] gmail.com>
On Sat, Oct 20, 2012 at 9:01 AM, Mark Shelor via RT <bug-Digest-SHA@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=80157 > > > On Sat Oct 20 08:49:25 2012, craig.a.berry@gmail.com wrote:
>> On Fri, Oct 19, 2012 at 9:35 PM, Mark Shelor via RT >> <bug-Digest-SHA@rt.cpan.org> wrote:
>> > <URL: https://rt.cpan.org/Ticket/Display.html?id=80157 > >> > >> > On Sat Oct 13 15:30:59 2012, craig.a.berry@gmail.com wrote:
>> >> On Sat, Oct 13, 2012 at 12:37 PM, Mark Shelor via RT >> >> <bug-Digest-SHA@rt.cpan.org> wrote:
>> >> > <URL: https://rt.cpan.org/Ticket/Display.html?id=80157 > >> >> > >> >> > OK, what I plan to do is apply Gisle's DEC compiler bug workaround
>> >> to
>> >> > the Digest::SHA Makefile. His Digest::MD5 module has gotten very
>> >> wide
>> >> > and heavy usage since the workaround was applied in 1999. One can
>> >> be
>> >> > reasonably confident that it's robust and won't cause inadvertent
>> >> breakage.
>> >> > >> >> > If I don't receive any further comments or replies, I'll assume >> >> > everyone's happy with this approach.
>> >> >> >> I'm happy with that approach but do note you can't simply drop in the >> >> Digest::MD5 code verbatim as it's using an @extra array that includes >> >> both defines and optimization options. My patch added @optimize as a >> >> separate array since you're handling defines somewhat differently. >> >> Maybe that's too obvious to mention, but I'm mentioning it anyway on >> >> the better safe than sorry principle.
>> > >> > >> > I prepared a trial version of Digest::SHA to workaround the DEC compiler >> > bug, but there seems to be no one with a functioning VAX/Perl >> > environment who can actually confirm whether it works. >> > >> > Untested changes aren't acceptable in a core module,
>> >> As I explained in private e-mail, I *have* tested the change by >> simulating the architecture name on another system. It's not a >> perfect test, but it's not a bad one either. >>
>> > so I'm rejecting >> > the bug report until someone can test the workaround.
>> >> And in doing so you're preferring a state of affairs that is 100% >> guaranteed to fail over a state of affairs that is 99.9% guaranteed to >> succeed. I don't get it. >> >> I have been tinkering with getting a VAX build going again and may >> eventually succeed. It would have a higher chance of succeeding if >> this change were already there when I get that far.
> > > You now have a trial fix. When and if you get around to having an > actual test environment rather than a simulated one, you can try it out > and report back to me. I'll then publish it. > > But I'll need two transcripts: the first showing a failed build prior to > the fix
A transcript for a problem that produces no output makes no sense. I did reproduce the compiler getting stuck as reported by the OP. Show quoted text
>, and the second showing success with the fix applied.
Here ya go. $ perl -v This is perl 5, version 17, subversion 6 (v5.17.6 (v5.17.5-51-g6c1c521)) built for VMS_VAX Copyright 1987-2012, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. $ cc/vers Compaq C V6.4-005 on OpenVMS VAX V7.3 $ search [.lib.Digest]*.pm "$VERSION =" ****************************** DUA1:[CRAIG.DIGEST-SHA-5_73.LIB.DIGEST]SHA.PM;1 $VERSION = '5.73'; $ perl Makefile.PL Checking if your kit is complete... Looks good Writing Descrip.MMS for Digest::SHA Writing MYMETA.yml and MYMETA.json $ mmk Skip [.blib.lib.digest]sha.pm (unchanged) MCR dua1:[craig.blead]ndbgperl.exe.2 perl_root:[lib.ExtUtils]xsubpp -nolinenumbers -typemap perl_root:[lib.ExtUtils]typemap -typema p typemap SHA.xs >SHA.C CC/DECC /Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj /NAMES=(SHORTENED)/FLOAT=G_FLOAT/Define=(SHA_PERL_MODULE,"VERSION=""5. 73""","XS_VERSION=""5.73""")/Include=(perl_root:[lib.VMS_VAX.5_17_6.CORE],[])/Optimize=(NODISJOINT) SHA.c If F$Search("[.BLIB.ARCH.AUTO.DIGEST.SHA]SHA.OLB").eqs."" Then Library/Object/Create [.BLIB.ARCH.AUTO.DIGEST.SHA]SHA.OLB Library/Object/Replace [.BLIB.ARCH.AUTO.DIGEST.SHA]SHA.OLB SHA.OBJ If F$TrnLNm("DBGPerlShr").eqs."" Then Define/NoLog/User DBGPerlShr Sys$Share:DBGPerlShr.exe Link /Debug/Trace/Map /Shareable=[.BLIB.ARCH.AUTO.DIGEST.SHA]PL_DIGEST__SHA.EXE SHA.opt/Option,perl_root:[lib.VMS_VAX.5_17_6.CORE]pe rlshr_attr.opt/Option Running Mkbootstrap for Digest::SHA () MCR dua1:[craig.blead]ndbgperl.exe.2 "-MExtUtils::Command" -e "chmod" "--" 644 SHA.BS MCR dua1:[craig.blead]ndbgperl.exe.2 "-MExtUtils::Command" -e "cp" "--" SHA.bs [.BLIB.ARCH.AUTO.DIGEST.SHA]SHA.BS MCR dua1:[craig.blead]ndbgperl.exe.2 "-MExtUtils::Command" -e "chmod" "--" 644 [.BLIB.ARCH.AUTO.DIGEST.SHA]SHA.BS MCR dua1:[craig.blead]ndbgperl.exe.2 "-MExtUtils::Command" -e "cp" "--" shasum [.blib.script]shasum MCR dua1:[craig.blead]ndbgperl.exe.2 "-MExtUtils::MY" -e "MY->fixin(shift)" "--" [.blib.script]shasum $ mmk test MCR dua1:[craig.blead]ndbgperl.exe.2 "-MExtUtils::Command::MM" "-e" "test_harness(0, '[.blib.lib]', '[.blib.arch]')" t/*.t t/allfcns.t .... ok t/base64.t ..... ok t/bitbuf.t ..... ok t/dumpload.t ... ok t/fips180-4.t .. ok t/fips198.t .... ok t/gg.t ......... ok t/gglong.t ..... ok t/hmacsha.t .... ok t/ireland.t .... ok t/methods.t .... ok t/nistbit.t .... ok t/nistbyte.t ... ok t/pod.t ........ skipped: Test::Pod 1.00 required for testing POD t/podcover.t ... skipped: Test::Pod::Coverage 0.08 required for testing POD coverage t/rfc2202.t .... ok t/sha1.t ....... ok t/sha224.t ..... ok t/sha256.t ..... ok t/sha384.t ..... ok t/sha512.t ..... ok t/woodbury.t ... ok All tests successful. Files=22, Tests=126, 1415 wallclock secs (16.43 usr + 0.00 sys = 16.43 CPU) Result: PASS Show quoted text
> Issuing trouble tickets is a formal process with requirements for > precision. You're using it instead as a means of convenience for > getting something that might be useful to you in the future.
Whoa. I'm not attacking your way of life and I'm sorry you got that impression. Show quoted text
> Even though no one provided an actual failure report as part of the > trouble ticket,
Well, the OP said, "the compiler loops" and "the build hangs". If you can't even get the extension to compile, and the compiler doesn't produce any error messages because it's stuck in a cpu-bound loop, then you obviously won't see any test failures either. Show quoted text
>I prepared a trial fix anyway and submitted it > informally for test. If you can't arrange to actually find someone with > a working environment, then I'll have to assume that the problem is > marginal at best and of no real interest to anyone.
It was interesting enough to the OP that he reported it and provided the compiler flag that fixed the problem. It was interesting enough to me that I provided changes to the Makefile.PL that would produce that compiler flag and tested those changes, and then tested your slightly inferior but still workable alternative changes, and have now done a third test demonstrating that when we know the compiler flag works and we know that generating the compiler flags works, lo and behold, the combination also works.
RT-Send-CC: sms [...] antinode.info, craig.a.berry [...] gmail.com, jkeenan [...] cpan.org
On Fri Oct 26 14:38:15 2012, craig.a.berry@gmail.com wrote: Show quoted text
> On Sat, Oct 20, 2012 at 9:01 AM, Mark Shelor via RT > <bug-Digest-SHA@rt.cpan.org> wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=80157 > > > > > On Sat Oct 20 08:49:25 2012, craig.a.berry@gmail.com wrote:
> >> On Fri, Oct 19, 2012 at 9:35 PM, Mark Shelor via RT > >> <bug-Digest-SHA@rt.cpan.org> wrote:
> >> > <URL: https://rt.cpan.org/Ticket/Display.html?id=80157 > > >> > > >> > On Sat Oct 13 15:30:59 2012, craig.a.berry@gmail.com wrote:
> >> >> On Sat, Oct 13, 2012 at 12:37 PM, Mark Shelor via RT > >> >> <bug-Digest-SHA@rt.cpan.org> wrote:
> >> >> > <URL: https://rt.cpan.org/Ticket/Display.html?id=80157 > > >> >> > > >> >> > OK, what I plan to do is apply Gisle's DEC compiler bug
> workaround
> >> >> to
> >> >> > the Digest::SHA Makefile. His Digest::MD5 module has gotten
> very
> >> >> wide
> >> >> > and heavy usage since the workaround was applied in 1999. One
> can
> >> >> be
> >> >> > reasonably confident that it's robust and won't cause
> inadvertent
> >> >> breakage.
> >> >> > > >> >> > If I don't receive any further comments or replies, I'll
> assume
> >> >> > everyone's happy with this approach.
> >> >> > >> >> I'm happy with that approach but do note you can't simply drop
> in the
> >> >> Digest::MD5 code verbatim as it's using an @extra array that
> includes
> >> >> both defines and optimization options. My patch added @optimize
> as a
> >> >> separate array since you're handling defines somewhat
> differently.
> >> >> Maybe that's too obvious to mention, but I'm mentioning it
> anyway on
> >> >> the better safe than sorry principle.
> >> > > >> > > >> > I prepared a trial version of Digest::SHA to workaround the DEC
> compiler
> >> > bug, but there seems to be no one with a functioning VAX/Perl > >> > environment who can actually confirm whether it works. > >> > > >> > Untested changes aren't acceptable in a core module,
> >> > >> As I explained in private e-mail, I *have* tested the change by > >> simulating the architecture name on another system. It's not a > >> perfect test, but it's not a bad one either. > >>
> >> > so I'm rejecting > >> > the bug report until someone can test the workaround.
> >> > >> And in doing so you're preferring a state of affairs that is 100% > >> guaranteed to fail over a state of affairs that is 99.9% guaranteed
> to
> >> succeed. I don't get it. > >> > >> I have been tinkering with getting a VAX build going again and may > >> eventually succeed. It would have a higher chance of succeeding if > >> this change were already there when I get that far.
> > > > > > You now have a trial fix. When and if you get around to having an > > actual test environment rather than a simulated one, you can try it
> out
> > and report back to me. I'll then publish it. > > > > But I'll need two transcripts: the first showing a failed build
> prior to
> > the fix
> > A transcript for a problem that produces no output makes no sense. I > did reproduce the compiler getting stuck as reported by the OP. >
> >, and the second showing success with the fix applied.
> > Here ya go. > > $ perl -v > > This is perl 5, version 17, subversion 6 (v5.17.6 > (v5.17.5-51-g6c1c521)) built for VMS_VAX > > Copyright 1987-2012, Larry Wall > > Perl may be copied only under the terms of either the Artistic License > or the > GNU General Public License, which may be found in the Perl 5 source > kit. > > Complete documentation for Perl, including FAQ lists, should be found > on > this system using "man perl" or "perldoc perl". If you have access to > the > Internet, point your browser at http://www.perl.org/, the Perl Home > Page. > > $ cc/vers > Compaq C V6.4-005 on OpenVMS VAX V7.3 > $ search [.lib.Digest]*.pm "$VERSION =" > > ****************************** > DUA1:[CRAIG.DIGEST-SHA-5_73.LIB.DIGEST]SHA.PM;1 > > $VERSION = '5.73'; > $ perl Makefile.PL > Checking if your kit is complete... > Looks good > Writing Descrip.MMS for Digest::SHA > Writing MYMETA.yml and MYMETA.json > $ mmk > Skip [.blib.lib.digest]sha.pm (unchanged) > MCR dua1:[craig.blead]ndbgperl.exe.2 perl_root:[lib.ExtUtils]xsubpp > -nolinenumbers -typemap perl_root:[lib.ExtUtils]typemap -typema > p typemap SHA.xs >SHA.C > CC/DECC /Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj > /NAMES=(SHORTENED)/FLOAT=G_FLOAT/Define=(SHA_PERL_MODULE,"VERSION=""5. >
73""","XS_VERSION=""5.73""")/Include=(perl_root:[lib.VMS_VAX.5_17_6.CORE],[])/Optimize=(NODISJOINT) Show quoted text
> SHA.c > If F$Search("[.BLIB.ARCH.AUTO.DIGEST.SHA]SHA.OLB").eqs."" Then > Library/Object/Create [.BLIB.ARCH.AUTO.DIGEST.SHA]SHA.OLB > Library/Object/Replace [.BLIB.ARCH.AUTO.DIGEST.SHA]SHA.OLB SHA.OBJ > If F$TrnLNm("DBGPerlShr").eqs."" Then Define/NoLog/User DBGPerlShr > Sys$Share:DBGPerlShr.exe > Link /Debug/Trace/Map > /Shareable=[.BLIB.ARCH.AUTO.DIGEST.SHA]PL_DIGEST__SHA.EXE > SHA.opt/Option,perl_root:[lib.VMS_VAX.5_17_6.CORE]pe > rlshr_attr.opt/Option > Running Mkbootstrap for Digest::SHA () > MCR dua1:[craig.blead]ndbgperl.exe.2 "-MExtUtils::Command" -e "chmod" > "--" 644 SHA.BS > MCR dua1:[craig.blead]ndbgperl.exe.2 "-MExtUtils::Command" -e "cp" > "--" SHA.bs [.BLIB.ARCH.AUTO.DIGEST.SHA]SHA.BS > MCR dua1:[craig.blead]ndbgperl.exe.2 "-MExtUtils::Command" -e "chmod" > "--" 644 [.BLIB.ARCH.AUTO.DIGEST.SHA]SHA.BS > MCR dua1:[craig.blead]ndbgperl.exe.2 "-MExtUtils::Command" -e "cp" > "--" shasum [.blib.script]shasum > MCR dua1:[craig.blead]ndbgperl.exe.2 "-MExtUtils::MY" -e > "MY->fixin(shift)" "--" [.blib.script]shasum > $ mmk test > MCR dua1:[craig.blead]ndbgperl.exe.2 "-MExtUtils::Command::MM" "-e" > "test_harness(0, '[.blib.lib]', '[.blib.arch]')" t/*.t > t/allfcns.t .... ok > t/base64.t ..... ok > t/bitbuf.t ..... ok > t/dumpload.t ... ok > t/fips180-4.t .. ok > t/fips198.t .... ok > t/gg.t ......... ok > t/gglong.t ..... ok > t/hmacsha.t .... ok > t/ireland.t .... ok > t/methods.t .... ok > t/nistbit.t .... ok > t/nistbyte.t ... ok > t/pod.t ........ skipped: Test::Pod 1.00 required for testing POD > t/podcover.t ... skipped: Test::Pod::Coverage 0.08 required for > testing POD coverage > t/rfc2202.t .... ok > t/sha1.t ....... ok > t/sha224.t ..... ok > t/sha256.t ..... ok > t/sha384.t ..... ok > t/sha512.t ..... ok > t/woodbury.t ... ok > All tests successful. > Files=22, Tests=126, 1415 wallclock secs (16.43 usr + 0.00 sys = > 16.43 CPU) > Result: PASS >
> > Issuing trouble tickets is a formal process with requirements for > > precision. You're using it instead as a means of convenience for > > getting something that might be useful to you in the future.
> > Whoa. I'm not attacking your way of life and I'm sorry you got that > impression. >
> > Even though no one provided an actual failure report as part of the > > trouble ticket,
> > Well, the OP said, "the compiler loops" and "the build hangs". If > you can't even get the extension to compile, and the compiler doesn't > produce any error messages because it's stuck in a cpu-bound loop, > then you obviously won't see any test failures either. >
> >I prepared a trial fix anyway and submitted it > > informally for test. If you can't arrange to actually find someone
> with
> > a working environment, then I'll have to assume that the problem is > > marginal at best and of no real interest to anyone.
> > It was interesting enough to the OP that he reported it and provided > the compiler flag that fixed the problem. It was interesting enough > to me that I provided changes to the Makefile.PL that would produce > that compiler flag and tested those changes, and then tested your > slightly inferior but still workable alternative changes, and have now > done a third test demonstrating that when we know the compiler flag > works and we know that generating the compiler flags works, lo and > behold, the combination also works.
On more careful consideration of the issue, motivated of course by the tone of your reply, I'm now rejecting this bug for the simple reason that it's not up to potentially myriad client applications to compensate for bugs originating at an external source. The more appropriate course for achieving a workaround is handle the problem in the build generator (e.g. ExtUtils::MakeMaker) so that all client applications can inherit it. Also, if you want to regard the more careful and restricted changes as "inferior," then you should take that up with Gisle. At the risk of contradicting you, his version strikes me as superior in that it prevents the flags from possibly being misapplied. In addition, his version has been around since 1999, so it's well tested. Mark
CC: sms [...] antinode.info, jkeenan [...] cpan.org
Subject: Re: [rt.cpan.org #80157] [RT #85932]: VMS VAX (V7.3) build of Perl 5.12.3 hangs at sha.c
Date: Sat, 27 Oct 2012 14:48:37 -0500
To: bug-Digest-SHA [...] rt.cpan.org
From: "Craig A. Berry" <craig.a.berry [...] gmail.com>
On Fri, Oct 26, 2012 at 5:48 PM, Mark Shelor via RT <bug-Digest-SHA@rt.cpan.org> wrote: Show quoted text
Show quoted text
> On more careful consideration of the issue, motivated of course by the > tone of your reply, I'm now rejecting this bug
I don't know where your animosity comes from. Where my "tone" comes from is my growing frustration with your unreasonable demands, moving goalposts, and from having done work based on a commitment you made only to break shortly thereafter. Show quoted text
> for the simple reason > that it's not up to potentially myriad client applications to compensate > for bugs originating at an external source. > > The more appropriate course for achieving a workaround is handle the > problem in the build generator (e.g. ExtUtils::MakeMaker) so that all > client applications can inherit it.
Be serious. All portable code has workarounds for various environments and you already have a comparable workaround for x86 architectures. The fix in question here just uses the supported mechanism in MakeMaker to do exactly what it was intended to. Show quoted text
> Also, if you want to regard the more careful and restricted changes as > "inferior," then you should take that up with Gisle. At the risk of > contradicting you, his version strikes me as superior in that it > prevents the flags from possibly being misapplied. In addition, his > version has been around since 1999, so it's well tested.
It's not Gisle's version and it wasn't 1999. The workaround was written by a domain expert (Peter Prymmer) and submitted to blead in 2001, where it was applied without question by Jarkko. I made further revisions to it in 2002. It has a workaround for a Configure bug I fixed in 2001 so it's not as concise as we could make it now, but there's nothing really wrong with it (that's why I said "*slightly* inferior"). Finally (also in 2002) Gisle simply synched up with what was in the core and released version 2.21 of Digest::MD5 (<https://github.com/gisle/digest-md5/commit/2eb8d88434ab4345c254a0bdf43dfffcb97775f4>). Which is a great example of how to do things and one that you can now easily follow since I've pushed the fix to blead as Digest::SHA 5.72_01: <http://perl5.git.perl.org/perl.git/commit/560a4009bab00b294a28f584f9b812b7c1273d94> If the next CPAN release version has the fix in it, I'll be happy to integrate it into blead for you.
On Sat Oct 27 15:48:49 2012, craig.a.berry@gmail.com wrote: Show quoted text
> If the next CPAN release version has the fix in it, I'll be happy to > integrate it into blead for you.
OK, good. I see that you went with the version I submitted rather than your original code, which contained no check for the compiler being used. Your original code ran the risk of possibly breaking VAX VMS builds that don't use the DEC compiler. Even if such builds don't occur now, they may do so in the future. It's impossible to accept your argument that the more careful version of the code (which DOES check on the compiler being used) is in ANY way inferior, be it slight or otherwise.