⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 perlsolaris.pod

📁 MSYS在windows下模拟了一个类unix的终端
💻 POD
📖 第 1 页 / 共 2 页
字号:
      fubar$ isainfo -v   # Ultra 30 in 64 bit mode      64-bit sparcv9 applications      32-bit sparc applicationsBy default, perl will be compiled as a 32-bit application.  Unless youwant to allocate more than ~ 4GB of memory inside Perl, you probablydon't need Perl to be a 64-bit app.=head3 Large File SuppprtFor Solaris 2.6 and onwards, there are two different ways for 32-bitapplications to manipulate large files (files whose size is > 2GByte).(A 64-bit application automatically has largefile support built inby default.)First is the "transitional compilation environment", described inlfcompile64(5).  According to the man page,    The transitional compilation  environment  exports  all  the    explicit 64-bit functions (xxx64()) and types in addition to    all the regular functions (xxx()) and types. Both xxx()  and    xxx64()  functions  are  available to the program source.  A    32-bit application must use the xxx64() functions in  order    to  access  large  files.  See the lf64(5) manual page for a    complete listing of the 64-bit transitional interfaces.The transitional compilation environment is obtained with thefollowing compiler and linker flags:    getconf LFS64_CFLAGS        -D_LARGEFILE64_SOURCE    getconf LFS64_LDFLAG        # nothing special needed    getconf LFS64_LIBS          # nothing special neededSecond is the "large file compilation environment", described inlfcompile(5).  According to the man page,    Each interface named xxx() that needs to access 64-bit entities    to  access  large  files maps to a xxx64() call in the    resulting binary. All relevant data types are defined to  be    of correct size (for example, off_t has a typedef definition    for a 64-bit entity).    An application compiled in this environment is able  to  use    the  xxx()  source interfaces to access both large and small    files, rather than having to explicitly utilize the  transitional    xxx64()  interface  calls to access large files.Two exceptions are fseek() and ftell().  32-bit applications shoulduse fseeko(3C) and ftello(3C).  These will get automatically mappedto fseeko64() and ftello64().The large file compilation environment is obtained with	getconf LFS_CFLAGS      -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64	getconf LFS_LDFLAGS     # nothing special needed	getconf LFS_LIBS        # nothing special neededBy default, perl uses the large file compilation environment andrelies on Solaris to do the underlying mapping of interfaces.=head3 Building an LP64 PerlTo compile a 64-bit application on an UltraSparc with a recent Sun Compiler,you need to use the flag "-xarch=v9".  getconf(1) will tell you this, e.g.      fubar$ 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=v9This 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.If 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:GCC version 2.95 is not able to compile code correctly for sparc64targets. Users of the Linux kernel, at least, can use the sparc32program to start up a new shell invocation with an environment thatcauses configure to recognize (via uname -a) the system as sparc-*-*instead.All this should be handled automatically by the hints file, ifrequested.If you do want to be able to allocate more than 4GB memory insideperl, then you should use the Solaris malloc, since the perlmalloc breaks when dealing with more than 2GB of memory.  You can dothis with	sh Configure -UusemymallocNote that this will break binary compatibility with any version thatwas not compiled with -Uusemymalloc.=head3 Long Doubles.As of 5.6.0, long doubles are not working.=head2 Threads.It is possible to build a threaded version of perl on Solaris.  The entireperl thread implementation is still experimental, however, so beware.Perl uses the sched_yield(3RT) function.  In versions of Solaris upto 2.6, that function is in -lposix4.  Starting with Solaris 7, it isin -lrt.  The hints file should handle adding this automatically.=head2 Malloc Issues.You should not use perl's malloc if you are building with gcc.  Thereare reports of core dumps, especially in the PDL module.  The problemappears to go away under -DDEBUGGING, so it has been difficult totrack down.  Sun's compiler appears to be ok with or without perl'smalloc. [XXX further investigation is needed here.]You should also not use perl's malloc if you are building perl asan LP64 application, since perl's malloc has trouble allocating morethan 2GB of memory.You can avoid perl's malloc by Configuring with	sh Configure -UusemymallocSee the note about binary compatibility above.  This option will beenabled by default beginning with 5.7.1.=head1 MAKE PROBLEMS.=over 4=item Dynamic Loading Problems With GNU as and GNU ldIf you have problems with dynamic loading using gcc on SunOS orSolaris, and you are using GNU as and GNU ld, see the sectionL<"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 itemL<"GNU as and GNU ld">.=item dlopen: stub interception failedThe primary cause of the 'dlopen: stub interception failed' message isthat the LD_LIBRARY_PATH environment variable includes a directorywhich is a symlink to /usr/lib (such as /lib).  SeeL<"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 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.=item sh: ar: not foundThis is a message from your shell telling you that the command 'ar'was not found.  You need to check your PATH 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.=back=head1 MAKE TEST=head2 op/stat.t test 4op/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.=head1 PREBUILT BINARIES.You can pick up prebuilt binaries for Solaris fromL<http://www.sunfreeware.com/>, ActiveState L<http://www.activestate.com/>,and L<http://www.perl.com/> under the Binaries list at the top of the page.There are probably other sources as well.  Please note that these sitesare under the control of their respective owners, not the perl developers.=head1 RUNTIME ISSUES.=head2 Limits on Numbers of Open Files.The stdio(3C) manpage notes that only 255 files may be opened usingfopen(), and only file descriptors 0 through 255 can be used in astream.  Since perl calls open() and then fdopen(3C) with theresulting file descriptor, perl is limited to 255 simultaneous openfiles.=head1 SOLARIS-SPECIFIC MODULES.See the modules under the Solaris:: namespace on CPAN,L<http://www.cpan.org/modules/by-module/Solaris/>.=head1 SOLARIS-SPECIFIC PROBLEMS WITH MODULES.=head2 Proc::ProcessTableProc::ProcessTable does not compile on Solaris with perl5.6.0 and higherif you have LARGEFILES defined.  Since largefile support is thedefault in 5.6.0 and later, you have to take special steps to use thismodule.The 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 proc(4) for furtherdiscussion.A 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 OK 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.=head2 BSD::ResourceBSD::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.=head2 Net::SSLeayNet::SSLeay requires a /dev/urandom to be present. This device is notpart of Solaris. You can either get the package SUNWski (packaged withseveral Sun software products, for example the Sun WebServer, which ispart of the Solaris Server Intranet Extension, or the Sun DirectoryServices, part of Solaris for ISPs) or download the ANDIrand packagefrom L<http://www.cosy.sbg.ac.at/~andi/>. If you use SUNWski, make asymbolic link /dev/urandom pointing to /dev/random.It may be possible to use the Entropy Gathering Daemon (written inPerl!), available from L<http://www.lothar.com/tech/crypto/>.=head1 AUTHORThe original was written by Andy Dougherty F<doughera@lafayette.edu>drawing heavily on advice from Alan Burlison, Nick Ing-Simmons, Tim Bunce,and many other Solaris users over the years.Please report any errors, updates, or suggestions to F<perlbug@perl.org>.=head1 LAST MODIFIED$Id: README.solaris,v 1.4 2000/11/11 20:29:58 doughera Exp $

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -