Perl / perl5

đŸȘ The Perl programming language
https://dev.perl.org/perl5/
Other
1.88k stars 531 forks source link

[PATCH: 5.6.1 trial2]Not OK: perl v5.6.1 +v5.6.1-TRIAL2 on os390 05.00 (UNINSTALLED) #3329

Closed p5pRT closed 20 years ago

p5pRT commented 23 years ago

Migrated from rt.perl.org#5609 (status was 'resolved')

Searchable as RT5609$

p5pRT commented 23 years ago

From pvhp@forte.com

This was done with a `sh Configure -des` vanilla config. There was one warning seen during the build of util.c line 3730​:

`sh cflags libperl.a util.o` util.c   CCCMD = c89 -DPERL_CORE -c -DMAXSIG=38 -DOEMVS -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -DYYDYNAMIC -I/usr/local/include WARNING CBC3193 ./util.c​:3730 The size of this type is zero. FSUM3065 The COMPILE step ended with return code 4.

but I won't attempt to address that compiler warning.

Failed tests included​:

comp/proto...........FAILED at test 111 comp/require.........String found where operator expected at bleah.pm line 2\, near """   (Might be a runaway multi-line "" string starting on line 1)   (Missing semicolon on previous line?) String found where operator expected at bleah.pm line 1\, near "BpBrBiBnBt "BoBk C„C„C”Bn""   (Do you need to predeclare BpBrBiBnBt?) String found where operator expected at bleah.pm line 1\, near "BpBrBiBnBt "BoBk C„C·C”Bn""   (Do you need to predeclare BpBrBiBnBt?) FAILED at test 21 op/bop...............FAILED at test 22 op/regmesg...........FAILED at test 33 op/utf8decode........FAILED at test 10 pragma/locale........Unmatched [ before HERE mark in regex m/[ \<\< HERE / at pragma/locale.t line 710. FAILED at test 99 pragma/sub_lval......FAILED at test 62 lib/b................CEE5213S The signal SIGPIPE was received. FAILED at test 8 lib/bigfloat.........CEE5213S The signal SIGPIPE was received. FAILED at test 351 lib/bigfltpm.........CEE5213S The signal SIGPIPE was received. FAILED at test 358 lib/io_multihomed....EDC8103I Operation now in progress. at lib/io_multihomed.t line 108. FAILED at test 6 lib/io_unix..........Can't call method "getline" on an undefined value at lib/io_unix.t line 65. FAILED at test 3 lib/syslog...........FAILED at test 6 Failed 13 test scripts out of 244\, 94.67% okay.

Here is a patch to address some of the obvious coded character set dependencies in those test failures\, as well as the S/390 floating point trouble in bigint.pl and BigInt.pm​:

Inline Patch ```diff diff -ru perl-5.6.1-TRIAL2.orig/lib/bigint.pl perl-5.6.1-TRIAL2/lib/bigint.pl --- perl-5.6.1-TRIAL2.orig/lib/bigint.pl Wed Jan 31 07:56:47 2001 +++ perl-5.6.1-TRIAL2/lib/bigint.pl Wed Jan 31 14:06:58 2001 @@ -42,6 +42,12 @@ # bnorm(BINT) return BINT normalization # +# overcome a floating point problem on certain osnames (posix-bc, os390) +BEGIN { + my $x = 100000.0; + my $use_mult = int($x*1e-5)*1e5 == $x ? 1 : 0; +} + $zero = 0; @@ -212,8 +218,14 @@ ($car, $cty) = (0, $[); for $y (@y) { $prod = $x * $y + $prod[$cty] + $car; - $prod[$cty++] = - $prod - ($car = int($prod * 1e-5)) * 1e5; + if ($use_mult) { + $prod[$cty++] = + $prod - ($car = int($prod * 1e-5)) * 1e5; + } + else { + $prod[$cty++] = + $prod - ($car = int($prod / 1e5)) * 1e5; + } } $prod[$cty] += $car if $car; $x = shift @prod; @@ -239,12 +251,22 @@ if (($dd = int(1e5/($y[$#y]+1))) != 1) { for $x (@x) { $x = $x * $dd + $car; + if ($use_mult) { $x -= ($car = int($x * 1e-5)) * 1e5; + } + else { + $x -= ($car = int($x / 1e5)) * 1e5; + } } push(@x, $car); $car = 0; for $y (@y) { $y = $y * $dd + $car; + if ($use_mult) { $y -= ($car = int($y * 1e-5)) * 1e5; + } + else { + $y -= ($car = int($y / 1e5)) * 1e5; + } } } else { @@ -259,7 +281,12 @@ ($car, $bar) = (0,0); for ($y = $[, $x = $#x-$#y+$[-1; $y <= $#y; ++$y,++$x) { $prd = $q * $y[$y] + $car; + if ($use_mult) { $prd -= ($car = int($prd * 1e-5)) * 1e5; + } + else { + $prd -= ($car = int($prd / 1e5)) * 1e5; + } $x[$x] += 1e5 if ($bar = (($x[$x] -= $prd + $bar) < 0)); } if ($x[$#x] < $car + $bar) { diff -ru perl-5.6.1-TRIAL2.orig/lib/Math/BigInt.pm perl-5.6.1-TRIAL2/lib/Math/BigInt.pm --- perl-5.6.1-TRIAL2.orig/lib/Math/BigInt.pm Wed Jan 31 07:56:47 2001 +++ perl-5.6.1-TRIAL2/lib/Math/BigInt.pm Wed Jan 31 14:11:49 2001 @@ -52,6 +52,11 @@ $zero = 0; +# overcome a floating point problem on certain osnames (posix-bc, os390) +BEGIN { + my $x = 100000.0; + my $use_mult = int($x*1e-5)*1e5 == $x ? 1 : 0; +} # normalize string form of number. Strip leading zeros. Strip any # white space and add a sign, if missing. @@ -228,8 +233,14 @@ ($car, $cty) = (0, $[); for $y (@y) { $prod = $x * $y + ($prod[$cty] || 0) + $car; + if ($use_mult) { $prod[$cty++] = $prod - ($car = int($prod * 1e-5)) * 1e5; + } + else { + $prod[$cty++] = + $prod - ($car = int($prod / 1e5)) * 1e5; + } } $prod[$cty] += $car if $car; $x = shift @prod; @@ -254,12 +265,22 @@ if (($dd = int(1e5/($y[$#y]+1))) != 1) { for $x (@x) { $x = $x * $dd + $car; + if ($use_mult) { $x -= ($car = int($x * 1e-5)) * 1e5; + } + else { + $x -= ($car = int($x / 1e5)) * 1e5; + } } push(@x, $car); $car = 0; for $y (@y) { $y = $y * $dd + $car; + if ($use_mult) { $y -= ($car = int($y * 1e-5)) * 1e5; + } + else { + $y -= ($car = int($y / 1e5)) * 1e5; + } } } else { @@ -276,7 +297,12 @@ ($car, $bar) = (0,0); for ($y = $[, $x = $#x-$#y+$[-1; $y <= $#y; ++$y,++$x) { $prd = $q * $y[$y] + $car; + if ($use_mult) { $prd -= ($car = int($prd * 1e-5)) * 1e5; + } + else { + $prd -= ($car = int($prd / 1e5)) * 1e5; + } $x[$x] += 1e5 if ($bar = (($x[$x] -= $prd + $bar) < 0)); } if ($x[$#x] < $car + $bar) { diff -ru perl-5.6.1-TRIAL2.orig/t/lib/b.t perl-5.6.1-TRIAL2/t/lib/b.t --- perl-5.6.1-TRIAL2.orig/t/lib/b.t Wed Jan 31 07:56:50 2001 +++ perl-5.6.1-TRIAL2/t/lib/b.t Wed Jan 31 14:17:45 2001 @@ -57,6 +57,8 @@ my $Is_VMS = $^O eq 'VMS'; $a = `$^X "-I../lib" "-MO=Deparse" -anle 1 2>&1`; $a =~ s/-e syntax OK\n//g; +$a =~ s{\\340\\242}{\\s} if (ord("\\") == 224); # EBCDIC, cp 1047 or 037 +$a =~ s{\\274\\242}{\\s} if (ord("\\") == 188); # $^O eq 'posix-bc' $b = <<'EOF'; LINE: while (defined($_ = )) { @@ -117,6 +119,9 @@ if ($Config{static_ext} eq ' ') { $b = '-uCarp,-uCarp::Heavy,-uDB,-uExporter,-uExporter::Heavy,-uattributes,' . '-umain,-uwarnings'; + if (ord('A') == 193) { # EBCDIC sort order is qw(a A) not qw(A a) + $b = join ',', sort split /,/, $b; + } print "# [$a] vs [$b]\nnot " if $a ne $b; ok; } else { @@ -127,7 +132,12 @@ print "# use5005threads: test $test skipped\n"; } else { $a = `$^X "-I../lib" "-MO=Showlex" -e "my %one" 2>&1`; - print "# [$a]\nnot " unless $a =~ /sv_undef.*PVNV.*%one.*sv_undef.*HV/s; + if (ord('A') != 193) { # ASCIIish + print "# [$a]\nnot " unless $a =~ /sv_undef.*PVNV.*%one.*sv_undef.*HV/s; + } + else { # EBCDICish C<1: PVNV (0x1a7ede34) "%\226\225\205"> + print "# [$a]\nnot " unless $a =~ /sv_undef.*PVNV.*%\\[0-9].*sv_undef.*HV/s; + } } ok; diff -ru perl-5.6.1-TRIAL2.orig/t/pragma/sub_lval.t perl-5.6.1-TRIAL2/t/pragma/sub_lval.t --- perl-5.6.1-TRIAL2.orig/t/pragma/sub_lval.t Wed Jan 31 07:56:52 2001 +++ perl-5.6.1-TRIAL2/t/pragma/sub_lval.t Wed Jan 31 14:03:01 2001 @@ -514,7 +514,12 @@ $str = "Made w/ JavaScript"; sub veclv : lvalue { vec($str, 2, 32) } -veclv() = 0x5065726C; +if (ord('A') != 193) { + veclv() = 0x5065726C; +} +else { # EBCDIC? + veclv() = 0xD7859993; +} print "# $str\nnot " unless $str eq "Made w/ PerlScript"; print "ok 62\n"; ```

End of Patch.

I have test built a trial2 kit with that patch applied on OS/390​:

Failed 9 test scripts out of 244\, 96.31% okay. u=9.94 s=3.31 cu=282.98 cs=94.32 scripts=244 tests=12316

as well as on Tru64 Unix 4.0D​:

All tests successful. u=0.883333 s=1.16667 cu=99.4333 cs=31.0833 scripts=253 tests=11514

so the above patch seems safe enough (it was basically culled from the simpler EBCDIC test fixes to the 5.7.x development line).

By the way\, I know of several folks who will be disappointed to not have a usedl/DynaLoader build capability in a release of 5.6.1 for OS/390.
Should I even bother to go ahead and attempt to patch that in? It would entail introducing a new ext/DynaLoader/dl_dllload.xs file\, and modifying Makefile.SH\, installperl\, hints/os390.sh\, and perhaps a few others. IIRC it would not necessitate any change to *.h or *.c files. Thanks.

Peter Prymmer

Perl Info ``` Flags: category=install severity=none Site configuration information for perl v5.6.1: Configured by PVHP at Wed Jan 31 11:26:59 PST 2001. Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=os390, osvers=05.00, archname=os390 uname='os390 lpar25 05.00 02 9672 ' config_args='-des' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='c89', ccflags ='-DMAXSIG=38 -DOEMVS -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -DYYDYNAMIC -I/usr/local/include', optimize=' ', cppflags='' ccversion='', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=undef, longlongsize=, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='ld', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lm -lc perllibs=-lm -lc libc=, so=a, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_none.xs, dlext=none, d_dlsymun=undef, ccdlflags='' cccdlflags='-W 0,dll,"langlvl(extended)"', lddlflags='' Locally applied patches: v5.6.1-TRIAL2 @INC for perl v5.6.1: lib /usr/local/lib/perl5/5.6.1/os390 /usr/local/lib/perl5/5.6.1 /usr/local/lib/perl5/site_perl/5.6.1/os390 /usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl/5.005/os390 /usr/local/lib/perl5/site_perl/5.005 /usr/local/lib/perl5/site_perl . Environment for perl v5.6.1: HOME=/home/pvhp LANG=C LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/usr/local/bin:/bin:.:/usr/bin:/usr/lpp/java/J1.1/bin PERL_BADLANG (unset) SHELL=/bin/sh ```