This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add more known sprintf failures.
[perl5.git] / README.bs2000
CommitLineData
c2e66d9e
GS
1This document is written in pod format hence there are punctuation
2characters in in odd places. Do not worry, you've apparently got the
3ASCII->EBCDIC translation worked out correctly. You can read more
4about pod in pod/perlpod.pod or the short summary in the INSTALL file.
5
6=head1 NAME
7
8README.posix-bc - building and installing Perl for BS2000 POSIX.
9
10=head1 SYNOPSIS
11
12This document will help you Configure, build, test and install Perl
13on BS2000 in the POSIX subsystem.
14
15=head1 DESCRIPTION
16
17This is a ported perl for the POSIX subsystem in BS2000 VERSION OSD
18V3.1A. It may work on other versions, but that's the one we've tested
19it on.
a1a0e61e
TD
20
21You may need the following GNU programs in order to install perl:
22
c2e66d9e 23=head2 gzip
a1a0e61e
TD
24
25We used version 1.2.4, which could be installed out of the box with
26one failure during 'make check'.
27
c2e66d9e 28=head2 bison
a1a0e61e
TD
29
30The yacc coming with BS2000 POSIX didn't work for us. So we had to
31use bison. We had to make a few changes to perl in order to use the
32pure (reentrant) parser of bison. We used version 1.25, but we had to
33add a few changes due to EBCDIC.
34
c2e66d9e 35=head2 Unpacking
a1a0e61e
TD
36
37To extract an ASCII tar archive on BS2000 POSIX you need an ASCII
38filesystem (we used the mountpoint /usr/local/ascii for this). Now
c2e66d9e
GS
39you extract the archive in the ASCII filesystem without
40I/O-conversion:
a1a0e61e
TD
41
42cd /usr/local/ascii
43export IO_CONVERSION=NO
44gunzip < /usr/local/src/perl.tar.gz | pax -r
45
46You may ignore the error message for the first element of the archive
47(this doesn't look like a tar archive / skipping to next file...),
c2e66d9e 48it's only the directory which will be created automatically anyway.
a1a0e61e
TD
49
50After extracting the archive you copy the whole directory tree to your
c2e66d9e 51EBCDIC filesystem. B<This time you use I/O-conversion>:
a1a0e61e
TD
52
53cd /usr/local/src
54IO_CONVERSION=YES
55cp -r /usr/local/ascii/perl5.005_02 ./
56
c2e66d9e 57=head2 Compiling
a1a0e61e
TD
58
59There is a "hints" file for posix-bc that specifies the correct values
60for most things. The major problem is (of course) the EBCDIC character
c2e66d9e 61set. We have german EBCDIC version.
a1a0e61e
TD
62
63Because of our problems with the native yacc we used GNU bison to
93fb2ac3
JH
64generate a pure (=reentrant) parser for perly.y. So our yacc is
65really the following script:
a1a0e61e 66
93fb2ac3
JH
67-----8<-----/usr/local/bin/yacc-----8<-----
68#! /usr/bin/sh
a1a0e61e 69
93fb2ac3
JH
70# Bison as a reentrant yacc:
71
72# save parameters:
73params=""
74while [[ $# -gt 1 ]]; do
75 params="$params $1"
76 shift
77done
78
79# add flag %pure_parser:
80
81tmpfile=/tmp/bison.$$.y
82echo %pure_parser > $tmpfile
83cat $1 >> $tmpfile
84
85# call bison:
86
87echo "/usr/local/bin/bison --yacc $params $1\t\t\t(Pure Parser)"
88/usr/local/bin/bison --yacc $params $tmpfile
89
90# cleanup:
91
92rm -f $tmpfile
93-----8<----------8<-----
94
95We still use the normal yacc for a2p.y though!!! We made a softlink
96called byacc to distinguish between the two versions:
97
98ln -s /usr/bin/yacc /usr/local/bin/byacc
a1a0e61e 99
c2e66d9e
GS
100We build perl using GNU make. We tried the native make once and it
101worked too.
a1a0e61e 102
c2e66d9e 103=head2 Testing
a1a0e61e 104
c2e66d9e
GS
105We still got a few errors during C<make test>. Some of them are the
106result of using bison. Bison prints I<parser error> instead of I<syntax
107error>, so we may ignore them. The following list shows
a1a0e61e
TD
108our errors, your results may differ:
109
c8e8bf6a
GS
110op/numconvert.......FAILED tests 1409-1440
111op/regexp...........FAILED tests 483, 496
112op/regexp_noamp.....FAILED tests 483, 496
a1a0e61e 113pragma/overload.....FAILED tests 152-153, 170-171
c8e8bf6a
GS
114pragma/warnings.....FAILED tests 14, 82, 129, 155, 192, 205, 207
115lib/bigfloat........FAILED tests 351-352, 355
116lib/bigfltpm........FAILED tests 354-355, 358
117lib/complex.........FAILED tests 267, 487
118lib/dumper..........FAILED tests 43, 45
119Failed 11/231 test scripts, 95.24% okay. 57/10595 subtests failed, 99.46% okay.
a1a0e61e 120
c2e66d9e 121=head2 Install
a1a0e61e
TD
122
123We have no nroff on BS2000 POSIX (yet), so we ignored any errors while
124installing the documentation.
125
126
c2e66d9e 127=head2 Using Perl
a1a0e61e
TD
128
129BS2000 POSIX doesn't support the shebang notation
c2e66d9e 130(C<#!/usr/local/bin/perl>), so you have to use the following lines
a1a0e61e
TD
131instead:
132
133: # use perl
134 eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
135 if $running_under_some_shell;
c2e66d9e 136
35a77668
PP
137=head2 Floating point anomalies
138
139There appears to be a bug in the floating point implementation on BS2000 POSIX
140systems such that calling int() on the product of a number and a small
141magnitude number is not the same as calling int() on the quotient of
142that number and a large magnitude number. For example, in the following
143Perl code:
144
145 my $x = 100000.0;
146 my $y = int($x * 1e-5) * 1e5; # '0'
147 my $z = int($x / 1e+5) * 1e5; # '100000'
148 print "\$y is $y and \$z is $z\n"; # $y is 0 and $z is 100000
149
150Although one would expect the quantities $y and $z to be the same and equal
151to 100000 they will differ and instead will be 0 and 100000 respectively.
152
c2e66d9e
GS
153=head1 AUTHORS
154
155Thomas Dorner
156
157=head1 SEE ALSO
158
159L<INSTALL>, L<perlport>.
160
161=head2 Mailing list
162
163The Perl Institute (http://www.perl.org/) maintains a perl-mvs mailing
164list of interest to all folks building and/or using perl on EBCDIC
22103e7e 165platforms. To subscribe, send a message of:
c2e66d9e
GS
166
167 subscribe perl-mvs
168
169to majordomo@perl.org.
170
171=head1 HISTORY
172
173This document was originally written by Thomas Dorner for the 5.005
174release of Perl.
175
176This document was podified for the 5.6 release of perl 11 July 2000.
177
178=cut