Front page | perl.perl5.porters |
Postings from June 2001
[patch perl@10996] "fix" VAX Digest/MD5, Fcntl, brokennes in SDBM
Thread Next
From:
Peter Prymmer
Date:
June 27, 2001 17:33
Subject:
[patch perl@10996] "fix" VAX Digest/MD5, Fcntl, brokennes in SDBM
Message ID:
Pine.OSF.4.10.10106271705390.467850-100000@aspara.forte.com
I am afraid that the introducton of new bugs is beginning to outstrip
my ability to work around the old ones.
Here, e.g. is what happens in the build of perl@10996 with:
$ cc/ver nl:
DEC C V6.0-001 on OpenVMS Alpha V7.2-1
Now we're building extensions and:
Making SDBM_File (dynamic)
Writing Descrip.MMS for sdbm
Writing Descrip.MMS for SDBM_File
%CREATE-I-EXISTS, [--.LIB.AUTO.SDBM_FILE] already exists
MCR dka100:[perl]miniperl.exe "-I[--.lib]" "-MExtUtils::Install" -e
"pm_to_blib({split(' ',<STDIN>)},'[--.lib.auto]','')" <.MM_tmp
cp sdbm_file.pm [--.lib]sdbm_file.pm
set def [.sdbm]
MMS all
%MMS-W-GMFUTURE, Time for [---]PATCHLEVEL.H is in the future: 27-JUN-2001
21:32:40.00
CC/DECC
/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoList/Define=(SDBM,DUFF,"VERSION=""0.10""","XS_VERSION=""0.10""")/Include=([---],[---])/Optimize
SDBM.c
CC/DECC
/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoList/Define=(SDBM,DUFF,"VERSION=""0.10""","XS_VERSION=""0.10""")/Include=([---],[---])/Optimize
PAIR.c
CC/DECC
/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoList/Define=(SDBM,DUFF,"VERSION=""0.10""","XS_VERSION=""0.10""")/Include=([---],[---])/Optimize
HASH.c
If F$Search("LIBSDBM.OLB").eqs."" Then Library/Object/Create LIBSDBM.OLB
Library/Object/Replace LIBSDBM.OLB SDBM.OBJ, PAIR.OBJ, HASH.OBJ
%MMS-F-ABORT, For target [.SDBM]LIBSDBM.OLB, CLI returned abort status:
%X10EE8180.
%MMS-F-ABORT, For target DYNEXT, CLI returned abort status: %X10EE8034.
so that is broken.
BTW here is a patch that I had hoped to help the VAX running
$ cc/ver nl:
DEC C V5.3-006 on OpenVMS VAX V6.2
Special thanks to Robert Alan Byer for the /opt=(NODISJ) suggestion for
MD5, it seemed to work. Note that this patch adds an extra surprise
to ext/Digest/MD5/Makefile.PL and has only been tested on the Alpha
running VMS (where the extra OPTIMIZE macro did not kick in).
Do note that on the VAX running DEC C 5.3 even with this patch applied
your build will die in either the ext ensions Fcntl or File::Glob with a
message that looks a bit like so:
Making File/Glob (dynamic)
%SYSTEM-F-FLTOVF_F, arithmetic fault, floating overflow at PC=000918DD,
PSL=03C00000
%TRACE-F-TRACEBACK, symbolic stack dump follows
module name routine name line rel PC abs PC
NUMERIC S_mulexp10 43338 0000003D 000918DD
NUMERIC Perl_my_atof2 43487 00000255 00091C05
NUMERIC Perl_my_atof 43361 000000A5 000919A5
TOKE Perl_scan_num 50274 00000AB5 0005764D
TOKE Perl_yylex 46717 00005B07 0004ADCB
PERLY Perl_yyparse 44240 0000010A 000D08AA
PP_CTL S_doeval 45669 0000037 0001F30B
PP_CTL Perl_pp_require 46138 00000F3A 0002083E
RUN Perl_runops_debug 42821 0000013C 0003F0B0
PERL Perl_call_sv 44637 000004BC 000108E4
PERL Perl_call_list 49173 00000148 00013438
OP Perl_newATTRSUB 47914 00000DD7 00032A6F
OP Perl_utilize 46277 000002FE 0002F40E
PERLY Perl_yyparse 44696 00000E3A 000D15DA
PERL S_parse_body 44212 0000095D 0000FBD9
PERL perl_parse 43779 000001B7 0000F14B
MINIPERLMAIN main 42827 00000073 0000AC73
So a workaround to actually check for fp overflow is needed in
the S_mulexp10() function in numeric.c, or perhaps not use that at all but
instead use math.h's pow instead.
diff -ru perl_10996/configure.com perl/configure.com
--- perl_10996/configure.com Wed Jun 27 05:31:44 2001
+++ perl/configure.com Wed Jun 27 17:23:51 2001
@@ -1076,6 +1076,9 @@
$! genconfig.pl has either archname='VMS_AXP' or 'VMS_VAX'
$! Note that DCL in VMS V5.4 does not have F$GETSYI("ARCH_NAME")
$! but does have F$GETSYI("HW_MODEL").
+$! Please try to use either archname .EQS. "VMS_VAX" or archname .EQS.
+$! "VMS_AXP" from here on to allow cross-platform configuration (e.g.
+$! configure a VAX build on an Alpha).
$!
$ IF (F$GETSYI("HW_MODEL") .LT. 1024)
$ THEN
@@ -1104,11 +1107,8 @@
$ vms_prefixup = F$EDIT(vms_prefix,"UPCASE")
$ rp = "Will you be sharing your ''vms_prefixup' with ''otherarch'? [''dflt'] "
$ GOSUB myread
-$ if ans.NES.""
-$ THEN
-$ ans = F$EXTRACT(0,1,F$EDIT(ans,"COLLAPSE, UPCASE"))
-$ ENDIF
-$ IF (ans.NES."Y")
+$ if ans .EQS. "" THEN ans = dflt
+$ IF .NOT. ans
$ THEN
$ sharedperl = "N"
$ ELSE
@@ -1953,7 +1953,7 @@
$List_Parse:
$ OPEN/READ CONFIG ccvms.lis
$ READ CONFIG line
-$ IF (F$GETSYI("HW_MODEL") .LT. 1024)
+$ IF archname .EQS. "VMS_VAX"
$ THEN
$ read CONFIG line
$ archsufx = "VAX"
@@ -2462,9 +2462,6 @@
xxx = F$EXTRACT(4,line_len - 16,line)
$ IF xxx .EQS. "DynaLoader" THEN goto ext_loop ! omit
$ IF xxx .EQS. "SDBM_File/sdbm" THEN goto ext_loop ! sub extension - omit
-$ IF xxx .EQS. "Digest/MD5" .AND. -
- F$GETSYI("HW_MODEL") .LT. 1024 .AND. ccversion .LE. 50390006 -
- THEN goto ext_loop ! cannot compile MD5.c on VAX
$ IF F$EXTRACT(0,8,line) .EQS. "vms/ext/" THEN -
xxx = "VMS/" + F$EXTRACT(8,line_len - 20,line)
$ known_extensions = known_extensions + " ''xxx'"
@@ -2825,7 +2822,7 @@
$!
$ perl_cc=Mcc
$!
-$ IF (sharedperl .AND. F$GETSYI("HW_MODEL") .GE. 1024)
+$ IF (sharedperl .AND. archname .EQS. "VMS_AXP")
$ THEN
$ obj_ext=".abj"
$ so="axe"
@@ -5695,6 +5692,13 @@
$ IF d_herrno .EQS. "undef" THEN WC "#define NEED_AN_H_ERRNO"
$ WC "#define HAS_ENVGETENV"
$ WC "#define PERL_EXTERNAL_GLOB"
+$ IF archname .EQS. "VMS_VAX" .AND. -
+ ccname .EQS. "DEC" .AND. -
+ ccversion .LE. 50390006
+$ THEN
+$! Alas this does not help to build Fcntl
+$! WC "#define PERL_IGNORE_FPUSIG SIGFPE"
+$ ENDIF
$ CLOSE CONFIG
$!
$ echo4 "Doing variable substitutions on .SH files..."
@@ -5946,7 +5950,7 @@
$ echo4 "The perl.cld file is now being written..."
$ OPEN/WRITE CONFIG 'file_2_find'
$ ext = ".exe"
-$ IF ((sharedperl) .AND. (F$GETSYI("HW_MODEL") .GE. 1024)) THEN ext := .AXE
+$ IF (sharedperl .AND. archname .EQS. "VMS_AXP") THEN ext := .AXE
$ IF (use_vmsdebug_perl)
$ THEN
$ WRITE CONFIG "define verb dbgperl"
diff -ru perl_10996/ext/Digest/MD5/Makefile.PL perl/ext/Digest/MD5/Makefile.PL
--- perl_10996/ext/Digest/MD5/Makefile.PL Tue Jun 26 06:26:53 2001
+++ perl/ext/Digest/MD5/Makefile.PL Wed Jun 27 15:32:11 2001
@@ -10,6 +10,14 @@
if !($Config{'byteorder'} eq '1234' ||
$Config{'byteorder'} eq '4321');
}
+my @optimize = ();
+if ($^O eq 'VMS') {
+ if (defined($Config{ccname})) {
+ if ($Config{ccversion} <= 50390006 && grep(/VMS_VAX/, @INC) && ($Config{ccname} eq 'DEC')) {
+ @optimize = ("OPTIMIZE","/Optimize=(NODISJOINT)");
+ }
+ }
+}
WriteMakefile(
'NAME' => 'Digest::MD5',
@@ -17,6 +25,7 @@
MAN3PODS => {}, # Pods will be built by installman.
@extra,
'dist' => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+ @optimize
);
exit;
End of Patch.
Peter Prymmer
Thread Next
-
[patch perl@10996] "fix" VAX Digest/MD5, Fcntl, brokennes in SDBM
by Peter Prymmer
-
Re: [patch perl@10996] "fix" VAX Digest/MD5, Fcntl, brokennesin SDBM
by Craig A. Berry
-
Re: [patch perl@10996] "fix" VAX Digest/MD5, Fcntl, brokennes in SDBM
by Jarkko Hietaniemi
-
Re: [patch perl@10996] "fix" VAX Digest/MD5, Fcntl, brokennes in SDBM
by Jarkko Hietaniemi
-
Re: [patch perl@10996] "fix" VAX Digest/MD5, Fcntl, brokennes in SDBM
by Jarkko Hietaniemi
-
Re: [patch perl@10996] "fix" VAX Digest/MD5, Fcntl, brokennes inSDBM
by Peter Prymmer