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 http://brew.sh to install the Homebrew package manager.

Next, install the build dependencies:

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

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

Run autoreconf to 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

Now you can make and 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.

3 Comments

  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 Diags.cc
    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 Diags.cc -fno-common -DPIC -o .libs/Diags.o
    Diags.cc:547: internal compiler error: Segmentation fault: 11
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <URL:http://developer.apple.com/bugreporter> 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 diags.cc 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.