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