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