Child pages
  • Mac OS X
Skip to end of metadata
Go to start of metadata

This page documents the requirements and special instructions for building Traffic Server on Mac OS X. 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.

To build Traffic Server, you will need to retrieve yourself a copy of PCRE, libtool, and automake. You can get it yourself from the source or elsewhere like macports or Homebrew.

Traffic Server only builds with clang on Mac OS X. We do not support building with gcc on this platform. You will need to install the latest version of Xcode.

Building Traffic Server with Homebrew

First, visit to install the Homebrew package manager.

Next, install the build dependencies:

$ brew install automake autoconf libtool pcre openssl

On certain versions of macOS / OS X and Xcode, you will also have to install libxml2:

$ brew install libxml2
$ brew link --force libxml2

After you have PCRE development libraries installed on your system, you should get the Traffic Server code with git.

$ git clone

Run autoreconf to generate the configure script:

$ cd trafficserver  # enter the new checkout directory
$ autoreconf -i      # generate the configure script

From the checkout directory, run `configure` to generate the Makefile files. You may need to specify the base path where the development files (headers and libraries) for PCRE are installed, e.g. if you installed pcre with MacPorts, you will need to specify the directory '/opt/local'. When building against Homebrew, specify the openssl library with --with-openssl=/usr/local/opt/openssl

$ ./configure

Now you can make and install:

$ make
$ sudo make install
  • Mac Ports - package retrieval and installation system.
  • Homebrew - package retrieval and installation system.
  • Xcode - if you want to use the latest version of GCC from Apple. Requires free registration to get to the download page.
  • PCRE - required software for building Traffic Server from the source.


  1. Anonymous

    The compilation fails on Snow Leopard, with a segmentation fault during "make"

    /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../lib -I/opt/local/include -D_LARGEFILE64_SOURCE=1 -D_COMPILE64BIT_SOURCE=1 -D_GNU_SOURCE -D_REENTRANT -Ddarwin -I/System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers -I/usr/local/Cellar/include -g -pipe -Wall -Werror -Wno-deprecated-declarations -O3 -feliminate-unused-debug-symbols -fno-strict-aliasing -Wno-invalid-offsetof -MT Diags.lo -MD -MP -MF .deps/Diags.Tpo -c -o Diags.lo
    libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../lib -I/opt/local/include -D_LARGEFILE64_SOURCE=1 -D_COMPILE64BIT_SOURCE=1 -D_GNU_SOURCE -D_REENTRANT -Ddarwin -I/System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers -I/usr/local/Cellar/include -g -pipe -Wall -Werror -Wno-deprecated-declarations -O3 -feliminate-unused-debug-symbols -fno-strict-aliasing -Wno-invalid-offsetof -MT Diags.lo -MD -MP -MF .deps/Diags.Tpo -c -fno-common -DPIC -o .libs/Diags.o internal compiler error: Segmentation fault: 11
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <URL:> for instructions.

    Unknown macro: {standard input}

    :1240:End-of-File not at end of a line

    :unknown:Partial line at end of file ignored

    Unknown macro: {standard input}

    :unknown:Undefined local symbol L_.str1

    :unknown:Undefined local symbol L_.str2

    Unknown macro: {standard input}

    :unknown:Undefined local symbol L_.str3

    :unknown:Undefined local symbol L_.str4

    Unknown macro: {standard input}

    :unknown:Undefined local symbol L_.str5

    :unknown:Undefined local symbol L_.str6

    Unknown macro: {standard input}

    :unknown:Undefined local symbol L_.str7

    :unknown:Undefined local symbol L_.str8

    Unknown macro: {standard input}

    :unknown:Undefined local symbol L_.str

    :unknown:Undefined local symbol L_.str9

    Unknown macro: {standard input}

    :unknown:Undefined local symbol L_.str10

    :unknown:Undefined local symbol L_.str11

    Unknown macro: {standard input}

    :unknown:Undefined local symbol L_.str12

    :unknown:Undefined local symbol L_.str13

    Unknown macro: {standard input}

    :unknown:Undefined local symbol L_.str14

    :unknown:Undefined local symbol L_.str15

    Unknown macro: {standard input}

    :unknown:Undefined local symbol L_.str16

    :unknown:Undefined local symbol L_.str17

    Unknown macro: {standard input}

    :unknown:Undefined local symbol L_.str18

    :unknown:Undefined local symbol L_.str19

    Unknown macro: {standard input}

    :unknown:Undefined local symbol L_.str20

    :unknown:Undefined local symbol L_.str21

    Unknown macro: {standard input}

    :unknown:Undefined local symbol LBB8_5
    make[3]: *** [Diags.lo] Error 1
    make[2]: *** [all] Error 2
    make[1]: *** [all-recursive] Error 1
    make: *** [all-recursive] Error 1

    1. Anonymous

      I am also getting a segmentation fault when compiling on snow leopard. Is there a fix for this? Based on internet search, I replaced CC with clang and clang++ and it almost solved teh problem. I had to add a copy constructor for MultiCacheHeader and it all compiled.

      1. Yes, you have to build with clang. Apple's version of GCC is not supported.

        Typically, we support the latest version of Mac OS X, but would be happy to accept patches to build on older versions.