(The same build procedures also apply to MacPerl 5.8, currently in development. The
latest source is available the same place as the 5.6 source.)
All the software required to build MacPerl is available for free.
To build MacPerl, you will need a Mac and plenty of RAM. The build goes
fine with a PowerBook G3/400 with 256MB, and on a iBook 333 with 128MB RAM.
You will also need a working knowledge of Mac OS and MPW,
the Macintosh Programmer's Workshop. If you don't know MPW,
you can mostly pick it up along the way if you have any familiarity
with command lines.
For now, the x2p translators cannot be built
with an SC/MrC-only build, and there is no CFM68K support.
If you have already built MacPerl 5.6.x before, you can probably
just download the perl and MacPerl source kits and take it from there.
You should upgrade GUSI if it has changed since your last build.
Note: if you don't already have it, you will need to
upgrade your db library to
and your XL to
for MacPerl 5.6.1r2 (or re-fetch all of the
Some version numbers are noted. These are the minimum
recommended versions for building with.
is the recommended way to unpack the files below. It should
handle the .sit, .tar.gz, and any other files necessary for
this build. However, you should consider selecting
the "Convert text files to Macintosh format ... When a file is
known to contain text" option, so the STLport archive
will be properly unpacked.
a collection of freely available libraries and
tools for building MacPerl. It includes dmake,
patch, sfio, XL, AEGizmos, MoreFiles, and
Internet Config. Each of these packages is also
However, there are some aliases in the main distribution
set up especially for the build, so if you get the
individual packages you might have some broken paths.
(GUSI_222 or later; get the Pro5 libs in addition if using CodeWarrior
the complete installation from Apple (I got the single image of
CodeWarrior compilers for MPW (Pro 5 recommended; MWC68K 2.3.2 build 79, MWCPPC 2.3.2 build 75)
or of the MPW C/C++ compilers
(SC 8.8.4f1, MrC 4.1.0f1c1)
Unpack the macperl_build_libs.sit archive, which will create
a folder called "macperl_src". Put it in a location such
that the path to the directory has no whitespace or odd
characters in it. So "HD:macperl_src:" is fine (and is
what I will be using for the directions below), but
"Macintosh HD:macperl_src:" is not. Yes, you may need to
change your hard drive's name. Sorry. :-)
This will be your main build folder.
Unpack and install MPW. The easiest way to do this is to get
the single MPW-GM image from Apple's site, mount the image,
and drag the folder in the image to your drive. It can
be anywhere on your system, but you may wish to keep it
in "HD:macperl_src:" for convenience.
Copy the dmake tool, and the startup.mk file from
the dmake distribution, and the patch tool from the gPatch
distribution, to the MPW Tools folder.
Copy the BuildProgram and BuildCommands scripts from
the dmake folder to the MPW Scripts folder,
overwriting the existing scripts of the same name
(backup the old ones if you want to).
Unpack the GUSI distribution. If using CodeWarrior Pro 5,
also unpack the Pro5 archive, and replace the existing GUSI
libraries with the ones in the Pro5 distribution. If using SC/MrC,
unpack the STLport distribution into the same location as where
the GUSI distribution is unpacked, so each folder is
within the same enclosing folder. They can
be anywhere on your system, but you may wish to keep them
in "HD:macperl_src:" for convenience.
Change inttypes.h in GUSI to #define __cinttypes__ if
you are using Metrowerks (#ifdef __MWERKS__). Remove
the #ifdef __MWERKS__/#include <stdint.h>/#else/#endif
included in GUSI 2.2.1.
Give the MPW Shell application plenty of RAM (I
gave it 30MB) and make sure you have plenty of extra RAM
while the app is running (another 30MB might be sufficient, though
you might need 80MB free or so just to compile toke.c).
Then run the application. If you wish, create a new document to
Change directory (using the "directory" command) in MPW to the
GUSI directory, and run the GUSI_Install.MPW script.
If using STLport (SC/MrC builds), also run the
STLport_Install.MPW script here.
Change directory to the "HD:macperl_src:Sfio_04Aug99:", and execute the
If using the Metrowerks compilers, execute the
If not already installed, install MacPerl, and the perl MPW tool.
The main MacPerl distribution must be installed for
the perl MPW tool to have access to the Perl library.
To install the perl MPW tool, see the documentation that
comes with it.
Unpack the MacPerl source kit. Put the "macperl" and "perl"
folders inside "HD:macperl_src:".
Open "HD:macperl_src:perl:macos:MacPerlConfig.mk" and
change the preferences there for the compilers you will
be using. (CodeWarrior is 68K/PPC, Apple is SC/MrC.)
You MUST use BOTH 68K and PPC, or SC and MrC. Do not
try to build with only one compiler; pick one pair,
or both pairs.
Quit and restart MPW Shell, so the startup files will
be executed, or execute the MPW startup files
Change directory in MPW to "HD:macperl_src:perl:macos:" and
execute buildprogram all. This could take up
to an hour, and will build all of the MPW tools
and perl modules for the compilers you chose.
Change directory in MPW to "HD:macperl_src:macperl:" and
execute buildprogram all. This will build
the MacPerl application and supporting files.
Do a happy dance. You're done. Note that there are
plenty of bugs, so some things will not work. Set
your library path to "HD:macperl_src:perl:lib:" and
you should have access to the standard perl
and MacPerl library. Note that the standard perl
library is currently only installed as static libraries,
while the MacPerl modules are installed as dynamic
libraries (for PPC/MrC only).
Feel free to check out the source from CVS. All of the source for MacPerl,
and for this web site, is available there. I recommend
maccvs, which includes
an MPW tool and a GUI application. You will log in anonymously
to check out the source. The host is cvs.macperl.org,
the cvsroot is /cvsroot/macperl, and the CVS modules are
"macperl", "perl", and "docs" (for the web site). See the
page for more information. You can also
browse the repository
via the web, and download the
CVS tarball (updated nightly).
The source for MacPerl is also available on the main perl repository in
the maint-5.6/macperl branch for 5.6, maint-5.8/macperl
for 5.8, and macperl for 5.9/5.10.