Penguin
Blame: perlsolaris(1)
EditPageHistoryDiffInfoLikePages
Annotated edit history of perlsolaris(1) version 3, including all changes. View license author blame.
Rev Author # Line
1 perry 1 PERLSOLARIS
2 !!!PERLSOLARIS
3 PerryLorier 3
1 perry 4 ----
5 !!NAME
6
7
8 README .solaris - Perl version 5 on Solaris systems
9 !!DESCRIPTION
10
11 This document describes various features of Sun's
12 Solaris operating system that will affect how Perl version 5
13 (hereafter just perl) is compiled and/or runs. Some issues
14 relating to the older SunOS 4.x are also discussed, though
15 they may be out of date.
16
17 For the most part, everything should just
18 work.
19
20 Starting with Solaris 8, perl5.00503 (or higher) is
21 supplied with the operating system, so you might not even
22 need to build a newer version of perl at all. The
23 Sun-supplied version is installed in /usr/perl5 with
24 /usr/bin/perl pointing to /usr/perl5/bin/perl. Do not
25 disturb that installation unless you really know what you
3 PerryLorier 26 are doing. If you remove the perl supplied with the OS,
27 there is a good chance you will render some bits of
1 perry 28 your system inoperable. If you wish to install a newer
29 version of perl, install it under a different prefix from
30 /usr/perl5. Common prefixes to use are /usr/local and
31 /opt/perl.
32
33 You may wish to put your version of perl in the
34 PATH of all users by changing the link /usr/bin/perl.
35 This is OK , as all Perl scripts shipped with
36 Solaris use /usr/perl5/bin/perl.
37
38 __Solaris Version Numbers.__
39
40 For consistency with common usage, perl's Configure
41 script performs some minor manipulations on the operating
42 system name and version number as reported by uname. Here's
43 a partial translation table:
44 Sun: perl's Configure:
45 uname uname -r Name osname osvers
46 SunOS 4.1.3 Solaris 1.1 sunos 4.1.3
47 SunOS 5.6 Solaris 2.6 solaris 2.6
48 SunOS 5.8 Solaris 8 solaris 2.8
49 The complete table can be found in the Sun Managers' FAQ
50 !!RESOURCES
51
52 There are many, many source for Solaris information. A
53 few of the important ones for perl:
54
55 !!SETTING UP
56
57 __File Extraction Problems.__
58
59 Be sure to use a tar program compiled under Solaris
60 (not SunOS 4.x) to extract the perl-5.x.x.tar.gz file. Do
61 not use GNU tar compiled for SunOS4 on Solaris.
62 ( GNU tar compiled for Solaris should be fine.)
63 When you run SunOS4 binaries on Solaris, the run-time system
64 magically alters pathnames matching m#lib/locale# so that
65 when tar tries to create lib/locale.pm, a file named
66 lib/oldlocale.pm gets created instead. If you found this
67 advice it too late and used a SunOS4-compiled tar anyway,
68 you must find the incorrectly renamed file and move it back
69 to lib/locale.pm.
70
71 __Compiler and Related Tools.__
72
73 You must use an ANSI C compiler to build
74 perl. Perl can be compiled with either Sun's add-on C
75 compiler or with gcc. The C compiler that shipped with
76 SunOS4 will not do.
77
3 PerryLorier 78 ''Include /usr/ccs/bin/ in your'' ''PATH.''
1 perry 79
80 Several tools needed to build perl are located in
81 /usr/ccs/bin/: ar, as, ld, and make. Make sure that
3 PerryLorier 82 /usr/ccs/bin/ is in your PATH.
1 perry 83
84 You need to make sure the following packages are
3 PerryLorier 85 installed (this info is extracted from the Solaris FAQ):
1 perry 86
87 for tools (sccs, lex, yacc, make, nm, truss, ld, as):
88 SUNWbtool, SUNWsprot, SUNWtoo
89
3 PerryLorier 90 for libraries:
1 perry 91
92
93 for 64 bit development: SUNWarcx, SUNWbtoox, SUNWdplx,
94 SUNWscpux, SUNWsprox, SUNWtoox, SUNWlmsx, SUNWlmx,
3 PerryLorier 95 SUNWlibCx.
1 perry 96
3 PerryLorier 97 These packages are available on your original install media.
1 perry 98
99 If you are in doubt which package contains a file you
100 are missing, try to find an installation that has that file.
101 Then do a
102
103 grep /my/missing/file /var/sadm/install/contents
104 This will display a line like this:
105
3 PerryLorier 106 /usr/include/sys/errno.h f none 0644 root bin 7471 37605 956241356 SUNWhea
1 perry 107
3 PerryLorier 108 The last item listed (SUNWhea in this example) is the package you need.
1 perry 109
110 ''Avoid /usr/ucb/cc.''
111
112 You don't need to have /usr/ucb/ in your PATH
113 to build perl. If you want /usr/ucb/ in your PATH
114 anyway, make sure that /usr/ucb/ is NOT in
115 your PATH before the directory containing the
116 right C compiler.
117
118 ''Sun's C Compiler''
119
120 If you use Sun's C compiler, make sure the correct
121 directory (usually /opt/SUNWspro/bin/) is in your PATH
122 (before /usr/ucb/).
123
124 ''GCC''
125
126 If you use gcc, make sure your installation is recent
127 and complete. As a point of reference, perl-5.6.0 built fine
128 with gcc-2.8.1 on both Solaris 2.6 and Solaris 8. You'll be
129 able to Configure perl with
130
3 PerryLorier 131 sh Configure -Dcc=gcc
1 perry 132
133 If you have updated your Solaris version, you may also have to update your GCC . For example, if you are running Solaris 2.6 and your gcc is installed under /usr/local, check in /usr/local/lib/gcc-lib and make sure you have the appropriate directory, sparc-sun-solaris2.6/ or i386-pc-solaris2.6/. If gcc's directory is for a different version of Solaris than you are running, then you will need to rebuild gcc for your new version of Solaris.
134
135 You can get a precompiled version of gcc from
136
137 ''GNU as and GNU ld''
138
139 The versions of as and ld supplied with Solaris work
140 fine for building perl. There is normally no need to install
141 the GNU versions.
142
143 If you decide to ignore this advice and use the
144 GNU versions anyway, then be sure that they are
145 relatively recent. Versions newer than 2.7 are apparently
146 new enough. Older versions may have trouble with dynamic
147 loading.
148
149 If your gcc is configured to use GNU as and
150 ld but you want to use the Solaris ones instead to build
151 perl, then you'll need to add -B/usr/ccs/bin/ to the gcc
152 command line. One convenient way to do that is
153 with
154
3 PerryLorier 155 sh Configure -Dcc='gcc -B/usr/ccs/bin/'
1 perry 156 Note that the trailing slash is required. This will result in some harmless warnings as Configure is run:
157
158 gcc: file path prefix `/usr/ccs/bin/' never used
159 These messages may safely be ignored. (Note that for a SunOS4 system, you must use -B/bin/ instead.)
160
161 Alternatively, you can use the GCC_EXEC_PREFIX
162 environment variable to ensure that Sun's as and ld are
163 used. Consult your gcc documentation for further information
164 on the -B option and the GCC_EXEC_PREFIX
165 variable.
166
167 ''GNU make''
168
169 Sun's make works fine for building perl. If you wish to
170 use GNU make anyway, be sure that the
171 set-group-id bit is not set. If it is, then arrange
172 your PATH so that /usr/ccs/bin/make is
173 before GNU make or else have the system
174 administrator disable the set-group-id bit on GNU
175 make.
176
177 ''Avoid libucb.''
178
179 Solaris provides some BSD-compatibility functions in
180 /usr/ucblib/libucb.a. Perl will not build and run correctly
181 if linked against -lucb since it contains routines that are
182 incompatible with the standard Solaris libc. Normally this
183 is not a problem since the solaris hints file prevents
184 Configure from even looking in /usr/ucblib for libraries,
185 and also explicitly omits -lucb.
186
187 __Environment__
188
189 ''PATH''
190
191 Make sure your PATH includes the compiler
192 (/opt/SUNWspro/bin/ if you're using Sun's compiler) as well
193 as /usr/ccs/bin/ to pick up the other development tools
194 (such as make, ar, as, and ld). Make sure your path either
195 doesn't include /usr/ucb or that it includes it after the
196 compiler and compiler tools and other standard Solaris
197 directories. You definitely don't want
198 /usr/ucb/cc.
199
200 ''LD_LIBRARY_PATH''
201
202 If you have the LD_LIBRARY_PATH environment
203 variable set, be sure that it does NOT include
204 /lib or /usr/lib. If you will be building extensions that
205 call third-party shared libraries (e.g. Berkeley DB
206 ) then make sure that your LD_LIBRARY_PATH
207 environment variable includes the directory with that
208 library (e.g. /usr/local/lib).
209
210 If you get an error message
211 dlopen: stub interception failed
212 it is probably because your LD_LIBRARY_PATH environment variable includes a directory which is a symlink to /usr/lib (such as /lib). The reason this causes a problem is quite subtle. The file libdl.so.1.0 actually *only* contains functions which generate 'stub interception failed' errors! The runtime linker intercepts links to ``/usr/lib/libdl.so.1.0'' and links in internal implementations of those functions instead. [[Thanks to Tim Bunce for this explanation.]
3 PerryLorier 213
1 perry 214 !!RUN CONFIGURE.
215
216 See the INSTALL file for general information
217 regarding Configure. Only Solaris-specific issues are
218 discussed here. Usually, the defaults should be
219 fine.
220
221 __64-bit Issues.__
222
223 See the INSTALL file for general information
224 regarding 64-bit compiles. In general, the defaults should
225 be fine for most people.
226
227 By default, perl-5.6.0 (or later) is compiled as a
228 32-bit application with largefile and long-long
229 support.
230
3 PerryLorier 231 ''General 32-bit vs. 64-bit issues.''
1 perry 232
233 Solaris 7 and above will run in either 32 bit or 64 bit
234 mode on SPARC CPUs, via a reboot. You can build
235 64 bit apps whilst running 32 bit mode and vice-versa. 32
236 bit apps will run under Solaris running in either 32 or 64
237 bit mode. 64 bit apps require Solaris to be running 64 bit
238 mode.
239
240
241 Existing 32 bit apps are properly known as LP32
242 , i.e. Longs and Pointers are 32 bit. 64-bit apps are
243 more properly known as LP64 . The discriminating
244 feature of a LP64 bit app is its ability to
245 utilise a 64-bit address space. It is perfectly possible to
246 have a LP32 bit app that supports both 64-bit
247 integers (long long) and largefiles (
248
249
250 For a more complete explanation of 64-bit issues, see
251 the Solaris 64-bit Developer's Guide at
252 http://docs.sun.com:80/ab2/coll.45.13/SOL64TRANS/
253
254
255 You can detect the OS mode using ``isainfo
256 -v'', e.g.
257
258
259 fubar$ isainfo -v # Ultra 30 in 64 bit mode
260 64-bit sparcv9 applications
261 32-bit sparc applications
262 By default, perl will be compiled as a 32-bit application. Unless you want to allocate more than ~ 4GB of memory inside Perl, you probably don't need Perl to be a 64-bit app.
263
264
265 ''Large File Suppprt''
266
267
268 For Solaris 2.6 and onwards, there are two different
269 ways for 32-bit applications to manipulate large files
270 (files whose size is
271
272
273 First is the ``transitional compilation environment'',
274 described in ''lfcompile64''(5). According to the man
275 page,
276
277
278 The transitional compilation environment exports all the
279 explicit 64-bit functions (xxx64()) and types in addition to
280 all the regular functions (xxx()) and types. Both xxx() and
281 xxx64() functions are available to the program source. A
282 32-bit application must use the xxx64() functions in order
283 to access large files. See the lf64(5) manual page for a
284 complete listing of the 64-bit transitional interfaces.
285 The transitional compilation environment is obtained with the following compiler and linker flags:
286
287
288 getconf LFS64_CFLAGS -D_LARGEFILE64_SOURCE
289 getconf LFS64_LDFLAG # nothing special needed
290 getconf LFS64_LIBS # nothing special needed
291 Second is the ``large file compilation environment'', described in lfcompile(5). According to the man page,
292
293
294 Each interface named xxx() that needs to access 64-bit entities
295 to access large files maps to a xxx64() call in the
296 resulting binary. All relevant data types are defined to be
297 of correct size (for example, off_t has a typedef definition
298 for a 64-bit entity).
299 An application compiled in this environment is able to use
300 the xxx() source interfaces to access both large and small
301 files, rather than having to explicitly utilize the transitional
302 xxx64() interface calls to access large files.
303 Two exceptions are ''fseek()'' and ''ftell()''. 32-bit applications should use fseeko(3C) and ftello(3C). These will get automatically mapped to ''fseeko64()'' and ''ftello64()''.
304
305
306 The large file compilation environment is obtained
307 with
308
309
310 getconf LFS_CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
311 getconf LFS_LDFLAGS # nothing special needed
312 getconf LFS_LIBS # nothing special needed
313 By default, perl uses the large file compilation environment and relies on Solaris to do the underlying mapping of interfaces.
314
315
316 ''Building an'' ''LP64
317 Perl''
318
319
2 perry 320 To compile a 64-bit application on an !UltraSparc with a
1 perry 321 recent Sun Compiler, you need to use the flag ``-xarch=v9''.
322 getconf(1) will tell you this,
323 e.g.
324
325
326 fubar$ getconf -a grep v9
327 XBS5_LP64_OFF64_CFLAGS: -xarch=v9
328 XBS5_LP64_OFF64_LDFLAGS: -xarch=v9
329 XBS5_LP64_OFF64_LINTFLAGS: -xarch=v9
330 XBS5_LPBIG_OFFBIG_CFLAGS: -xarch=v9
331 XBS5_LPBIG_OFFBIG_LDFLAGS: -xarch=v9
332 XBS5_LPBIG_OFFBIG_LINTFLAGS: -xarch=v9
333 _XBS5_LP64_OFF64_CFLAGS: -xarch=v9
334 _XBS5_LP64_OFF64_LDFLAGS: -xarch=v9
335 _XBS5_LP64_OFF64_LINTFLAGS: -xarch=v9
336 _XBS5_LPBIG_OFFBIG_CFLAGS: -xarch=v9
337 _XBS5_LPBIG_OFFBIG_LDFLAGS: -xarch=v9
338 _XBS5_LPBIG_OFFBIG_LINTFLAGS: -xarch=v9
2 perry 339 This flag is supported in Sun !WorkShop Compilers 5.0 and onwards (now marketed under the name Forte) when used on Solaris 7 or later on !UltraSparc systems.
1 perry 340
341
342 If you are using gcc, you would need to use -mcpu=v9
343 -m64 instead. This option is not yet supported as of gcc
344 2.95.2; from install/SPECIFIC in that
345 release:
346
347
348 GCC version 2.95 is not able to compile code correctly
349 for sparc64 targets. Users of the Linux kernel, at least,
350 can use the sparc32 program to start up a new shell
351 invocation with an environment that causes configure to
352 recognize (via uname -a) the system as sparc-*-*
353 instead.
354
355
356 All this should be handled automatically by the hints
357 file, if requested.
358
359
360 If you do want to be able to allocate more than 4GB
361 memory inside perl, then you should use the Solaris malloc,
362 since the perl malloc breaks when dealing with more than 2GB
363 of memory. You can do this with
364
365
366 sh Configure -Uusemymalloc
367 Note that this will break binary compatibility with any version that was not compiled with -Uusemymalloc.
368
369
370 ''Long Doubles.''
371
372
373 As of 5.6.0, long doubles are not
374 working.
375
376
377 __Threads.__
378
379
380 It is possible to build a threaded version of perl on
381 Solaris. The entire perl thread implementation is still
382 experimental, however, so beware. Perl uses the
383 sched_yield(3RT) function. In versions of Solaris up to 2.6,
384 that function is in -lposix4. Starting with Solaris 7, it is
385 in -lrt. The hints file should handle adding this
386 automatically.
387
388
389 __Malloc Issues.__
390
391
392 You should not use perl's malloc if you are building
393 with gcc. There are reports of core dumps, especially in
394 the PDL module. The problem appears to go away
395 under -DDEBUGGING, so it has been difficult to track down.
396 Sun's compiler appears to be ok with or without perl's
397 malloc. [[ XXX further investigation is needed
398 here.]
399
400
401 You should also not use perl's malloc if you are
402 building perl as an LP64 application, since
403 perl's malloc has trouble allocating more than 2GB of
404 memory.
405
406
407 You can avoid perl's malloc by Configuring
408 with
409
410
411 sh Configure -Uusemymalloc
412 See the note about binary compatibility above. This option will be enabled by default beginning with 5.7.1.
413 !!MAKE PROBLEMS.
414
415
416 Dynamic Loading Problems With GNU as
417 and GNU ld
418
419
420 If you have problems with dynamic loading using gcc on
421 SunOS or Solaris, and you are using GNU as
422 and GNU ld, see the section `` GNU as
423 and GNU ld'' above.
424
425
426 ld.so.1: ./perl: fatal: relocation
427 error:
428
429
430 If you get this message on SunOS or Solaris, and you're
431 using gcc, it's probably the GNU as or GNU
432 ld problem in the previous item `` GNU as
433 and GNU ld''.
434
435
436 dlopen: stub interception failed
437
438
439 The primary cause of the 'dlopen: stub interception
440 failed' message is that the LD_LIBRARY_PATH
441 environment variable includes a directory which is a
442 symlink to /usr/lib (such as /lib). See ``
443 LD_LIBRARY_PATH '' above.
444
445
446 #error ``No DATAMODEL_NATIVE
447 specified''
448
449
450 This is a common error when trying to build perl on
451 Solaris 2.6 with a gcc installation from Solaris 2.5 or
452 2.5.1. The Solaris header files changed, so you need to
453 update your gcc installation. You can either rerun the
454 fixincludes script from gcc or take the opportunity to
455 update your gcc installation.
456
457
458 sh: ar: not found
459
460
461 This is a message from your shell telling you that the
462 command 'ar' was not found. You need to check your
463 PATH environment variable to make sure that it includes
464 the directory with the 'ar' command. This is a common
465 problem on Solaris, where 'ar' is in the /usr/ccs/bin/
466 directory.
467 !!MAKE TEST
468
469
470 __op/stat.t test 4__
471
472
473 op/stat.t test 4 may fail if you are on a tmpfs of some
474 sort. Building in /tmp sometimes shows this behavior. The
475 test suite detects if you are building in /tmp, but it may
476 not be able to catch all tmpfs
477 situations.
478 !!PREBUILT BINARIES.
479
480
481 You can pick up prebuilt binaries for Solaris from
482 !!RUNTIME ISSUES.
483
484
485 __Limits on Numbers of Open
486 Files.__
487
488
489 The stdio(3C) manpage notes that only 255 files may be
490 opened using ''fopen()'', and only file descriptors 0
491 through 255 can be used in a stream. Since perl calls
492 ''open()'' and then fdopen(3C) with the resulting file
493 descriptor, perl is limited to 255 simultaneous open
494 files.
495 !!SOLARIS-SPECIFIC MODULES.
496
497
498 See the modules under the Solaris:: namespace on
499 CPAN ,
500 !!SOLARIS-SPECIFIC PROBLEMS WITH MODULES.
501
502
2 perry 503 __Proc::!ProcessTable__
1 perry 504
505
2 perry 506 Proc::!ProcessTable does not compile on Solaris with
1 perry 507 perl5.6.0 and higher if you have LARGEFILES
508 defined. Since largefile support is the default in
509 5.6.0 and later, you have to take special steps to use this
510 module.
511
512
513 The problem is that various structures visible via
514 procfs use off_t, and if you compile with largefile support
515 these change from 32 bits to 64 bits. Thus what you get back
516 from procfs doesn't match up with the structures in perl,
517 resulting in garbage. See proc(4) for further
518 discussion.
519
520
2 perry 521 A fix for Proc::!ProcessTable is to edit Makefile to
1 perry 522 explicitly remove the largefile flags from the ones
2 perry 523 !MakeMaker picks up from Config.pm. This will result in
524 Proc::!ProcessTable being built under the correct
1 perry 525 environment. Everything should then be OK as long
2 perry 526 as Proc::!ProcessTable doesn't try to share off_t's with the
1 perry 527 rest of perl, or if it does they should be explicitly
528 specified as off64_t.
529
530
531 __BSD::Resource__
532
533
534 BSD::Resource versions earlier than 1.09 do not compile
535 on Solaris with perl 5.6.0 and higher, for the same reasons
2 perry 536 as Proc::!ProcessTable. BSD::Resource versions starting from
1 perry 537 1.09 have a workaround for the problem.
538
539
540 __Net::SSLeay__
541
542
543 Net::SSLeay requires a /dev/urandom to be present. This
544 device is not part of Solaris. You can either get the
545 package SUNWski (packaged with several Sun software
2 perry 546 products, for example the Sun !WebServer, which is part of
1 perry 547 the Solaris Server Intranet Extension, or the Sun Directory
548 Services, part of Solaris for ISPs) or download the ANDIrand
549 package from
550
551
552 It may be possible to use the Entropy Gathering Daemon
553 (written in Perl!), available from
554 !!AUTHOR
555
556
557 The original was written by Andy Dougherty
558 ''doughera@lafayette.edu'' drawing heavily on advice from
559 Alan Burlison, Nick Ing-Simmons, Tim Bunce, and many other
560 Solaris users over the years.
561
562
563 Please report any errors, updates, or suggestions to
564 ''perlbug@perl.org''.
565 !!LAST MODIFIED
566
567
568 $Id: README .solaris,v 1.4 2000/11/11
569 20:29:58 doughera Exp $
570 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.

PHP Warning

lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 42 times)