Penguin
Annotated edit history of perlhpux(1) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 PERLHPUX
2 !!!PERLHPUX
3 NAME
4 DESCRIPTION
5 AUTHOR
6 DATE
7 ----
8 !!NAME
9
10
11 README .hpux - Perl version 5 on Hewlett-Packard Unix ( HP-UX ) systems
12 !!DESCRIPTION
13
14
15 This document describes various features of HP
16 's Unix operating system ( HP-UX ) that will
17 affect how Perl version 5 (hereafter just Perl) is compiled
18 and/or runs.
19
20
21 __Compiling Perl 5 on HP-UX__
22
23
24 When compiling Perl, you must use an ANSI C
25 compiler. The C compiler that ships with all HP-UX systems
26 is a K
27
28
29 Perl can be compiled with either HP 's
30 ANSI C compiler or with gcc. The former is recommended,
31 as not only can it compile Perl with no difficulty, but also
32 can take advantage of features listed later that require the
33 use of HP compiler-specific command-line
34 flags.
35
36
37 If you decide to use gcc, make sure your installation
38 is recent and complete, and be sure to read the Perl
39 README file for more gcc-specific
40 details.
41
42
43 __PA-RISC__
44
45
46 HP 's current Unix systems run on its own Precision
47 Architecture ( PA-RISC ) chip. HP-UX used to run
48 on the Motorola MC68000 family of chips, but any
49 machine with this chip in it is quite obsolete and this
50 document will not attempt to address issues for compiling
51 Perl on the Motorola chipset.
52
53
54 The most recent version of PA-RISC at the time of this
55 document's last update is 2.0.
56
57
58 __PA-RISC 1.0__
59
60
61 The original version of PA-RISC , HP
62 no longer sells any system with this
63 chip.
64
65
66 The following systems contain PA-RISC 1.0
67 chips:
68
69
70 600, 635, 645, 808, 815, 822, 825, 832, 834, 835, 840, 842, 845, 850, 852,
71 855, 860, 865, 870, 890
72
73
74 __PA-RISC 1.1__
75
76
77 An upgrade to the PA-RISC design, it shipped for many
78 years in many different system.
79
80
81 The following systems contain with PA-RISC 1.1
82 chips:
83
84
85 705, 710, 712, 715, 720, 722, 725, 728, 730, 735, 742, 743, 745, 747, 750,
86 755, 770, 777, 778, 779, 800, 801, 803, 806, 807, 809, 811, 813, 816, 817,
87 819, 821, 826, 827, 829, 831, 837, 839, 841, 847, 849, 851, 856, 857, 859,
88 867, 869, 877, 887, 891, 892, 897, A180, A180C, B115, B120, B132L, B132L+,
89 B160L, B180L, C100, C110, C115, C120, C160L, D200, D210, D220, D230, D250,
90 D260, D310, D320, D330, D350, D360, D410, DX0, DX5, DZO, E25, E35, E45,
91 E55, F10, F20, F30, G30, G40, G50, G60, G70, H20, H30, H40, H50, H60, H70,
92 I30, I40, I50, I60, I70, J200, J210, J210XC, K100, K200, K210, K220, K230,
93 K400, K410, K420, S700i, S715, S724, S760, T500, T520
94
95
96 __PA-RISC 2.0__
97
98
99 The most recent upgrade to the PA-RISC design, it added
100 support for 64-bit integer data.
101
102
103 As of the date of this document's last update, the
104 following systems contain PA-RISC 2.0 chips (this is very
105 likely to be out of date):
106
107
108 700, 780, 781, 782, 783, 785, 802, 804, 810, 820, 861, 871, 879, 889, 893,
109 895, 896, 898, 899, B1000, C130, C140, C160, C180, C180+, C180-XP, C200+,
110 C400+, C3000, C360, CB260, D270, D280, D370, D380, D390, D650, J220, J2240,
111 J280, J282, J400, J410, J5000, J7000, K250, K260, K260-EG, K270, K360,
112 K370, K380, K450, K460, K460-EG, K460-XP, K470, K570, K580, L1000, L2000,
113 N4000, R380, R390, T540, T600, V2000, V2200, V2250, V2500
114 A complete list of models at the time the OS was built is in the file /opt/langtools/lib/sched.models. The first column corresponds to the output of the ``uname -m'' command (without the leading ``9000/''). The second column is the PA-RISC version and the third column is the exact chip type used.
115
116
117 __Portability Between PA-RISC
118 Versions__
119
120
121 An executable compiled on a PA-RISC 2.0 platform will
122 not execute on a PA-RISC 1.1 platform, even if they are
123 running the same version of HP-UX . If you are
124 building Perl on a PA-RISC 2.0 platform and want that Perl
125 to to also run on a PA-RISC 1.1, the compiler flags
126 +DAportable and +DS32 should be used.
127
128
129 It is no longer possible to compile PA-RISC 1.0
130 executables on either the PA-RISC 1.1 or 2.0
131 platforms.
132
133
134 __Building Dynamic Extensions on
135 HP-UX__
136
137
138 HP-UX supports dynamically loadable libraries (shared
139 libraries). Shared libraries end with the suffix
140 .sl.
141
142
143 Shared libraries created on a platform using a
144 particular PA-RISC version are not usable on platforms using
145 an earlier PA-RISC version by default. However, this
146 backwards compatibility may be enabled using the same
147 +DAportable compiler flag (with the same PA-RISC 1.0 caveat
148 mentioned above).
149
150
151 To create a shared library, the following steps must be
152 performed:
153
154
155 1. Compile source modules with +z or +Z flag to create a .o module
156 which contains Position-Independent Code (PIC). The linker will
157 tell you in the next step if +Z was needed.
158 2. Link the shared library using the -b flag. If the code calls
159 any functions in other system libraries (e.g., libm), it must
160 be included on this line.
161 (Note that these steps are usually handled automatically by the extension's Makefile).
162
163
164 If these dependent libraries are not listed at shared
165 library creation time, you will get fatal ``Unresolved
166 symbol'' errors at run time when the library is
167 loaded.
168
169
170 You may create a shared library that refers to another
171 library, which may be either an archive library or a shared
172 library. If this second library is a shared library, this is
173 called a ``dependent library''. The dependent library's name
174 is recorded in the main shared library, but it is not linked
175 into the shared library. Instead, it is loaded when the main
176 shared library is loaded. This can cause problems if you
177 build an extension on one system and move it to another
178 system where the libraries may not be located in the same
179 place as on the first system.
180
181
182 If the referred library is an archive library, then it
183 is treated as a simple collection of .o modules (all of
184 which must contain PIC ). These modules are then
185 linked into the shared library.
186
187
188 Note that it is okay to create a library which contains
189 a dependent library that is already linked into
190 perl.
191
192
193 It is no longer possible to link PA-RISC 1.0 shared
194 libraries.
195
196
197 __The__ __HP ANSI C
198 Compiler__
199
200
201 When using this compiler to build Perl, you should make
202 sure that the flag -Aa is added to the cpprun and cppstdin
203 variables in the config.sh file (though see the section on
204 64-bit perl below).
205
206
207 __Using Large Files with Perl__
208
209
210 Beginning with HP-UX version 10.20, files larger than
211 2GB (2^31 bytes) may be created and manipulated. Three
212 separate methods of doing this are available. Of these
213 methods, the best method for Perl is to compile using the
214 -Duselargefiles flag to Configure. This causes Perl to be
215 compiled using structures and functions in which these are
216 64 bits wide, rather than 32 bits wide. (Note that this will
217 only work with HP 's ANSI C compiler.
218 If you want to compile Perl using gcc, you will have to get
219 a version of the compiler that support 64-bit
220 operations.)
221
222
223 There are some drawbacks to this approach. One is that
224 any extension which calls any file-manipulating C function
225 will need to be recompiled (just follow the usual ``perl
226 Makefile.PL; make; make test; make install''
227 procedure).
228
229
230 The list of functions that will need to recompiled is:
231 creat, fgetpos, fopen, freopen, fsetpos, fstat, fstatvfs,
232 fstatvfsdev, ftruncate, ftw, lockf, lseek, lstat, mmap,
233 nftw, open, prealloc, stat, statvfs, statvfsdev, tmpfile,
234 truncate, getrlimit, setrlimit
235
236
237 Another drawback is only valid for Perl versions before
238 5.6.0. This drawback is that the seek and tell functions
239 (both the builtin version and POSIX module
240 version) will not perform correctly.
241
242
243 It is strongly recommended that you use this flag when
244 you run Configure. If you do not do this, but later answer
245 the question about large files when Configure asks you, you
246 may get a configuration that cannot be compiled, or that
247 does not function as expected.
248
249
250 __Threaded Perl__
251
252
253 It is possible to compile a version of threaded Perl on
254 any version of HP-UX before 10.30, but it is strongly
255 suggested that you be running on HP-UX 11.00 at
256 least.
257
258
259 To compile Perl with threads, add -Dusethreads to the
260 arguments of Configure. Verify that the
261 -D_POSIX_C_SOURCE=199506L compiler flag is automatically
262 added to the list of flags. Also make sure that -lpthread is
263 listed before -lc in the list of libraries to link Perl
264 with.
265
266
267 As of the date of this document, Perl threads are not
268 fully supported on HP-UX .
269
270
271 HP-UX versions before 10.30 require a seperate
272 installation of a POSIX threads library package.
273 Two examples are the HP DCE package, available on
274 `` HP-UX Hardware Extensions 3.0, Install and
275 Core OS , Release 10.20, April 1999
276 (B3920-13941)'' or the Freely available PTH
277 package, available though worldwide HP-UX mirrors of
278 precompiled packages (e.g.
279 http://hpux.tn.tudelft.nl/hppd/hpux/alpha.html)
280
281
282 __64-bit Perl__
283
284
285 Beginning with HP-UX 11.00, programs compiled under
286 HP-UX can take advantage of the LP64 programming
287 environment ( LP64 means Longs and Pointers are
288 64 bits wide).
289
290
291 Work is being performed on Perl to make it 64-bit
292 compliant on all versions of Unix. Once this is complete,
293 scalar variables will be able to hold numbers larger than
294 2^32 with complete precision.
295
296
297 As of the date of this document, Perl is not 64-bit
298 compliant on HP-UX .
299
300
301 Should a user wish to experiment with compiling Perl in
302 the LP64 environment, use the -Duse64bitall flag
303 to Configure. This will force Perl to be compiled in a
304 pure LP64 environment (via the +DD64
305 flag).
306
307
308 You can also use the -Duse64bitint flag to Configure.
309 Although there are some minor differences between compiling
310 Perl with this flag versus the -Duse64bitall flag, they
311 should not be noticeable from a Perl user's
312 perspective.
313
314
315 In both cases, it is strongly recommended that you use
316 these flags when you run Configure. If you do not use do
317 this, but later answer the questions about 64-bit numbers
318 when Configure asks you, you may get a configuration that
319 cannot be compiled, or that does not function as
320 expected.
321
322
323 (Note that these Configure flags will only work
324 with HP 's ANSI C compiler. If you
325 want to compile Perl using gcc, you will have to get a
326 version of the compiler that support 64-bit
327 operations.)
328
329
330 __GDBM and Threads__
331
332
333 If you attempt to compile Perl with threads on an 11.X
334 system and also link in the GDBM library, then
335 Perl will immediately core dump when it starts up. The only
336 workaround at this point is to relink the GDBM
337 library under 11.X, then relink it into
338 Perl.
339
340
341 __NFS filesystems and__
342 ''utime''__(2)__
343
344
345 If you are compiling Perl on a remotely-mounted
346 NFS filesystem, the test io/fs.t may fail on test #18.
347 This appears to be a bug in HP-UX and no fix is currently
348 available.
349
350
351 __perl -P and //__
352
353
354 In HP-UX Perl is compiled with flags that will cause
355 problems if the -P flag of Perl (preprocess Perl code with
356 the C preprocessor before perl sees it) is used. The problem
357 is that //, being a C ++ -style
358 until-end-of-line comment, will disappear along with the
359 remainder of the line. This means that common Perl
360 constructs like
361
362
363 s/foo//;
364 will turn into illegal code
365
366
367 s/foo
368 The workaround is to use some other quoting separator than , like for example :
369
370
371 s!foo!!;
372 !!AUTHOR
373
374
375 Jeff Okamoto
376
377
378 With much assistance regarding shared libraries from
379 Marc Sabatella.
380 !!DATE
381
382
383 Version 0.6.2: 2001-02-02
384 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.