...
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:
Code Block |
---|
$ brew install automake autoconf libtool pcre openssl
$ brew link --force openssl |
After you have PCRE development libraries installed on your system, you should get the Traffic Server code with git.
Code Block |
---|
|
$ git clone https://git-wip-us.apache.org/repos/asfgithub.com/apache/trafficserver.git
|
Run autoreconf to generate the configure script:
Code Block |
---|
|
$ cd traffic-trunk.svntrafficserver # enter the new checkout directory
$ autoreconf -f -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 macportsMacPorts, you will need to specify the directory '/opt/local':. No additional options are needed when building against Homebrew.
Code Block |
---|
|
$ ./configure --with-pcre=/opt/local CC=clang CXX=clang++
|
Now you can make and install:
Code Block |
---|
|
$ make
$ sudo make install
|
Home Brew prerequisites
As part of getting Brew running, you have already installed XCode. If not, go back and do so, and read the instructions to get running with Brew. Once you have it all setup, if you are building from an official Traffic Server release, all you need to install is the PCRE package:
Code Block |
---|
|
$ brew install pcre
|
If however you are installing from the git source code repository, in addition to PCRE you must also install the Gnu Auto-tools:
Code Block |
---|
|
$ brew install autoconf automake libtool openssl
|
Links
- 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.