Mac OS X Build Instructions =========================== The Easy Way: ------------- Atomic Labs has a tarball available from the "Third Party Libraries" page on our website that contains all of the required libraries to build Pion, with support for both 32-bit and 64-bit Intel and PowerPC architectures. To get started quickly, just download and uncompress this into your /usr/local/ directory, and you should be able to skip down to one of the last two steps! Installing ICU on OSX: ---------------------- Boost requires the ICU library for i18n support. You can download the source code for ICU from: http://site.icu-project.org/ After downloading it, just run: # tar xvfz icu4c--src.tgz # cd icu/source # ./runConfigureICU MacOSX # make all # make install As of version 4.2.1, it doesn't seem to be possible to build universal libraries of ICU (or at least we haven't figured it out yet), however you can build 64-bit binaries on OSX using an included patch file: # tar xvfz icu4c--src.tgz # cd icu # patch -p1 < /path/to/pion-source/common/build/icu-4.2.1-osx.patch # cd source # ./runConfigureICU MacOSX # make all # make install Note that 64-bit builds of Boost on OSX seem to be extremely buggy, so this is not recommended. Installing Boost on OSX: ------------------------ Please see the README.boost file for general instructions. The bjam command to build all Boost libraries (1.43 and earlier) for OSX is: # bjam -sHAVE_ICU=1 --toolset=darwin release threading=multi link=shared stage The bjam command to build all Boost libraries (1.44 and later) for OSX is: # bjam -sICU_PATH=/usr/local --toolset=darwin release threading=multi link=shared stage Installing zlib, bzlib & openssl: --------------------------------- Pion requires zlib, bzlib and openssl for compression and SSL/TLS encryption support, respectively. These libraries are normally pre-installed on OS X. If you do not have them already, you should be able to grab the latest source code tarballs from the "Third Party Libraries" page on our website, or from the following sites: http://www.zlib.net http://www.bzip.org http://www.openssl.org Installing log4cplus: --------------------- Note that the use of a logging framework is entirely optional, so you may skip this step if you like. We recommend that you use log4cplus for logging. Please visit the "Third Party Libraries" page on our website to obtain the source code tarball for log4cplus. Then, just run: # tar xvfj log4cplus-.tar.bz2 # cd log4cplus- # ./configure --enable-threads=yes # make all # make install For Universal binaries, use: # CXXFLAGS="-arch i386 -arch x86_64 -arch ppc -arch ppc64" ./configure \ --disable-dependency-tracking Installing libxml2: ------------------- The Pion Platform requires the libxml2 development library for manipulating configuration files, and other things. This library is not used by the Pion Network Library, so you may skip this step if you are only building the Network Library. The libxml2 library is normally pre-installed on OS X. If you do not have it already, you should be able to grab the latest source code tarball from the "Third Party Libraries" page on our website, or from the following site: http://www.xmlsoft.org Installing lxml: ---------------- Pion's pupgrade.py script requires that you have the lxml library installed. This can be installed with one easy step: # sudo easy_install lxml Installing YAJL: ---------------- YAJL ("Yet Another JSON Library") is required to build support for the JSONCodec plugin. You may skip this step if you do not want to build support for JSON. To build YAJL, you must first have CMake installed on your system. You can download the source tarball for CMake from the "Third Party Libraries" page on our website, or from the following site: http://cmake.org You can download the source code tarball for YAJL from the "Third Party Libraries" page on our website. After downloading it, just run: # tar xvfz yajl-.tgz # cd yajl- # ./configure # make Note: to build universal libraries, edit the CMakeLists.txt file before running "./configure" and change this line: SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -ansi") to this: SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -ansi -arch i386 -arch x86_64 -arch ppc -arch ppc64") To install YAJL, we recommend that you just move the build files in the "build/yajl-" subdirectory into /usr/local: # sudo mv build/yajl-/lib/* /usr/local/lib # sudo mv build/yajl-/include/yajl /usr/local/include Building and installing Pion: ----------------------------- Now you should be able to build and install Pion: # tar xvfz pion--.tar.gz # cd pion-- # ./configure [--with-arch=ppc64,x86_64] [--with-cpu=nocona] # make all # make install To build and run Pion's unit tests, run "make check" Building with XCode: -------------------- There is an XCode project included in the root directory of each project called "pion-.xcodeproj". The XCode project assumes that you have the following optional libraries installed: openssl, zlib and log4cxx. It also is configured to build a Universal binary with support for the i386 and ppc architectures. You must have built all the dependency libraries with support for both architectures for this to work properly. A tarball containing all of these built for both the 32-bit and 64-bit Intel and PowerPC architectures is available on the "Third Party Libraries" on our website. Alternatively, you can just modify the XCode project config to build only for your native architecture. To run the Pion server from within XCode, you first need to configure the executable's command arguments by right-clicking on "pion" under the "Executables" group in the left menu, and selecting "Get Info." Under the "Arguments" tab, add the following argument: "-c ../../platform/server/platform.xml" Next, set "pion" as the "Active Target" and click on the "Build and Go" button. Building "pion" will also build all of the service, codec, database and reactor plug-ins. To run PionWebServer from within XCode, you first need to configure the executable's command arguments by right-clicking on PionWebServer under the "Executables" group in the left menu, and selecting "Get Info." Under the "Arguments" tab, add the following argument: "-c ../../net/utils/services.conf" Next, set PionWebServer as the "Active Target" and click on the "Build and Go" button. Building PionWebServer will also build all of the service plug-ins.