📄 perlmacosx.1
字号:
\& \-B$SDK/usr/lib/gcc \-isystem$SDK/usr/include \e\& \-F$SDK/System/Library/Frameworks" \e\& \-Aldflags="\-arch i686 \-arch ppc \-Wl,\-syslibroot,$SDK" \e\& \-de.Ve.PPKeep in mind that these compiler and linker settings will also be used whenbuilding \s-1CPAN\s0 modules. For \s-1XS\s0 modules to be compiled as a universal binary, anylibraries it links to must also be universal binaries. The system libraries thatApple includes with the 10.4u \s-1SDK\s0 are all universal, but user-installed librariesmay need to be re-installed as universal binaries..Sh "64\-bit \s-1PPC\s0 support".IX Subsection "64-bit PPC support"Follow the instructions in \fI\s-1INSTALL\s0\fR to build perl with support for 64\-bit integers (\f(CW\*(C`use64bitint\*(C'\fR) or both 64\-bit integers and 64\-bit addressing(\f(CW\*(C`use64bitall\*(C'\fR). In the latter case, the resulting binary will run onlyon G5\-based hosts..PPSupport for 64\-bit addressing is experimental: some aspects of Perl may beomitted or buggy. Note the messages output by \fIConfigure\fR for further information. Please use \f(CW\*(C`perlbug\*(C'\fR to submit a problem report in theevent that you encounter difficulties..PPWhen building 64\-bit modules, it is your responsiblity to ensure that linkedexternal libraries and frameworks provide 64\-bit support: if they do not,module building may appear to succeed, but attempts to use the module willresult in run-time dynamic linking errors, and subsequent test failures.You can use \f(CW\*(C`file\*(C'\fR to discover the architectures supported by a library:.PP.Vb 4\& $ file libgdbm.3.0.0.dylib \& libgdbm.3.0.0.dylib: Mach\-O fat file with 2 architectures\& libgdbm.3.0.0.dylib (for architecture ppc): Mach\-O dynamically linked shared library ppc\& libgdbm.3.0.0.dylib (for architecture ppc64): Mach\-O 64\-bit dynamically linked shared library ppc64.Ve.PPNote that this issue precludes the building of many Macintosh-specific \s-1CPAN\s0modules (\f(CW\*(C`Mac::*\*(C'\fR), as the required Apple frameworks do not provide \s-1PPC64\s0support. Similarly, downloads from Fink or Darwinports are unlikely to provide64\-bit support; the libraries must be rebuilt from source with the appropriatecompiler and linker flags. For further information, see Apple's\&\fI64\-Bit Transition Guide\fR at <http://developer.apple.com/documentation/Darwin/Conceptual/64bitPorting/index.html>..Sh "libperl and Prebinding".IX Subsection "libperl and Prebinding"Mac \s-1OS\s0 X ships with a dynamically-loaded libperl, but the default forthis release is to compile a static libperl. The reason for this ispre-binding. Dynamic libraries can be pre-bound to a specific address inmemory in order to decrease load time. To do this, one needs to be awareof the location and size of all previously-loaded libraries. Applecollects this information as part of their overall \s-1OS\s0 build process, andthus has easy access to it when building Perl, but ordinary users wouldneed to go to a great deal of effort to obtain the information neededfor pre-binding..PPYou can override the default and build a shared libperl if you wish(Configure\ ...\ \-Duseshrlib), but the load time on pre\-10.4 \s-1OS\s0releases will be greater than either the static library, or Apple'spre-bound dynamic library..PPWith 10.4 \*(L"Tiger\*(R" and newer, Apple has all but eliminated the performancepenalty for non-prebound libraries..Sh "Updating Apple's Perl".IX Subsection "Updating Apple's Perl"In a word \- don't, at least without a *very* good reason. Your scriptscan just as easily begin with \*(L"#!/usr/local/bin/perl\*(R" as with\&\*(L"#!/usr/bin/perl\*(R". Scripts supplied by Apple and other third parties aspart of installation packages and such have generally only been testedwith the /usr/bin/perl that's installed by Apple..PPIf you find that you do need to update the system Perl, one issue worthkeeping in mind is the question of static vs. dynamic libraries. If youupgrade using the default static libperl, you will find that the dynamiclibperl supplied by Apple will not be deleted. If both libraries arepresent when an application that links against libperl is built, ld willlink against the dynamic library by default. So, if you need to replaceApple's dynamic libperl with a static libperl, you need to be sure todelete the older dynamic library after you've installed the update..Sh "Known problems".IX Subsection "Known problems"If you have installed extra libraries such as \s-1GDBM\s0 through Fink(in other words, you have libraries under \fI/sw/lib\fR), or libdlcompatto \fI/usr/local/lib\fR, you may need to be extra careful when runningConfigure to not to confuse Configure and Perl about which librariesto use. Being confused will show up for example as \*(L"dyld\*(R" errors aboutsymbol problems, for example during \*(L"make test\*(R". The safest bet is to runConfigure as.PP.Vb 1\& Configure ... \-Uloclibpth \-Dlibpth=/usr/lib.Ve.PPto make Configure look only into the system libraries. If you have someextra library directories that you really want to use (such as newerBerkeley \s-1DB\s0 libraries in pre-Panther systems), add those to the libpth:.PP.Vb 1\& Configure ... \-Uloclibpth \-Dlibpth=\*(Aq/usr/lib /opt/lib\*(Aq.Ve.PPThe default of building Perl statically may cause problems with complexapplications like Tk: in that case consider building shared Perl.PP.Vb 1\& Configure ... \-Duseshrplib.Ve.PPbut remember that there's a startup cost to pay in that case (see above\&\*(L"libperl and Prebinding\*(R")..PPStarting with Tiger (Mac \s-1OS\s0 X 10.4), Apple shipped broken locale files forthe eu_ES locale (Basque-Spain). In previous releases of Perl, this resulted infailures in the \f(CW\*(C`lib/locale\*(C'\fR test. These failures have been supressedin the current release of Perl by making the test ignore the broken locale.If you need to use the eu_ES locale, you should contact Apple support..Sh "MacPerl".IX Subsection "MacPerl"Quite a bit has been written about MacPerl, the Perl distribution for\&\*(L"Classic MacOS\*(R" \- that is, versions 9 and earlier of MacOS. Because itruns in environment that's very different from that of \s-1UNIX\s0, many thingsare done differently in MacPerl. Modules are installed using a differentprocedure, Perl itself is built differently, path names are different,etc..PPFrom the perspective of a Perl programmer, Mac \s-1OS\s0 X is more like atraditional \s-1UNIX\s0 than Classic MacOS. If you find documentation thatrefers to a special procedure that's needed for MacOS that's drasticallydifferent from the instructions provided for \s-1UNIX\s0, the MacOSinstructions are quite often intended for MacPerl on Classic MacOS. Inthat case, the correct procedure on Mac \s-1OS\s0 X is usually to follow the\&\s-1UNIX\s0 instructions, rather than the MacPerl instructions..Sh "Carbon".IX Subsection "Carbon"MacPerl ships with a number of modules that are used to access theclassic MacOS toolbox. Many of these modules have been updated to useMac \s-1OS\s0 X's newer \*(L"Carbon\*(R" toolbox, and are available from \s-1CPAN\s0 in the\&\*(L"Mac::Carbon\*(R" module..Sh "Cocoa".IX Subsection "Cocoa"There are two ways to use Cocoa from Perl. Apple's PerlObjCBridgemodule, included with Mac \s-1OS\s0 X, can be used by standalone scripts toaccess Foundation (i.e. non-GUI) classes and objects..PPAn alternative is CamelBones, a framework that allows access to bothFoundation and AppKit classes and objects, so that full \s-1GUI\s0 applicationscan be built in Perl. CamelBones can be found on SourceForge, at<http://www.sourceforge.net/projects/camelbones/>..SH "Starting From Scratch".IX Header "Starting From Scratch"Unfortunately it is not that difficult somehow manage to break one'sMac \s-1OS\s0 X Perl rather severely. If all else fails and you want toreally, \fB\s-1REALLY\s0\fR, start from scratch and remove even your Apple Perlinstallation (which has become corrupted somehow), the followinginstructions should do it. \fBPlease think twice before followingthese instructions: they are much like conducting brain surgery toyourself. Without anesthesia.\fR We will \fBnot\fR come to fix your systemif you do this..PPFirst, get rid of the libperl.dylib:.PP.Vb 2\& # cd /System/Library/Perl/darwin/CORE\& # rm libperl.dylib.Ve.PPThen delete every .bundle file found anywhere in the folders:.PP.Vb 2\& /System/Library/Perl\& /Library/Perl.Ve.PPYou can find them for example by.PP.Vb 1\& # find /System/Library/Perl /Library/Perl \-name \*(Aq*.bundle\*(Aq \-print.Ve.PPAfter this you can either copy Perl from your operating system media(you will need at least the /System/Library/Perl and /usr/bin/perl),or rebuild Perl from the source code with \f(CW\*(C`Configure \-Dprefix=/usr\&\-Dusershrplib\*(C'\fR \s-1NOTE:\s0 the \f(CW\*(C`\-Dprefix=/usr\*(C'\fR to replace the system Perlworks much better with Perl 5.8.1 and later, in Perl 5.8.0 thesettings were not quite right..PP\&\*(L"Pacifist\*(R" from CharlesSoft (<http://www.charlessoft.com/>) is a niceway to extract the Perl binaries from the \s-1OS\s0 media, without having toreinstall the entire \s-1OS\s0..SH "AUTHOR".IX Header "AUTHOR"This \s-1README\s0 was written by Sherm Pendley <sherm@dot\-app.org>,and subsequently updated by Dominic Dunlop <domo@computer.org>.The \*(L"Starting From Scratch\*(R" recipe was contributed by John Montbriand<montbriand@apple.com>..SH "DATE".IX Header "DATE"Last modified 2006\-02\-24.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -