📄 perlsolaris.1
字号:
.PP\fIBuilding an \s-1LP64\s0 perl\fR.IX Subsection "Building an LP64 perl".PPTo compile a 64\-bit application on an UltraSparc with a recent Sun Compiler,you need to use the flag \*(L"\-xarch=v9\*(R". \fIgetconf\fR\|(1) will tell you this, e.g..PP.Vb 10\& $ getconf \-a | grep v9\& XBS5_LP64_OFF64_CFLAGS: \-xarch=v9\& XBS5_LP64_OFF64_LDFLAGS: \-xarch=v9\& XBS5_LP64_OFF64_LINTFLAGS: \-xarch=v9\& XBS5_LPBIG_OFFBIG_CFLAGS: \-xarch=v9\& XBS5_LPBIG_OFFBIG_LDFLAGS: \-xarch=v9\& XBS5_LPBIG_OFFBIG_LINTFLAGS: \-xarch=v9\& _XBS5_LP64_OFF64_CFLAGS: \-xarch=v9\& _XBS5_LP64_OFF64_LDFLAGS: \-xarch=v9\& _XBS5_LP64_OFF64_LINTFLAGS: \-xarch=v9\& _XBS5_LPBIG_OFFBIG_CFLAGS: \-xarch=v9\& _XBS5_LPBIG_OFFBIG_LDFLAGS: \-xarch=v9\& _XBS5_LPBIG_OFFBIG_LINTFLAGS: \-xarch=v9.Ve.PPThis flag is supported in Sun WorkShop Compilers 5.0 and onwards(now marketed under the name Forte) when used on Solaris 7 or later onUltraSparc systems..PPIf you are using gcc, you would need to use \-mcpu=v9 \-m64 instead. Thisoption is not yet supported as of gcc 2.95.2; from install/SPECIFICin that release:.PP.Vb 5\& 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..Ve.PPAll this should be handled automatically by the hints file, ifrequested..PP\fILong Doubles.\fR.IX Subsection "Long Doubles.".PPAs of 5.8.1, long doubles are working if you use the Sun compilers(needed for additional math routines not included in libm)..Sh "Threads in perl on Solaris.".IX Subsection "Threads in perl on Solaris."It is possible to build a threaded version of perl on Solaris. The entireperl thread implementation is still experimental, however, so beware..Sh "Malloc Issues with perl on Solaris.".IX Subsection "Malloc Issues with perl on Solaris."Starting from perl 5.7.1 perl uses the Solaris malloc, since the perlmalloc breaks when dealing with more than 2GB of memory, and the Solarismalloc also seems to be faster..PPIf you for some reason (such as binary backward compatibility) reallyneed to use perl's malloc, you can rebuild perl from the sourcesand Configure the build with.PP.Vb 1\& $ sh Configure \-Dusemymalloc.Ve.PPYou should not use perl's malloc if you are building with gcc. Thereare reports of core dumps, especially in the \s-1PDL\s0 module. The problemappears to go away under \-DDEBUGGING, so it has been difficult totrack down. Sun's compiler appears to be okay with or without perl'smalloc. [\s-1XXX\s0 further investigation is needed here.].SH "MAKE PROBLEMS.".IX Header "MAKE PROBLEMS.".IP "Dynamic Loading Problems With \s-1GNU\s0 as and \s-1GNU\s0 ld" 4.IX Item "Dynamic Loading Problems With GNU as and GNU ld"If you have problems with dynamic loading using gcc on SunOS orSolaris, and you are using \s-1GNU\s0 as and \s-1GNU\s0 ld, see the section\&\*(L"\s-1GNU\s0 as and \s-1GNU\s0 ld\*(R" above..IP "ld.so.1: ./perl: fatal: relocation error:" 4.IX 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 \s-1GNU\s0 as or \s-1GNU\s0 ld problem in the previous item\&\*(L"\s-1GNU\s0 as and \s-1GNU\s0 ld\*(R"..IP "dlopen: stub interception failed" 4.IX Item "dlopen: stub interception failed"The primary cause of the 'dlopen: stub interception failed' message isthat the \s-1LD_LIBRARY_PATH\s0 environment variable includes a directorywhich is a symlink to /usr/lib (such as /lib). See\&\*(L"\s-1LD_LIBRARY_PATH\s0\*(R" above..ie n .IP "#error ""No \s-1DATAMODEL_NATIVE\s0 specified""" 4.el .IP "#error ``No \s-1DATAMODEL_NATIVE\s0 specified''" 4.IX Item "#error No DATAMODEL_NATIVE specified"This is a common error when trying to build perl on Solaris 2.6 with agcc installation from Solaris 2.5 or 2.5.1. The Solaris header fileschanged, so you need to update your gcc installation. You can eitherrerun the fixincludes script from gcc or take the opportunity toupdate your gcc installation..IP "sh: ar: not found" 4.IX 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 \s-1PATH\s0 environment variable tomake sure that it includes the directory with the 'ar' command. Thisis a common problem on Solaris, where 'ar' is in the /usr/ccs/bin/directory..SH "MAKE TEST".IX Header "MAKE TEST".Sh "op/stat.t test 4 in Solaris".IX Subsection "op/stat.t test 4 in Solaris"op/stat.t test 4 may fail if you are on a tmpfs of some sort.Building in /tmp sometimes shows this behavior. Thetest suite detects if you are building in /tmp, but it may not be ableto catch all tmpfs situations..Sh "nss_delete core dump from op/pwent or op/grent".IX Subsection "nss_delete core dump from op/pwent or op/grent"See \*(L"nss_delete core dump from op/pwent or op/grent\*(R" in perlhpux..SH "PREBUILT BINARIES OF PERL FOR SOLARIS.".IX Header "PREBUILT BINARIES OF PERL FOR SOLARIS."You can pick up prebuilt binaries for Solaris from<http://www.sunfreeware.com/>, <http://www.blastwave.org>,ActiveState <http://www.activestate.com/>, and<http://www.perl.com/> under the Binaries list at the top of thepage. There are probably other sources as well. Please note thatthese sites are under the control of their respective owners, not theperl developers..SH "RUNTIME ISSUES FOR PERL ON SOLARIS.".IX Header "RUNTIME ISSUES FOR PERL ON SOLARIS.".Sh "Limits on Numbers of Open Files on Solaris.".IX Subsection "Limits on Numbers of Open Files on Solaris."The stdio(3C) manpage notes that for \s-1LP32\s0 applications, only 255files may be opened using \fIfopen()\fR, and only file descriptors 0through 255 can be used in a stream. Since perl calls \fIopen()\fR andthen fdopen(3C) with the resulting file descriptor, perl is limitedto 255 simultaneous open files, even if \fIsysopen()\fR is used. If thisproves to be an insurmountable problem, you can compile perl as a\&\s-1LP64\s0 application, see \*(L"Building an \s-1LP64\s0 perl\*(R" for details. Notealso that the default resource limit for open file descriptors onSolaris is 255, so you will have to modify your ulimit or rctl(Solaris 9 onwards) appropriately..SH "SOLARIS-SPECIFIC MODULES.".IX Header "SOLARIS-SPECIFIC MODULES."See the modules under the Solaris:: and Sun::Solaris namespaces on \s-1CPAN\s0,see <http://www.cpan.org/modules/by\-module/Solaris/> and<http://www.cpan.org/modules/by\-module/Sun/>..SH "SOLARIS-SPECIFIC PROBLEMS WITH MODULES.".IX Header "SOLARIS-SPECIFIC PROBLEMS WITH MODULES.".Sh "Proc::ProcessTable on Solaris".IX Subsection "Proc::ProcessTable on Solaris"Proc::ProcessTable does not compile on Solaris with perl5.6.0 and higherif you have \s-1LARGEFILES\s0 defined. Since largefile support is thedefault in 5.6.0 and later, you have to take special steps to use thismodule..PPThe problem is that various structures visible via procfs use off_t,and if you compile with largefile support these change from 32 bits to64 bits. Thus what you get back from procfs doesn't match up withthe structures in perl, resulting in garbage. See \fIproc\fR\|(4) for furtherdiscussion..PPA fix for Proc::ProcessTable is to edit Makefile toexplicitly remove the largefile flags from the ones MakeMaker picks upfrom Config.pm. This will result in Proc::ProcessTable being builtunder the correct environment. Everything should then be \s-1OK\s0 as long asProc::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..Sh "BSD::Resource on Solaris".IX Subsection "BSD::Resource on Solaris"BSD::Resource versions earlier than 1.09 do not compile on Solariswith 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..Sh "Net::SSLeay on Solaris".IX Subsection "Net::SSLeay on Solaris"Net::SSLeay requires a /dev/urandom to be present. This device isavailable from Solaris 9 onwards. For earlier Solaris versions youcan either get the package SUNWski (packaged with several Sunsoftware products, for example the Sun WebServer, which is part ofthe Solaris Server Intranet Extension, or the Sun Directory Services,part of Solaris for ISPs) or download the ANDIrand package from<http://www.cosy.sbg.ac.at/~andi/>. If you use SUNWski, make asymbolic link /dev/urandom pointing to /dev/random. For more details,see Document \s-1ID27606\s0 entitled \*(L"Differing /dev/random support requirementswithin Solaris[\s-1TM\s0] Operating Environments\*(R", available athttp://sunsolve.sun.com ..PPIt may be possible to use the Entropy Gathering Daemon (written inPerl!), available from <http://www.lothar.com/tech/crypto/>..SH "SunOS 4.x".IX Header "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 \s-1GNU\s0 ld (like 2.13) do not seem towork for building Perl anymore. When linking the extensions, the\&\s-1GNU\s0 ld gets very unhappy and spews a lot of errors like this.PP.Vb 1\& ... relocation truncated to fit: BASE13 ....Ve.PPand dies. Therefore the SunOS 4.1 hints file explicitly sets theld to be /usr/bin/ld..PPAs 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 defaultis to build Perl statically..PPRunning the test suite in SunOS 4.1 is a bit tricky since the\&\fIlib/Tie/File/t/09_gen_rs\fR test hangs (subtest #51, \s-1FWIW\s0) for someunknown reason. Just stop the test and kill that particular Perlprocess..PPThere are various other failures, that as of SunOS 4.1.4 and gcc 3.2.2look a lot like gcc bugs. Many of the failures happen in the Encodetests, where for example when the test expects \*(L"0\*(R" you get \*(L"0\*(R"which should after a little squinting look very odd indeed.Another example is earlier in \fIt/run/fresh_perl\fR where \fIchr\fR\|(0xff) isexpected but the test fails because the result is \fIchr\fR\|(0xff). Exactly..PPThis is the \*(L"make test\*(R" result from the said combination:.PP.Vb 1\& Failed 27 test scripts out of 745, 96.38% okay..Ve.PPRunning the \f(CW\*(C`harness\*(C'\fR is painful because of the many failingUnicode-related tests will output megabytes of failure messages,but if one patiently waits, one gets these results:.PP.Vb 10\& 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\& op/utfhash.t 97 1 1.03% 31\& run/fresh_perl.t 91 1 1.10% 32\& uni/tr_7jis.t ?? ?? % ??\& uni/tr_eucjp.t 29 7424 6 12 200.00% 1\-6\& uni/tr_sjis.t 29 7424 6 12 200.00% 1\-6\& 56 tests and 467 subtests skipped.\& Failed 27/811 test scripts, 96.67% okay. 1383/75399 subtests failed, 98.17% okay..Ve.PPThe \fIalarm()\fR test failure is caused by \fIsystem()\fR apparently blocking\&\fIalarm()\fR. That is probably a libc bug, and given that SunOS 4.xhas been end-of-lifed years ago, don't hold your breath for a fix.In addition to that, don't try anything too Unicode-y, especiallywith Encode, and you should be fine in SunOS 4.x..SH "AUTHOR".IX Header "AUTHOR"The original was written by Andy Dougherty \fIdoughera@lafayette.edu\fRdrawing heavily on advice from Alan Burlison, Nick Ing-Simmons, Tim Bunce,and many other Solaris users over the years..PPPlease report any errors, updates, or suggestions to \fIperlbug@perl.org\fR.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -