Penguin
Blame: perlos390(1)
EditPageHistoryDiffInfoLikePages
Annotated edit history of perlos390(1) version 2, including all changes. View license author blame.
Rev Author # Line
1 perry 1 PERLOS390
2 !!!PERLOS390
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 AUTHORS
7 SEE ALSO
8 HISTORY
9 ----
10 !!NAME
11
12
13 README .os390 - building and installing Perl for OS/390 .
14 !!SYNOPSIS
15
16
17 This document will help you Configure, build, test and
18 install Perl on OS/390 Unix System
19 Services.
20 !!DESCRIPTION
21
22
23 This is a fully ported Perl for OS/390
24 Version 2 Release 3, 5, 6, 7, 8, and 9. It may work on
25 other versions or releases, but those are the ones we've
26 tested it on.
27
28
29 You may need to carry out some system configuration
30 tasks before running the Configure script for
31 Perl.
32
33
34 __Unpacking__
35
36
37 Gunzip/gzip for OS/390 is discussed
38 at:
39
40
41 http://www.s390.ibm.com/products/oe/bpxqp1.html
42 to extract an ASCII tar archive on OS/390 , try this:
43
44
45 pax -o to=IBM-1047,from=ISO8859-1 -r
46
47
48 __Setup and utilities__
49
50
51 Be sure that your yacc installation is in place
52 including any necessary parser template files. If you have
53 not already done so then be sure to:
54
55
56 cp /samples/yyparse.c /etc
57 This may also be a good time to ensure that your /etc/protocol file and either your /etc/resolv.conf or /etc/hosts files are in place. The IBM document that described such USS system setup issues was SC28-1890-07 `` OS/390 UNIX System Services Planning'', in particular Chapter 6 on customizing the OE shell.
58
59
60 GNU make for OS/390 , which is recommended
61 for the build of perl (as well as building CPAN
62 modules and extensions), is available
63 from:
64
65
66 http://www.mks.com/s390/gnu/index.htm
67 Some people have reported encountering ``Out of memory!'' errors while trying to build Perl using GNU make binaries. If you encounter such trouble then try to download the source code kit and build GNU make from source to eliminate any such trouble. You might also find GNU make (as well as Perl and Apache) in the red-piece/book ``Open Source Software for OS/390 UNIX '', SG24-5944-00 from IBM .
68
69
70 If instead of the recommended GNU make you
71 would like to use the system supplied make program then be
72 sure to install the default rules file properly via the
73 shell command:
74
75
76 cp /samples/startup.mk /etc
77 and be sure to also set the environment variable _C89_CCMODE=1 (exporting _C89_CCMODE=1 is also a good idea for users of GNU make).
78
79
80 You might also want to have GNU groff
81 for OS/390 installed before running the `make
82 install` step for Perl.
83
84
85 There is a syntax error in the
86 /usr/include/sys/socket.h header file that IBM
87 supplies with USS V2R7, V2R8, and possibly
88 V2R9. The problem with the header file is that near the
89 definition of the SO_REUSEPORT constant there is
90 a spurious extra '/' character outside of a comment like
91 so:
92
93
94 #define SO_REUSEPORT 0x0200 /* allow local address
95 You could edit that header yourself to remove that last '/', or you might note that Language Environment ( LE ) APAR PQ39997 describes the problem and PTF 's UQ46272 and UQ46271 are the (R8 at least) fixes and apply them. If left unattended that syntax error will turn up as an inability for Perl to build its ``Socket'' extension.
96
97
98 For successful testing you may need to turn on the
99 sticky bit for your world readable /tmp directory if you
100 have not already done so (see man chmod).
101
102
103 __Configure__
104
105
106 Once you've unpacked the distribution, run ``sh
107 Configure'' (see INSTALL for a full discussion of
108 the Configure options). There is a ``hints'' file for os390
109 that specifies the correct values for most things. Some
110 things to watch out for include:
111
112
113 A message of the form:
114
115
116 (I see you are using the Korn shell. Some ksh's blow up on Configure,
117 mainly on older exotic systems. If yours does, try the Bourne shell instead.)
118 is nothing to worry about at all.
119
120
121 Some of the parser default template files in /samples
122 are needed in /etc. In particular be sure that you at least
123 copy /samples/yyparse.c to /etc before running Perl's
124 Configure. This step ensures successful extraction of
125 EBCDIC versions of parser files such as perly.c,
126 perly.h, and x2p/a2p.c. This has to be done before running
127 Configure the first time. If you failed to do so then the
128 easiest way to re-Configure Perl is to delete your
129 misconfigured build root and re-extract the source from the
130 tar ball. Then you must ensure that /etc/yyparse.c is
131 properly in place before attempting to re-run
132 Configure.
133
134
135 This port will support dynamic loading, but it is not
136 selected by default. If you would like to experiment with
137 dynamic loading then be sure to specify -Dusedl in the
138 arguments to the Configure script. See the comments in
139 hints/os390.sh for more information on dynamic loading. If
140 you build with dynamic loading then you will need to add the
141 $archlibexp/CORE directory to your LIBPATH
142 environment variable in order for perl to work. See the
143 config.sh file for the value of $archlibexp. If in
144 trying to use Perl you see an error message similar
145 to:
146
147
148 CEE3501S The module libperl.dll was not found.
149 From entry point __dllstaticinit at compile unit offset +00000194 at
150 then your LIBPATH does not have the location of libperl.x and either libperl.dll or libperl.so in it. Add that directory to your LIBPATH and proceed.
151
152
153 Do not turn on the compiler optimization flag ``-O''.
154 There is a bug in either the optimizer or perl that causes
155 perl to not work correctly when the optimizer is
156 on.
157
158
159 Some of the configuration files in /etc used by the
160 networking APIs are either missing or have the wrong names.
161 In particular, make sure that there's either an
162 /etc/resolv.conf or an /etc/hosts, so that
163 ''gethostbyname()'' works, and make sure that the file
164 /etc/proto has been renamed to /etc/protocol ( NOT
165 /etc/protocols, as used by other Unix systems). You may
166 have to look for things like HOSTNAME and
167 DOMAINORIGIN in the ``//' SYS1
168 .TCPPARMS( TCPDATA )''' PDS
169 member in order to properly set up your /etc networking
170 files.
171
172
173 __Build, test, install__
174
175
176 Simply put:
177
178
179 sh Configure
180 make
181 make test
182 if everything looks ok (see the next section for test/IVP diagnosis) then:
183
184
185 make install
186 this last step may or may not require UID=0 privileges depending on how you answered the questions that Configure asked and whether or not you have write access to the directories you specified.
187
188
189 __build anomalies__
190
191
192 ``Out of memory!'' messages during the build of Perl
193 are most often fixed by re building the GNU make
194 utility for OS/390 from a source code
195 kit.
196
197
198 Another memory limiting item to check is your
199 MAXASSIZE parameter in your ' SYS1
200 .PARMLIB(BPXPRMxx)' data set (note too that as of V2R8
201 address space limits can be set on a per user ID
202 basis in the USS segment of a RACF
203 profile). People have reported successful builds of
204 Perl with MAXASSIZE parameters as small as
205 503316480 (and it may be possible to build Perl with a
206 MAXASSIZE smaller than that).
207
208
209 Within USS your /etc/profile or
210 $HOME/.profile may limit your ulimit settings.
211 Check that the following command returns reasonable
212 values:
213
214
215 ulimit -a
216 To conserve memory you should have your compiler modules loaded into the Link Pack Area ( LPA/ELPA ) rather than in a link list or step lib.
217
218
219 If the c89 compiler complains of syntax errors during
220 the build of the Socket extension then be sure to fix the
221 syntax error in the system header
222 /usr/include/sys/socket.h.
223
224
225 __testing anomalies__
226
227
228 The `make test` step runs a Perl Verification
229 Procedure, usually before installation. You might
230 encounter STDERR messages even during a
231 successful run of `make test`. Here is a guide to some of
232 the more commonly seen anomalies:
233
234
235 A message of the form:
236
237
238 comp/cpp.............ERROR CBC3191 ./.301989890.c:1 The character $ is not a
239 valid C source character.
240 FSUM3065 The COMPILE step ended with return code 12.
241 FSUM3017 Could not compile .301989890.c. Correct the errors and try again.
242 ok
243 indicates that the t/comp/cpp.t test of Perl's -P command line switch has passed but that the particular invocation of c89 -E in the cpp script does not suppress the C compiler check of source code validity.
244
245
246 A message of the form:
247
248
249 io/openpid...........CEE5210S The signal SIGHUP was received.
250 CEE5210S The signal SIGHUP was received.
251 CEE5210S The signal SIGHUP was received.
252 ok
253 indicates that the t/io/openpid.t test of Perl has passed but done so with extraneous messages on stderr from CEE .
254
255
256 A message of the form:
257
258
259 lib/ftmp-security....File::Temp::_gettemp: Parent directory (/tmp/) is not safe
260 (sticky bit not set when world writable?) at lib/ftmp-security.t line 100
261 File::Temp::_gettemp: Parent directory (/tmp/) is not safe (sticky bit not
262 set when world writable?) at lib/ftmp-security.t line 100
263 ok
264 indicates a problem with the permissions on your /tmp directory within the HFS . To correct that problem issue the command:
265
266
267 chmod a+t /tmp
268 from an account with write access to the directory entry for /tmp.
269
270
271 __installation anomalies__
272
273
274 The installman script will try to run on OS/390
275 . There will be fewer errors if you have a roff utility
276 installed. You can obtain GNU groff from the
277 Redbook SG24-5944-00 ftp site.
278
279
280 __Usage Hints__
281
282
283 When using perl on OS/390 please keep in
284 mind that the EBCDIC and ASCII
285 character sets are different. See perlebcdic.pod for
286 more on such character set issues. Perl builtin functions
287 that may behave differently under EBCDIC are also
288 mentioned in the perlport.pod document.
289
290
291 Open Edition ( UNIX System Services) from
292 V2R8 onward does support #!/path/to/perl script invocation.
293 There is a PTF available from IBM for
294 V2R7 that will allow shell/kernel support for #!. USS
295 releases prior to V2R7 did not support the #! means of
296 script invocation. If you are running V2R6 or earlier then
297 see:
298
299
300 head `whence perldoc`
301 for an example of how to use the ``eval exec'' trick to ask the shell to have Perl run your scripts on those older releases of Unix System Services.
302
303
304 If you are having trouble with square brackets then
305 consider switching your rlogin or telnet client. Try to
306 avoid older 3270 emulators and ISHELL for working
307 with Perl on USS .
308
309
310 __Floating point anomalies__
311
312
313 There appears to be a bug in the floating point
314 implementation on S/390 systems such that calling
315 ''int()'' on the product of a number and a small
316 magnitude number is not the same as calling ''int()'' on
317 the quotient of that number and a large magnitude number.
318 For example, in the following Perl code:
319
320
321 my $x = 100000.0;
322 my $y = int($x * 1e-5) * 1e5; # '0'
323 my $z = int($x / 1e+5) * 1e5; # '100000'
324 print
325 Although one would expect the quantities $y and $z to be the same and equal to 100000 they will differ and instead will be 0 and 100000 respectively.
326
327
328 The problem can be further examined in a roughly
329 equivalent C program:
330
331
332 #include
333
334
335 __Modules and Extensions__
336
337
338 Pure pure (that is non xs) modules may be installed via
339 the usual:
340
341
342 perl Makefile.PL
343 make
344 make test
345 make install
2 perry 346 If you built perl with dynamic loading capability then that would also be the way to build xs based extensions. However, if you built perl with the default static linking you can still build xs based extensions for OS/390 but you will need to follow the instructions in !ExtUtils::!MakeMaker for building statically linked perl binaries. In the simplest configurations building a static perl + xs extension boils down to:
1 perry 347
348
349 perl Makefile.PL
350 make
351 make perl
352 make test
353 make install
354 make -f Makefile.aperl inst_perl MAP_TARGET=perl
355 In most cases people have reported better results with GNU make rather than the system's /bin/make program, whether for plain modules or for xs based extensions.
356
357
358 If the make process encounters trouble with either
359 compilation or linking then try setting the _C89_CCMODE to
360 1. Assuming sh is your login shell then
361 run:
362
363
364 export _C89_CCMODE=1
365 If tcsh is your login shell then use the setenv command.
366 !!AUTHORS
367
368
369 David Fiander and Peter Prymmer with thanks to Dennis
370 Longnecker and William Raffloer for valuable reports,
371 LPAR and PTF feedback. Thanks to Mike
2 perry 372 !MacIsaac and Egon Terwedow for SG24-5944-00 .
1 perry 373 Thanks to Ignasi Roca for pointing out the floating point
374 problems. Thanks to John Goodyear for dynamic loading
375 help.
376 !!SEE ALSO
377
378
379 INSTALL , perlport, perlebcdic,
2 perry 380 !ExtUtils::!MakeMaker.
1 perry 381
382
383 http://www.mks.com/s390/gnu/index.htm
384 http://www.redbooks.ibm.com/abstracts/sg245944.html
385 http://www.s390.ibm.com/products/oe/bpxa1ty1.html#opensrc
386 http://www.s390.ibm.com/products/oe/portbk/bpxacenv.html
387 http://www.xray.mpe.mpg.de/mailing-lists/perl-mvs/
388
389
390 __Mailing list__
391
392
393 The Perl Institute (http://www.perl.org/) maintains a
394 perl-mvs mailing list of interest to all folks building
395 and/or using perl on all EBCDIC platforms (not
396 just OS/390 ). To subscribe, send a message
397 of:
398
399
400 subscribe perl-mvs
401 to majordomo@perl.org. See also:
402
403
404 http://lists.perl.org/showlist.cgi?name=perl-mvs
405 There are web archives of the mailing list at:
406
407
408 http://www.xray.mpe.mpg.de/mailing-lists/perl-mvs/
409 http://archive.develooper.com/perl-mvs@perl.org/
410 !!HISTORY
411
412
413 This document was originally written by David Fiander
414 for the 5.005 release of Perl.
415
416
417 This document was podified for the 5.005_03 release of
418 Perl 11 March 1999.
419
420
421 Updated 12 November 2000 for the 5.7.1 release of
422 Perl.
423
424
425 Updated 15 January 2001 for the 5.7.1 release of
426 Perl.
427
428
429 Updated 24 January 2001 to mention dynamic
430 loading.
431
432
433 Updated 12 March 2001 to mention //' SYS1
434 .TCPPARMS( TCPDATA )'.
435 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.