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

📄 perlos2.pod

📁 MSYS在windows下模拟了一个类unix的终端
💻 POD
📖 第 1 页 / 共 5 页
字号:
  find --version  sort --version). You need the latest version of F<pdksh> installed as F<sh.exe>.Check that you have B<BSD> libraries and headers installed, and - optionally - Berkeley DB headers and libraries, and crypt.Possible locations to get this from are  ftp://hobbes.nmsu.edu/os2/unix/  ftp://ftp.cdrom.com/pub/os2/unix/  ftp://ftp.cdrom.com/pub/os2/dev32/  ftp://ftp.cdrom.com/pub/os2/emx09c/It is reported that the following archives contain enough utils tobuild perl: F<gnufutil.zip>, F<gnusutil.zip>, F<gnututil.zip>, F<gnused.zip>,F<gnupatch.zip>, F<gnuawk.zip>, F<gnumake.zip>, F<bsddev.zip> andF<ksh527rt.zip> (or a later version).  Note that all these utilities areknown to be available from LEO:  ftp://ftp.leo.org/pub/comp/os/os2/leo/gnuIf you have I<exactly the same version of Perl> installed already,make sure that no copies or perl are currently running.  Later stepsof the build may fail since an older version of F<perl.dll> loaded intomemory may be found. Also make sure that you have F</tmp> directory on the current drive,and F<.> directory in your C<LIBPATH>. One may try to correct thelatter condition by  set BEGINLIBPATH .if you use something like F<CMD.EXE> or latest versions of F<4os2.exe>.Make sure your gcc is good for C<-Zomf> linking: run C<omflibs>script in F</emx/lib> directory.Check that you have link386 installed. It comes standard with OS/2,but may be not installed due to customization. If typing  link386shows you do not have it, do I<Selective install>, and choose C<Linkobject modules> in I<Optional system utilities/More>. If you get intolink386 prompts, press C<Ctrl-C> to exit.=head2 Getting perl sourceYou need to fetch the latest perl source (including developersreleases). With some probability it is located in   http://www.perl.com/CPAN/src/5.0  http://www.perl.com/CPAN/src/5.0/unsupportedIf not, you may need to dig in the indices to find it in the directoryof the current maintainer.Quick cycle of developers release may break the OS/2 build time totime, looking into   http://www.perl.com/CPAN/ports/os2/ilyaz/may indicate the latest release which was publicly released by themaintainer. Note that the release may include some additional patchesto apply to the current source of perl.Extract it like this  tar vzxf perl5.00409.tar.gzYou may see a message about errors while extracting F<Configure>. This isbecause there is a conflict with a similarly-named file F<configure>.Change to the directory of extraction.=head2 Application of the patchesYou need to apply the patches in F<./os2/diff.*> like this:  gnupatch -p0 < os2\diff.configureYou may also need to apply the patches supplied with the binarydistribution of perl.Note also that the F<db.lib> and F<db.a> from the EMX distributionare not suitable for multi-threaded compile (even single-threadedflavor of Perl uses multi-threaded C RTL, forcompatibility with XFree86-OS/2). Get a corrected one from  ftp://ftp.math.ohio-state.edu/pub/users/ilya/os2/db_mt.zip=head2 Hand-editingYou may look into the file F<./hints/os2.sh> and correct anythingwrong you find there. I do not expect it is needed anywhere.=head2 Making  sh Configure -des -D prefix=f:/perllibC<prefix> means: where to install the resulting perl library. Givingcorrect prefix you may avoid the need to specify C<PERLLIB_PREFIX>,see L<"PERLLIB_PREFIX">.I<Ignore the message about missing C<ln>, and about C<-c> option totr>. The latter is most probably already fixed, if you see it and can tracewhere the latter spurious warning comes from, please inform me.Now  makeAt some moment the built may die, reporting a I<version mismatch> orI<unable to run F<perl>>.  This means that you do not have F<.> inyour LIBPATH, so F<perl.exe> cannot find the needed F<perl67B2.dll> (treatthese hex digits as line noise).  After this is fixed the buildshould finish without a lot of fuss.=head2 TestingNow run  make testAll tests should succeed (with some of them skipped).Some tests may generate extra messages similar to=over 4=item A lot of C<bad free>in database tests related to Berkeley DB. I<This should be fixed already.>If it persists, you may disable this warnings, see L<"PERL_BADFREE">.=item Process terminated by SIGTERM/SIGINTThis is a standard message issued by OS/2 applications. *nixapplications die in silence. It is considered to be a feature. One caneasily disable this by appropriate sighandlers. However the test engine bleeds these message to screen in unexpectedmoments. Two messages of this kind I<should> be present duringtesting.=backTo get finer test reports, call  perl t/harnessThe report with F<io/pipe.t> failing may look like this:  Failed Test  Status Wstat Total Fail  Failed  List of failed  ------------------------------------------------------------  io/pipe.t                    12    1   8.33%  9  7 tests skipped, plus 56 subtests skipped.  Failed 1/195 test scripts, 99.49% okay. 1/6542 subtests failed, 99.98% okay.The reasons for most important skipped tests are:=over 8=item F<op/fs.t>=over 4=item 18Checks C<atime> and C<mtime> of C<stat()> - unfortunately, HPFSprovides only 2sec time granularity (for compatibility with FAT?).=item 25Checks C<truncate()> on a filehandle just opened for write - I do notknow why this should or should not work.=back=item F<op/stat.t>Checks C<stat()>. Tests:=over 4=item 4Checks C<atime> and C<mtime> of C<stat()> - unfortunately, HPFSprovides only 2sec time granularity (for compatibility with FAT?).=back=back=head2 Installing the built perlIf you haven't yet moved perl.dll onto LIBPATH, do it now.Run  make installIt would put the generated files into needed locations. Manually putF<perl.exe>, F<perl__.exe> and F<perl___.exe> to a location on yourPATH, F<perl.dll> to a location on your LIBPATH.Run  make installcmd INSTALLCMDDIR=d:/ir/on/pathto convert perl utilities to F<.cmd> files and put them onPATH. You need to put F<.EXE>-utilities on path manually. They areinstalled in C<$prefix/bin>, here C<$prefix> is what you gave toF<Configure>, see L<Making>.=head2 C<a.out>-style buildProceed as above, but make F<perl_.exe> (see L<"perl_.exe">) by  make perl_test and install by  make aout_test  make aout_installManually put F<perl_.exe> to a location on your PATH.B<Note.> The build process for C<perl_> I<does not know> about all thedependencies, so you should make sure that anything is up-to-date,say, by doing  make perl_dllfirst.=head1 Build FAQ=head2 Some C</> became C<\> in pdksh.You have a very old pdksh. See L<Prerequisites>.=head2 C<'errno'> - unresolved externalYou do not have MT-safe F<db.lib>. See L<Prerequisites>.=head2 Problems with tr or sedreported with very old version of tr and sed.=head2 Some problem (forget which ;-)You have an older version of F<perl.dll> on your LIBPATH, whichbroke the build of extensions.=head2 Library ... not foundYou did not run C<omflibs>. See L<Prerequisites>.=head2 Segfault in makeYou use an old version of GNU make. See L<Prerequisites>.=head2 op/sprintf test failureThis can result from a bug in emx sprintf which was fixed in 0.9d fix 03.=head1 Specific (mis)features of OS/2 port=head2 C<setpriority>, C<getpriority>Note that these functions are compatible with *nix, not with the olderports of '94 - 95. The priorities are absolute, go from 32 to -95,lower is quicker. 0 is the default priority.B<WARNING>.  Calling C<getpriority> on a non-existing process can lock thesystem before Warp3 fixpak22.=head2 C<system()>Multi-argument form of C<system()> allows an additional numericargument. The meaning of this argument is described inL<OS2::Process>.When finding a program to run, Perl first asks the OS to look for executableson C<PATH>.  If not found, it looks for a script with possible extensions added in this order: no extension, F<.cmd>, F<.btm>, F<.bat>, F<.pl>.  If found, Perl checks the start of the file for magicstrings C<"#!"> and C<"extproc ">.  If found, Perl uses the rest of thefirst line as the beginning of the command line to run this script.  Theonly mangling done to the first line is extraction of arguments (currentlyup to 3), and ignoring of the path-part of the "interpreter" name if it can'tbe found using the full path.E.g., C<system 'foo', 'bar', 'baz'> may lead Perl to findingF<C:/emx/bin/foo.cmd> with the first line being extproc /bin/bash    -x   -cIf F</bin/bash> is not found, and appending of executable extensions toF</bin/bash> does not help either, then Perl looks for an executable F<bash> onC<PATH>.  If found in F<C:/emx.add/bin/bash.exe>, then the above system() istranslated to  system qw(C:/emx.add/bin/bash.exe -x -c C:/emx/bin/foo.cmd bar baz)One additional translation is performed: instead of F</bin/sh> Perl usesthe hardwired-or-customized shell (see C<L<"PERL_SH_DIR">>).The above search for "interpreter" is recursive: if F<bash> executable is notfound, but F<bash.btm> is found, Perl will investigate its first line etc.The only hardwired limit on the recursion depth is implicit: there is a limit4 on the number of additional arguments inserted before the actual argumentsgiven to system().  In particular, if no additional arguments are specifiedon the "magic" first lines, then the limit on the depth is 4.If Perl finds that the found executable is of different type than thecurrent session, it will start the new process in a separate session ofnecessary type.  Call via C<OS2::Process> to disable this magic.=head2 C<extproc> on the first lineIf the first chars of a Perl script are C<"extproc ">, this line is treatedas C<#!>-line, thus all the switches on this line are processed (twiceif script was started via cmd.exe).  See L<perlrun/DESCRIPTION>.=head2 Additional modules:L<OS2::Process>, L<OS2::DLL>, L<OS2::REXX>, L<OS2::PrfDB>, L<OS2::ExtAttr>. Thesemodules provide access to additional numeric argument for C<system>and to the information about the running process,to DLLs having functions with REXX signature and to the REXX runtime, toOS/2 databases in the F<.INI> format, and to Extended Attributes.Two additional extensions by Andreas Kaiser, C<OS2::UPM>, andC<OS2::FTP>, are included into C<ILYAZ> directory, mirrored on CPAN.=head2 Prebuilt methods:=over 4=item C<File::Copy::syscopy>used by C<File::Copy::copy>, see L<File::Copy>.=item C<DynaLoader::mod2fname>used by C<DynaLoader> for DLL name mangling.=item  C<Cwd::current_drive()>Self explanatory.=item  C<Cwd::sys_chdir(name)>leaves drive as it is.=item  C<Cwd::change_drive(name)>chanes the "current" drive.=item  C<Cwd::sys_is_absolute(name)>means has drive letter and is_rooted.=item  C<Cwd::sys_is_rooted(name)>means has leading C<[/\\]> (maybe after a drive-letter:).=item  C<Cwd::sys_is_relative(name)>means changes with current dir.=item  C<Cwd::sys_cwd(name)>Interface to cwd from EMX. Used by C<Cwd::cwd>.=item  C<Cwd::sys_abspath(name, dir)>Really really odious function to implement. Returns absolute name offile which would have C<name> if CWD were C<dir>.  C<Dir> defaults to thecurrent dir.=item  C<Cwd::extLibpath([type])>Get current value of extended library search path. If C<type> ispresent and I<true>, works with END_LIBPATH, otherwise with

⌨️ 快捷键说明

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