Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page documents the requirements and special instructions for building Traffic Server on Mac OS X platforms. Currently, minimum version required to build a proper Traffic Server binary is Snow Leopard (Version 10.6.x). Please let us know if you had to install additional packages on your installations.

Leopard (Version 10.5)

To build Traffic Server, you will need gcc 4.2+, pcre, and either sqlite3 or berkeley db. Your Mac OS X system may not have all of the required software installed so you will have to to retrieve yourself a copy of PCRE. You can get it yourself from the source or elsewhere like macports.

After you have the required softwarePCRE development libraries installed on your system, you should get the Traffic Server code with git or subversion.

Code Block
langnone
$ svn checkout \
  http://svn.apache.org/repos/asf/trafficserver/traffic/trunk \
  traffic-trunk.svn  # get the latest code from the ASF SVN repository

Run autoreconf to generate the configure script:

Code Block
langnone
$ cd traffic-trunk.svn  # enter the new checkout directory
$ autoreconf -f -i      # generate the configure script

Make yourself a build directory so you can do a VPATH build.

Code Block
langnone
$ mkdir release  # directory where build artifacts will reside

From the build directory, run configure `configure` to generate the Makefile files. You will likely need to override the C and C++ compiler to use since they may be a non-standard filename. Plus, you may need to specify the base path where the development files (headers and libraries) for sqlite3 and pcre PCRE are installed, e.g. if you installed pcre with macports, you will need to specify the directory '/opt/local':

Code Block
langnone
$ cd release
$ ../configure --prefix=/opt/ats \
               --with-sqlite3=/path/to/base/dir/of/sqlite-devel \
                # enter the directory where build artifacts will reside
$ ../configure --prefix=/opt/ats --with-pcre=/path/to/base/dir/of/pcre-devel \
               CC=/usr/bin/gcc-4.2 \
               CXX=/usr/bin/g++-4.2opt/local  # generate the Makefile files

Now you can make and install:

...

  • Mac Ports - package retrieval and installation system. But as of this writing, there exists a bug that prevents install of apple-gcc42 on Mac OS X 10.5.
  • Xcode - includes if you want to use the latest version of gcc 4.2 compiled by Apple for your MacGCC from Apple. Requires free registration to get to the download page.
  • PCRE - if you want to get the required software for building Traffic Server from the source.SQLite3 Download Page - if you want to get the required software for building Traffic Server from the source. It is recommended to get the amalgamation package.