Fix c6bf6a65 - 64 bit big endian builds were broken.
[p5sagit/p5-mst-13.2.git] / README.tru64
CommitLineData
ea3bceb2 1If you read this file _as_is_, just ignore the funny characters you see.
2It is written in the POD format (see pod/perlpod.pod) which is specially
3designed to be readable as is.
4
5=head1 NAME
6
7README.tru64 - Perl version 5 on Tru64 (formerly known as Digital UNIX formerly known as DEC OSF/1) systems
8
9=head1 DESCRIPTION
10
88ec1f5d 11This document describes various features of HP's (formerly Compaq's,
12formerly Digital's) Unix operating system (Tru64) that will affect
92c48b5b 13how Perl version 5 (hereafter just Perl) is configured, compiled
14and/or runs.
ea3bceb2 15
16=head2 Compiling Perl 5 on Tru64
17
18The recommended compiler to use in Tru64 is the native C compiler.
88ec1f5d 19The native compiler produces much faster code (the speed difference is
20noticeable: several dozen percentages) and also more correct code: if
92c48b5b 21you are considering using the GNU C compiler you should use at the
22very least the release of 2.95.3 since all older gcc releases are
23known to produce broken code when compiling Perl. One manifestation
24of this brokenness is the lib/sdbm test dumping core; another is many
25of the op/regexp and op/pat, or ext/Storable tests dumping core
26(the exact pattern of failures depending on the GCC release and
27optimization flags).
ea3bceb2 28
532eb838 29gcc 3.2.1 is known to work okay with Perl 5.8.0. However, when
30optimizing the toke.c gcc likes to have a lot of memory, 256 megabytes
31seems to be enough. The default setting of the process data section
32in Tru64 should be one gigabyte, but some sites/setups might have
33lowered that. The configuration process of Perl checks for too low
34process limits, and lowers the optimization for the toke.c if
35necessary, and also gives advice on how to raise the process limits.
36
71c4561b 37Also, Configure might abort with
38
39 Build a threading Perl? [n]
40 Configure[2437]: Syntax error at line 1 : `config.sh' is not expected.
41
42This indicates that Configure is being run with a broken Korn shell
43(even though you think you are using a Bourne shell by using
44"sh Configure" or "./Configure"). The Korn shell bug has been reported
45to Compaq as of February 1999 but in the meanwhile, the reason ksh is
46being used is that you have the environment variable BIN_SH set to
47'xpg4'. This causes /bin/sh to delegate its duties to /bin/posix/sh
48(a ksh). Unset the environment variable and rerun Configure.
49
ea3bceb2 50=head2 Using Large Files with Perl on Tru64
51
88ec1f5d 52In Tru64 Perl is automatically able to use large files, that is,
53files larger than 2 gigabytes, there is no need to use the Configure
92c48b5b 54-Duselargefiles option as described in INSTALL (though using the option
55is harmless).
ea3bceb2 56
57=head2 Threaded Perl on Tru64
58
294f22c5 59If you want to use threads, you should primarily use the Perl
88ec1f5d 605.8.0 threads model by running Configure with -Duseithreads.
ea3bceb2 61
294f22c5 62Perl threading is going to work only in Tru64 4.0 and newer releases,
63older operating releases like 3.2 aren't probably going to work
64properly with threads.
ea3bceb2 65
700a71f5 66In Tru64 V5 (at least V5.1A, V5.1B) you cannot build threaded Perl with gcc
67because the system header <pthread.h> explicitly checks for supported
68C compilers, gcc (at least 3.2.2) not being one of them. But the
69system C compiler should work just fine.
70
bef5f079 71=head2 Long Doubles on Tru64
72
92c48b5b 73You cannot Configure Perl to use long doubles unless you have at least
74Tru64 V5.0, the long double support simply wasn't functional enough
75before that. Perl's Configure will override attempts to use the long
76doubles (you can notice this by Configure finding out that the modfl()
77function does not work as it should).
bef5f079 78
88ec1f5d 79At the time of this writing (June 2002), there is a known bug in the
80Tru64 libc printing of long doubles when not using "e" notation.
81The values are correct and usable, but you only get a limited number
82of digits displayed unless you force the issue by using C<printf
83"%.33e",$num> or the like. For Tru64 versions V5.0A through V5.1A, a
84patch is expected sometime after perl 5.8.0 is released. If your libc
85has not yet been patched, you'll get a warning from Configure when
86selecting long doubles.
fa17d112 87
7db3d8c1 88=head2 DB_File tests failing on Tru64
89
90The DB_File tests (db-btree.t, db-hash.t, db-recno.t) may fail you
91have installed a newer version of Berkeley DB into the system and the
7f274f0f 92-I and -L compiler and linker flags introduce version conflicts with
93the DB 1.85 headers and libraries that came with the Tru64. For example,
94mixing a DB v2 library with the DB v1 headers is a bad idea. Watch
95out for Configure options -Dlocincpth and -Dloclibpth, and check your
96/usr/local/include and /usr/local/lib since they are included by default.
7db3d8c1 97
98The second option is to explicitly instruct Configure to detect the
99newer Berkeley DB installation, by supplying the right directories with
100C<-Dlocincpth=/some/include> and C<-Dloclibpth=/some/lib> B<and> before
101running "make test" setting your LD_LIBRARY_PATH to F</some/lib>.
102
103The third option is to work around the problem by disabling the
104DB_File completely when build Perl by specifying -Ui_db to Configure,
7f274f0f 105and then using the BerkeleyDB module from CPAN instead of DB_File.
106The BerkeleyDB works with Berkeley DB versions 2.* or greater.
7db3d8c1 107
108The Berkeley DB 4.1.25 has been tested with Tru64 V5.1A and found
cfc8a802 109to work. The latest Berkeley DB can be found from F<http://www.sleepycat.com>.
110
ea3bceb2 111=head2 64-bit Perl on Tru64
112
113In Tru64 Perl's integers are automatically 64-bit wide, there is
114no need to use the Configure -Duse64bitint option as described
88ec1f5d 115in INSTALL. Similarly, there is no need for -Duse64bitall
116since pointers are automatically 64-bit wide.
ea3bceb2 117
118=head2 Warnings about floating-point overflow when compiling Perl on Tru64
119
120When compiling Perl in Tru64 you may (depending on the compiler
121release) see two warnings like this
122
d780cd7a 123 cc: Warning: numeric.c, line 104: In this statement, floating-point overflow occurs in evaluating the expression "1.8e308". (floatoverfl)
ea3bceb2 124 return HUGE_VAL;
125 -----------^
126
ef3337d4 127and when compiling the POSIX extension
128
129 cc: Warning: const-c.inc, line 2007: In this statement, floating-point overflow occurs in evaluating the expression "1.8e308". (floatoverfl)
ea3bceb2 130 return HUGE_VAL;
131 -------------------^
132
92c48b5b 133The exact line numbers may vary between Perl releases. The warnings
134are benign and can be ignored: in later C compiler releases the warnings
135should be gone.
ea3bceb2 136
137When the file F<pp_sys.c> is being compiled you may (depending on the
138operating system release) see an additional compiler flag being used:
139C<-DNO_EFF_ONLY_OK>. This is normal and refers to a feature that is
140relevant only if you use the C<filetest> pragma. In older releases of
141the operating system the feature was broken and the NO_EFF_ONLY_OK
142instructs Perl not to use the feature.
143
144=head1 Testing Perl on Tru64
145
146During "make test" the C<comp/cpp> will be skipped because on Tru64 it
147cannot be tested before Perl has been installed. The test refers to
148the use of the C<-P> option of Perl.
149
2dfde39d 150=head1 ext/ODBM_File/odbm Test Failing With Static Builds
151
152The ext/ODBM_File/odbm is known to fail with static builds
88ec1f5d 153(Configure -Uusedl) due to a known bug in Tru64's static libdbm
2dfde39d 154library. The good news is that you very probably don't need to ever
155use the ODBM_File extension since more advanced NDBM_File works fine,
156not to mention the even more advanced DB_File.
157
9a8de003 158=head1 Perl Fails Because Of Unresolved Symbol sockatmark
159
160If you get an error like
161
4282de36 162 Can't load '.../OSF1/lib/perl5/5.8.0/alpha-dec_osf/auto/IO/IO.so' for module IO: Unresolved symbol in .../lib/perl5/5.8.0/alpha-dec_osf/auto/IO/IO.so: sockatmark at .../lib/perl5/5.8.0/alpha-dec_osf/XSLoader.pm line 75.
9a8de003 163
164you need to either recompile your Perl in Tru64 4.0D or upgrade your
92c48b5b 165Tru64 4.0D to at least 4.0F: the sockatmark() system call was
166added in Tru64 4.0F, and the IO extension refers that symbol.
9a8de003 167
ea3bceb2 168=head1 AUTHOR
169
170Jarkko Hietaniemi <jhi@iki.fi>
171
172=cut