This document briefly describes Perl under Mac OS X.
- curl -O http://www.cpan.org/src/perl-5.21.12.tar.gz
- tar -xzf perl-5.21.12.tar.gz
- cd perl-5.21.12
+ curl -O https://www.cpan.org/src/perl-5.31.6.tar.gz
+ tar -xzf perl-5.31.6.tar.gz
+ cd perl-5.31.6
./Configure -des -Dprefix=/usr/local/
make
make test
=head1 DESCRIPTION
-The latest Perl release (5.21.12 as of this writing) builds without changes
+The latest Perl release (5.31.6 as of this writing) builds without changes
under all versions of Mac OS X from 10.3 "Panther" onwards.
In order to build your own version of Perl you will need 'make',
First, export the path to the SDK into the build environment:
- export SDK=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
+ export SDK=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
Please make sure the SDK version (i.e. the numbers right before '.sdk')
matches your system's (in this case, Mac OS X 10.8 "Mountain Lion"), as it is
In addition to the compiler flags used to select the SDK, also add the flags
for creating a universal binary:
- ./Configure -Accflags="-arch i686 -arch ppc -nostdinc -B$SDK/usr/include/gcc \
- -B$SDK/usr/lib/gcc -isystem$SDK/usr/include \
- -F$SDK/System/Library/Frameworks" \
- -Aldflags="-arch i686 -arch ppc -Wl,-syslibroot,$SDK" \
- -de
+ ./Configure -Accflags="-arch i686 -arch ppc -nostdinc \
+ -B$SDK/usr/include/gcc \
+ -B$SDK/usr/lib/gcc -isystem$SDK/usr/include \
+ -F$SDK/System/Library/Frameworks" \
+ -Aldflags="-arch i686 -arch ppc -Wl,-syslibroot,$SDK" \
+ -de
Keep in mind that these compiler and linker settings will also be used when
building CPAN modules. For XS modules to be compiled as a universal binary, any
support. Similarly, downloads from Fink or Darwinports are unlikely to provide
64-bit support; the libraries must be rebuilt from source with the appropriate
compiler and linker flags. For further information, see Apple's
-I<64-Bit Transition Guide> at
-L<http://developer.apple.com/documentation/Darwin/Conceptual/64bitPorting/index.html>.
+I<64-Bit Transition Guide> at
+L<https://developer.apple.com/library/archive/documentation/Darwin/Conceptual/64bitPorting/transition/transition.html>.
=head2 libperl and Prebinding
An alternative is CamelBones, a framework that allows access to both
Foundation and AppKit classes and objects, so that full GUI applications
can be built in Perl. CamelBones can be found on SourceForge, at
-L<http://www.sourceforge.net/projects/camelbones/>.
+L<https://www.sourceforge.net/projects/camelbones/>.
=head1 Starting From Scratch
works much better with Perl 5.8.1 and later, in Perl 5.8.0 the
settings were not quite right.
-"Pacifist" from CharlesSoft (L<http://www.charlessoft.com/>) is a nice
+"Pacifist" from CharlesSoft (L<https://www.charlessoft.com/>) is a nice
way to extract the Perl binaries from the OS media, without having to
reinstall the entire OS.