perl
view release on metacpan or search on metacpan
README.solaris view on Meta::CPAN
_XBS5_LP64_OFF64_LINTFLAGS: -xarch=v9
_XBS5_LPBIG_OFFBIG_CFLAGS: -xarch=v9
_XBS5_LPBIG_OFFBIG_LDFLAGS: -xarch=v9
_XBS5_LPBIG_OFFBIG_LINTFLAGS: -xarch=v9
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.
If you are using gcc, you would need to use -mcpu=v9 -m64 instead. This
option is not yet supported as of gcc 2.95.2; from install/SPECIFIC
in that release:
GCC version 2.95 is not able to compile code correctly for sparc64
targets. Users of the Linux kernel, at least, can use the sparc32
program to start up a new shell invocation with an environment that
causes configure to recognize (via uname -a) the system as sparc-*-*
instead.
All this should be handled automatically by the hints file, if
requested.
=head3 Long Doubles
As of 5.8.1, long doubles are working if you use the Sun compilers
(needed for additional math routines not included in libm).
=head2 Threads in perl on Solaris
It is possible to build a threaded version of perl on Solaris. The entire
perl thread implementation is still experimental, however, so beware.
=head2 Malloc Issues with perl on Solaris
Starting from perl 5.7.1 perl uses the Solaris malloc, since the perl
malloc breaks when dealing with more than 2GB of memory, and the Solaris
malloc also seems to be faster.
If you for some reason (such as binary backward compatibility) really
need to use perl's malloc, you can rebuild perl from the sources
and Configure the build with
$ sh Configure -Dusemymalloc
You should not use perl's malloc if you are building with gcc. There
are reports of core dumps, especially in the PDL module. The problem
appears to go away under -DDEBUGGING, so it has been difficult to
track down. Sun's compiler appears to be okay with or without perl's
malloc. [XXX further investigation is needed here.]
=head1 MAKE PROBLEMS
=over 4
=item Dynamic Loading Problems With GNU as and GNU ld
If you have problems with dynamic loading using gcc on SunOS or
Solaris, and you are using GNU as and GNU ld, see the section
L</"GNU as and GNU ld"> above.
=item ld.so.1: ./perl: fatal: relocation error:
If you get this message on SunOS or Solaris, and you're using gcc,
it's probably the GNU as or GNU ld problem in the previous item
L</"GNU as and GNU ld">.
=item dlopen: stub interception failed
The primary cause of the 'dlopen: stub interception failed' message is
that the LD_LIBRARY_PATH environment variable includes a directory
which is a symlink to /usr/lib (such as /lib). See
L</"LD_LIBRARY_PATH"> above.
=item #error "No DATAMODEL_NATIVE specified"
This is a common error when trying to build perl on Solaris 2.6 with a
gcc installation from Solaris 2.5 or 2.5.1. The Solaris header files
changed, so you need to update your gcc installation. You can either
rerun the fixincludes script from gcc or take the opportunity to
update your gcc installation.
=item sh: ar: not found
This is a message from your shell telling you that the command 'ar'
was not found. You need to check your PATH environment variable to
make sure that it includes the directory with the 'ar' command. This
is a common problem on Solaris, where 'ar' is in the /usr/ccs/bin/
directory.
=back
=head1 MAKE TEST
=head2 op/stat.t test 4 in Solaris
F<op/stat.t> test 4 may fail if you are on a tmpfs of some sort.
Building in /tmp sometimes shows this behavior. The
test suite detects if you are building in /tmp, but it may not be able
to catch all tmpfs situations.
=head2 nss_delete core dump from op/pwent or op/grent
See L<perlhpux/"nss_delete core dump from op/pwent or op/grent">.
=head1 CROSS-COMPILATION
Nothing too unusual here. You can easily do this if you have a
cross-compiler available; A usual Configure invocation when targetting a
Solaris x86 looks something like this:
sh ./Configure -des -Dusecrosscompile \
-Dcc=i386-pc-solaris2.11-gcc \
-Dsysroot=$SYSROOT \
-Alddlflags=" -Wl,-z,notext" \
-Dtargethost=... # The usual cross-compilation options
The lddlflags addition is the only abnormal bit.
=head1 PREBUILT BINARIES OF PERL FOR SOLARIS
You can pick up prebuilt binaries for Solaris from
README.solaris view on Meta::CPAN
(Solaris 9 onwards) appropriately.
=head1 SOLARIS-SPECIFIC MODULES
See the modules under the Solaris:: and Sun::Solaris namespaces on CPAN,
see L<http://www.cpan.org/modules/by-module/Solaris/> and
L<http://www.cpan.org/modules/by-module/Sun/>.
=head1 SOLARIS-SPECIFIC PROBLEMS WITH MODULES
=head2 Proc::ProcessTable on Solaris
Proc::ProcessTable does not compile on Solaris with perl5.6.0 and higher
if you have LARGEFILES defined. Since largefile support is the
default in 5.6.0 and later, you have to take special steps to use this
module.
The problem is that various structures visible via procfs use off_t,
and if you compile with largefile support these change from 32 bits to
64 bits. Thus what you get back from procfs doesn't match up with
the structures in perl, resulting in garbage. See proc(4) for further
discussion.
A fix for Proc::ProcessTable is to edit Makefile to
explicitly remove the largefile flags from the ones MakeMaker picks up
from Config.pm. This will result in Proc::ProcessTable being built
under the correct environment. Everything should then be OK as long as
Proc::ProcessTable doesn't try to share off_t's with the rest of perl,
or if it does they should be explicitly specified as off64_t.
=head2 BSD::Resource on Solaris
BSD::Resource versions earlier than 1.09 do not compile on Solaris
with perl 5.6.0 and higher, for the same reasons as Proc::ProcessTable.
BSD::Resource versions starting from 1.09 have a workaround for the problem.
=head2 Net::SSLeay on Solaris
Net::SSLeay requires a /dev/urandom to be present. This device is
available from Solaris 9 onwards. For earlier Solaris versions you
can either get the package SUNWski (packaged with several Sun
software products, for example the Sun WebServer, which is part of
the Solaris Server Intranet Extension, or the Sun Directory Services,
part of Solaris for ISPs) or download the ANDIrand package from
L<http://www.cosy.sbg.ac.at/~andi/>. If you use SUNWski, make a
symbolic link /dev/urandom pointing to /dev/random. For more details,
see Document ID27606 entitled "Differing /dev/random support requirements
within Solaris[TM] Operating Environments", available at
L<http://sunsolve.sun.com> .
It may be possible to use the Entropy Gathering Daemon (written in
Perl!), available from L<http://www.lothar.com/tech/crypto/>.
=head1 SunOS 4.x
In SunOS 4.x you most probably want to use the SunOS ld, /usr/bin/ld,
since the more recent versions of GNU ld (like 2.13) do not seem to
work for building Perl anymore. When linking the extensions, the
GNU ld gets very unhappy and spews a lot of errors like this
... relocation truncated to fit: BASE13 ...
and dies. Therefore the SunOS 4.1 hints file explicitly sets the
ld to be F</usr/bin/ld>.
As of Perl 5.8.1 the dynamic loading of libraries (DynaLoader, XSLoader)
also seems to have become broken in in SunOS 4.x. Therefore the default
is to build Perl statically.
Running the test suite in SunOS 4.1 is a bit tricky since the
F<dist/Tie-File/t/09_gen_rs.t> test hangs (subtest #51, FWIW) for some
unknown reason. Just stop the test and kill that particular Perl
process.
There are various other failures, that as of SunOS 4.1.4 and gcc 3.2.2
look a lot like gcc bugs. Many of the failures happen in the Encode
tests, where for example when the test expects "0" you get "0"
which should after a little squinting look very odd indeed.
Another example is earlier in F<t/run/fresh_perl> where chr(0xff) is
expected but the test fails because the result is chr(0xff). Exactly.
This is the "make test" result from the said combination:
Failed 27 test scripts out of 745, 96.38% okay.
Running the C<harness> is painful because of the many failing
Unicode-related tests will output megabytes of failure messages,
but if one patiently waits, one gets these results:
Failed Test Stat Wstat Total Fail Failed List of Failed
-----------------------------------------------------------------------------
...
../ext/Encode/t/at-cn.t 4 1024 29 4 13.79% 14-17
../ext/Encode/t/at-tw.t 10 2560 17 10 58.82% 2 4 6 8 10 12
14-17
../ext/Encode/t/enc_data.t 29 7424 ?? ?? % ??
../ext/Encode/t/enc_eucjp.t 29 7424 ?? ?? % ??
../ext/Encode/t/enc_module.t 29 7424 ?? ?? % ??
../ext/Encode/t/encoding.t 29 7424 ?? ?? % ??
../ext/Encode/t/grow.t 12 3072 24 12 50.00% 2 4 6 8 10 12 14
16 18 20 22 24
Failed Test Stat Wstat Total Fail Failed List of Failed
------------------------------------------------------------------------------
../ext/Encode/t/guess.t 255 65280 29 40 137.93% 10-29
../ext/Encode/t/jperl.t 29 7424 15 30 200.00% 1-15
../ext/Encode/t/mime-header.t 2 512 10 2 20.00% 2-3
../ext/Encode/t/perlio.t 22 5632 38 22 57.89% 1-4 9-16 19-20
23-24 27-32
../ext/List/Util/t/shuffle.t 0 139 ?? ?? % ??
../ext/PerlIO/t/encoding.t 14 1 7.14% 11
../ext/PerlIO/t/fallback.t 9 2 22.22% 3 5
../ext/Socket/t/socketpair.t 0 2 45 70 155.56% 11-45
../lib/CPAN/t/vcmp.t 30 1 3.33% 25
../lib/Tie/File/t/09_gen_rs.t 0 15 ?? ?? % ??
../lib/Unicode/Collate/t/test.t 199 30 15.08% 7 26-27 71-75
81-88 95 101
103-104 106 108-
109 122 124 161
169-172
../lib/sort.t 0 139 119 26 21.85% 107-119
op/alarm.t 4 1 25.00% 4
( run in 0.532 second using v1.01-cache-2.11-cpan-5511b514fd6 )