Difference between revisions of "Building third party libraries for the COLLADA DOM"

From COLLADA Public Wiki
Jump to navigation Jump to search
m (wrong path in PS3 build instructions)
 
(14 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
The [[COLLADA DOM]] uses several third-party libraries. This document explains how to rebuild these libraries for each of the supported platforms. This is intended more for the COLLADA DOM maintainers than DOM users. Because all the third party libraries necessary to build the DOM on a particular platform are provided in the external-libs folder, most users shouldn't need to rebuild these libraries.
 
The [[COLLADA DOM]] uses several third-party libraries. This document explains how to rebuild these libraries for each of the supported platforms. This is intended more for the COLLADA DOM maintainers than DOM users. Because all the third party libraries necessary to build the DOM on a particular platform are provided in the external-libs folder, most users shouldn't need to rebuild these libraries.
  
====Release vs. Debug====
+
==Notes==
It's not expected that you'll debug the third party libs via the DOM, so the DOM only provides release builds of the third party libs. It's expected that you'll link both the release and debug versions of your app against the release version of these libs.
+
===Release vs. Debug===
 +
It's not expected that you'll debug the third-party libs via the DOM, so the DOM provides release builds of only the third party libs. It's expected that you'll link both the release and debug versions of your application against the release version of these libs.
  
However in some cases Visual Studio has problems linking a debug version of an app against a release version of a library (in some cases it works fine). When Visual Studio doesn't like linking the release version of one of these libs into the debug version of an app, we also provide a debug version of the lib. Currently this is necessary for PCRE and Boost filesystem. When we need to provide a debug lib we strip the debug info from the build to reduce download size.
+
However, in some cases, Visual Studio has problems linking a debug version of an application against a release version of a library (in some cases it works fine). When Visual Studio doesn't like linking the release version of one of these libs into the debug version of an application, we also provide a debug version of the lib. Currently this is necessary for PCRE and Boost filesystem. When we need to provide a debug lib, we strip the debug info from the build to reduce download size.
  
If you actually need to debug into one of the third party libs for some reason you'll need to provide your own debug build and rebuild the DOM to link against it.
+
If you actually need to debug into one of the third-party libs for some reason, you'll need to provide your own debug build and rebuild the DOM to link against it.
  
====PS3 host system====
+
===PS3 host system===
The instructions for building PS3 libs assumes that you're using Linux as the host system. They should still work properly if you're using Windows as the host system, but that hasn't been tested.
+
The instructions for building PS3 libs should work with either Linux or Windows as the host system.
  
 
==Libxml==
 
==Libxml==
===Windows===
+
===Visual Studio===
====Why do our own build of libxml?====
+
Download the [http://xmlsoft.org/downloads.html libxml source]. We're currently using version [ftp://xmlsoft.org/libxml2/libxml2-2.6.32.tar.gz 2.6.32]. We also build with zlib support, so you'll need to download that, too. We don't need the source, just the headers and libs, and Igor Zlatkovic provides the [http://www.zlatkovic.com/pub/libxml/zlib-1.2.3.win32.zip appropriate files] for Windows.
On Windows, we maintain a custom build of libxml to avoid dependency on iconv, which is licensed under the LGPL. Linking against iconv statically isn't an option, since any application would then be covered by the LGPL. Linking dynamically is fine, and that's what Igor Zlatkovic does in his prebuilt Windows libxml binaries, which we've used in the past. This means that iconv.dll has to be in the users's PATH though, or in the same directory as every executable that wants to use libxml. This is cumbersome, and we don't even need iconv, so we do our own build of libxml without it on Windows.
 
  
====Get the source files====
+
When built with Visual Studio, libxml tends to be forward compatible with later versions of Visual Studio, so, for maximal compatibility, we build with VS 2003, which is the oldest version of Visual Studio that we care about. Libxml doesn't use .vcproj and .sln files; it's built from the command line. Open a command prompt and enable usage of VS2003 from the command line by running
First, download the [http://xmlsoft.org/downloads.html libxml source]. We're currently using version [ftp://xmlsoft.org/libxml2/libxml2-2.6.29.tar.gz 2.6.29], which was released June 12th 2007. We also build with zlib support, so you'll need to download that too. We don't need the source, just the headers and libs, and Igor Zlatkovic provides the [http://www.zlatkovic.com/pub/libxml/zlib-1.2.3.win32.zip appropriate files] for Windows.
 
 
 
====Pick a compiler====
 
Next, you need to decide which compiler to use to build the library. Typically you'll use some version of Visual Studio. Fortunately, a libxml library file built with VS 2003 also works with VS 2005, and hopefully future versions of VS also. Since we support VS 2003 and up in the DOM, we should build libxml with VS 2003.
 
 
 
====Build====
 
Libxml doesn't use .vcproj and .sln files; it's built from the command line. Open a command prompt, and then enable usage of VS2003 from the command line by running
 
  
 
  "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\vcvars32.bat"
 
  "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\vcvars32.bat"
Line 29: Line 22:
 
Now navigate to the win32 folder in libxml. Run "cscript configure.js help" to get a listing of all the build options. For our build, we want to disable iconv and enable zlib. Enabling zlib support in libxml allows the DOM to transparently load zlib or gzip compressed files. Execute these commands:
 
Now navigate to the win32 folder in libxml. Run "cscript configure.js help" to get a listing of all the build options. For our build, we want to disable iconv and enable zlib. Enabling zlib support in libxml allows the DOM to transparently load zlib or gzip compressed files. Execute these commands:
  
  cscript configure.js iconv=no zlib=yes include=c:\misc\zlib-1.2.3\include lib=c:\misc\zlib-1.2.3\lib prefix=c:\misc\libxmlBuildOutput
+
  cscript configure.js iconv=no zlib=yes include=c:/zlib-1.2.3.win32/include lib=c:/zlib-1.2.3.win32/lib
 
  nmake /f Makefile.msvc
 
  nmake /f Makefile.msvc
nmake /f Makefile.msvc install
 
  
The "include" and "lib" options tell libxml where to find third-party libraries, specifically zlib in our case. Adjust the paths to point to wherever you installed zlib. Once you run those commands, you'll have both static lib and DLL versions of libxml in c:\misc\libxmlBuildOutput. Adjust the "prefix" option to control where libxml installs its files.
+
The "include" and "lib" options tell libxml where to find third-party libraries, specifically zlib in our case. Adjust the paths to point to wherever you installed zlib. Once you run those commands, you'll have both static lib and DLL versions of libxml in <libxml>/win32/bin.msvc.
  
 
===Linux and Mac===
 
===Linux and Mac===
 
On Linux and Mac, we just use the stock libxml that comes with the system, so we don't need to worry about building it ourselves.
 
On Linux and Mac, we just use the stock libxml that comes with the system, so we don't need to worry about building it ourselves.
 +
 +
===MinGW===
 +
First we need to build zlib. Download the [http://www.zlib.net/zlib123.zip zlib 1.2.3 source], then open a shell and run the following commands.
 +
cd <zlib>
 +
./configure && make
 +
make install prefix=<zlib>/install
 +
Now download [ftp://xmlsoft.org/libxml2/libxml2-2.6.32.tar.gz libxml 2.6.32] and run these commands.
 +
cd <libxml>
 +
./configure --with-zlib=c:/zlib/install --without-libiconv --disable-shared --disable-dependency-tracking
 +
strip -g <libxml>.libs/libxml2.a
 +
 +
The strip command removes the debug info from the library. The output is <libxml>/.libs/libxml2.a
  
 
===PS3===
 
===PS3===
On PS3 we use TinyXml for XML parsing instead of libxml. It's possible to get libxml building on PS3, but we don't need it for now.
+
On PS3, we use TinyXml for XML parsing instead of libxml. It's possible to get libxml building on PS3, but we don't need it for now.
  
 
==TinyXml==
 
==TinyXml==
 
The DOM has been tested with TinyXml version [http://downloads.sourceforge.net/tinyxml/tinyxml_2_5_3.tar.gz?use_mirror=easynews 2.5.3], released on May 6th 2007. The only platform that actually ''requires'' TinyXml usage is the PS3.
 
The DOM has been tested with TinyXml version [http://downloads.sourceforge.net/tinyxml/tinyxml_2_5_3.tar.gz?use_mirror=easynews 2.5.3], released on May 6th 2007. The only platform that actually ''requires'' TinyXml usage is the PS3.
  
In the DOM TinyXml plugin we don't use any of the STL features of TinyXml, so you don't need to include STL support in the TinyXml build.
+
In the DOM TinyXml plug-in, we don't use any of the STL features of TinyXml, so you don't need to include STL support in the TinyXml build.
  
===Windows===
+
===Visual Studio===
Download TinyXml. It comes with Visual Studio .sln files for building.
+
Download TinyXml. It comes with Visual Studio .sln files for building. Make sure to set the runtime library to multithreaded DLL in the release build and multithreaded debug DLL in the debug build.
  
===Linux===
+
===Linux, MinGW===
 
Download TinyXml and copy the makefile from <dom-path>/external-libs/tinyxml/build to the TinyXml folder you downloaded. Then open a shell and go to the TinyXml path and run "make". The output lib file is linux/libtinyxml.a.
 
Download TinyXml and copy the makefile from <dom-path>/external-libs/tinyxml/build to the TinyXml folder you downloaded. Then open a shell and go to the TinyXml path and run "make". The output lib file is linux/libtinyxml.a.
  
 
===Mac===
 
===Mac===
The makefile for Linux and PS3 could be trivially adapted to build a Mac universal binary lib, but that hasn't been necessary, so currently the TinyXml DOM plugin isn't supported on Mac.
+
The makefile for Linux and PS3 could be trivially adapted to build a Mac universal binary lib, but that hasn't been necessary, so currently the TinyXml DOM plug-in isn't supported on Mac.
  
 
===PS3===
 
===PS3===
Line 59: Line 63:
  
 
==PCRE==
 
==PCRE==
The DOM has been tested against PCRE [ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.4.tar.gz version 7.4]. All platforms require PCRE.
+
The DOM uses [ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.6.tar.gz PCRE 7.6]. All platforms require PCRE.
  
===Windows===
+
===Visual Studio===
PCRE comes with [http://www.cmake.org/HTML/Index.html CMake] files so you can generate the appropriate build files for Visual Studio. You need to build separate libs for each supported version of Visual Studio, as they're not compatible. Also, debug builds are needed for PCRE. Don't forget to disable debug info in the debug project settings.
+
PCRE comes with [http://www.cmake.org/HTML/Index.html CMake] files so you can generate the appropriate build files for Visual Studio. You need to build separate libs for each supported version of Visual Studio, as they're not compatible. Also, debug builds are needed for PCRE. Remember to disable debug info in the debug project settings.
  
 
===Linux===
 
===Linux===
On Linux it's expected that your distro will provide PCRE development files. If not, the PCRE documentation explains how to build PCRE for a Linux system.
+
On Linux, it's expected that your distro will provide PCRE development files. If not, the PCRE documentation explains how to build PCRE for a Linux system.
  
 
===Mac===
 
===Mac===
On Mac we want to build a universal binary, so the default build for Unix systems needs to be tweaked a bit. Open a terminal and run this command:
+
On Mac we want to build a universal binary, so the default build for Unix systems needs to be tweaked a bit. Download and extract PCRE 7.6 and open a terminal.
 +
cd <pcre>
 +
mkdir mac && cd mac
 +
CXXFLAGS="-O2 -arch i386 -arch ppc" CFLAGS="-O2 -arch i386 -arch ppc" LDFLAGS="-arch i386 -arch ppc" ../configure
 +
make
  
  env CXXFLAGS="-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \
+
The output is <pcre>/mac/.libs/[libpcre.a libpcrecpp.a]. If you're using Mac OS X Tiger, the configure command needs to be tweaked slightly to generate a universal binary.
  CFLAGS="-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \
+
 
 +
  CXXFLAGS="-O2 -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \
 +
  CFLAGS="-O2 -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \
 
  LDFLAGS="-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \
 
  LDFLAGS="-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \
  ./configure --disable-dependency-tracking
+
  ../configure --disable-dependency-tracking
  
The -isysroot specifications seem to only be necessary on Tiger PowerPC systems building universal binaries. This information was taken from [http://programming.nu/installing here].
+
This information was taken from [http://programming.nu/installing here].
 +
 
 +
===MinGW===
 +
Download PCRE 7.6 and open a shell.
 +
mkdir <pcre>/mingwBuild && cd <pcre>/mingwBuild
 +
CPPFLAGS=-DPCRE_STATIC ../configure --enable-rebuilt-chartables --disable-dependency-tracking
 +
make
 +
 
 +
The output is <pcre>/mingwBuild/.libs/[libpcre.a libpcrecpp.a].
  
 
===PS3===
 
===PS3===
Line 81: Line 99:
  
 
==Boost Filesystem==
 
==Boost Filesystem==
The [http://www.boost.org/libs/filesystem/doc/index.htm Boost filesystem] library is used in the DOM automated tests, but it currently isn't used by the DOM itself. That might change in the future though. The DOM (or rather, domTest) has been tested with Boost 1.34.1.
+
The [http://www.boost.org/libs/filesystem/doc/index.htm Boost filesystem] library is used in the DOM automated tests and in the DOM itself to handle temporary files created for ZAE archives (since SVN revison 637). The DOM ships with [http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=587936 Boost 1.35]. Starting with Boost 1.35 the Filesystem library depends on the System library, so the DOM also needs Boost System.
  
===Windows===
+
===Visual Studio===
 
Boost filesystem requires both a debug and release lib for proper use in the DOM. Since we want to disable debug info in the debug build, we can't use the normal lib files provided by the Boost Windows installer.
 
Boost filesystem requires both a debug and release lib for proper use in the DOM. Since we want to disable debug info in the debug build, we can't use the normal lib files provided by the Boost Windows installer.
  
Instead, download and extract the [http://downloads.sourceforge.net/boost/boost_1_34_1.zip?use_mirror=internap Boost 1.34.1 source] and copy filesystem.sln and filesystem.vcproj from <dom-path>/external-libs/boost/build/filesystem to <boost-path>/libs/filesystem/build. Then open the solution and build both debug and release.
+
Instead, download and extract the [http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=587936 Boost 1.35 source]. Copy the "vc8" folder from <dom>/external-libs/boost/build/system to <boost>/libs/system/build, and also copy the vc8 folder from <dom>/external-libs/boost/build/filesystem to <boost>/libs/filesystem/build. Open the System solution and build both debug and release, then do the same for Filesystem.
  
The Boost filesystem lib doesn't play nicely with other versions of Visual Studio, so you'll need separate builds for each version of VS you want to support.
+
The Boost libs don't play nicely with other versions of Visual Studio, so you'll need separate builds for each version of VS you want to support. To build a library for VC9, run the DOM's vc8to9.py script to generate VC9 project files.
 +
cd <dom>/external-libs/boost/build
 +
python ../../../../projects/vc8to9.py system/vc8 system/vc9
 +
python ../../../../projects/vc8to9.py filesystem/vc8 filesystem/vc9
 +
 
 +
Then repeat the process described above for building with VC8.
  
 
===Linux===
 
===Linux===
Line 94: Line 117:
  
 
===Mac===
 
===Mac===
On Mac we need a universal binary, so the Boost build system has to be tweaked somewhat. Download and extract Boost 1.34.1 on your system. Copy the makefile from <dom-path>/external-libs/boost/build/filesystem to <boost-path>/libs/filesystem/build. Then go to <boost-path>/libs/filesystem/build in a terminal and run "make".
+
On Mac, we need a universal binary, so the Boost build system has to be tweaked somewhat. Download the Boost 1.35 source and open a terminal.
 +
cp <dom>/external-libs/boost/build/system/Makefile <boost>/libs/system/build
 +
cp <dom>/external-libs/boost/build/filesystem/Makefile <boost>/libs/filesystem/build
 +
make -C <boost>/libs/system/build
 +
make -C <boost>/libs/filesystem/build
 +
 
 +
===MinGW===
 +
Download the Boost 1.35 source, then download the Boost Jam binaries (ntx86) and extract to <boost>. Open a terminal.
 +
cd <boost>
 +
./bjam --build-dir=mingwBuild --toolset=gcc --with-filesystem link=static stage
 +
 
 +
The output is in the mingwBuild folder. We want libboost_system-mgw34-mt-1_35.lib and libboost_filesystem-mgw34-mt-1_35.lib. Rename them to libboost_system.a and libboost_filesystem.a.
  
 
===PS3===
 
===PS3===
Same as Mac, except you need to copy operations.cpp from <dom-path>external-libs/boost/build/filesystem to <boost-path>/libs/filesystem/src. Then run "make platform=ps3".
+
Download the Boost 1.35 source and open a terminal.
 +
cp <dom>/external-libs/boost/build/system/Makefile <boost>/libs/system/build
 +
cp <dom>/external-libs/boost/build/filesystem/Makefile <boost>/libs/filesystem/build
 +
cp <dom>/external-libs/boost/build/system/error_code.cpp <boost>/libs/system/src
 +
cp <dom>/external-libs/boost/build/filesystem/operations.cpp <boost>/libs/filesystem/src
 +
make -C <boost>/libs/system/build platform=ps3
 +
make -C <boost>/libs/filesystem/build platform=ps3
 +
 
 +
==minizip==
 +
Since SVN revison 637 minizip is used to extract ZAE archives. Minizip is included in the zlib source distribution. Additional information is available on the [http://www.winimage.com/zLibDll/minizip.html minizip webpage].
 +
 
 +
===Visual Studio===
 +
As we use libxml with zlib support and that zlib build does not include minizip I added a minizip dependency. To build it on your own follow these steps:
 +
* Create new VS project
 +
* Add .c and .h files from zlib123\contrib\minizip (except minizip.c and miniunz.c)
 +
* Add zlib123 to include path
 +
* Set C/C++ -> Optimization -> "Whole Program Optimization" to No. This avoids a linker warning.
 +
 
 +
===Linux===
 +
Neither Redhat nor Debian provide minizip packages. So I included it's source in external-libs/minizip/src. It can be built with:
 +
<code>make project=minizip</code>.
 +
You can specify other parameters such as <code>colladaVersion</code> or <code>conf</code> as well.
 +
 
 +
===Mac===
 +
see linux.
 +
 
 +
===MinGW===
 +
see linux.
 +
 
 +
===PS3===
 +
TODO
 +
 
  
 
[[Category:COLLADA DOM]]
 
[[Category:COLLADA DOM]]

Latest revision as of 01:41, 9 November 2011

The COLLADA DOM uses several third-party libraries. This document explains how to rebuild these libraries for each of the supported platforms. This is intended more for the COLLADA DOM maintainers than DOM users. Because all the third party libraries necessary to build the DOM on a particular platform are provided in the external-libs folder, most users shouldn't need to rebuild these libraries.

Notes

Release vs. Debug

It's not expected that you'll debug the third-party libs via the DOM, so the DOM provides release builds of only the third party libs. It's expected that you'll link both the release and debug versions of your application against the release version of these libs.

However, in some cases, Visual Studio has problems linking a debug version of an application against a release version of a library (in some cases it works fine). When Visual Studio doesn't like linking the release version of one of these libs into the debug version of an application, we also provide a debug version of the lib. Currently this is necessary for PCRE and Boost filesystem. When we need to provide a debug lib, we strip the debug info from the build to reduce download size.

If you actually need to debug into one of the third-party libs for some reason, you'll need to provide your own debug build and rebuild the DOM to link against it.

PS3 host system

The instructions for building PS3 libs should work with either Linux or Windows as the host system.

Libxml

Visual Studio

Download the libxml source. We're currently using version 2.6.32. We also build with zlib support, so you'll need to download that, too. We don't need the source, just the headers and libs, and Igor Zlatkovic provides the appropriate files for Windows.

When built with Visual Studio, libxml tends to be forward compatible with later versions of Visual Studio, so, for maximal compatibility, we build with VS 2003, which is the oldest version of Visual Studio that we care about. Libxml doesn't use .vcproj and .sln files; it's built from the command line. Open a command prompt and enable usage of VS2003 from the command line by running

"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\vcvars32.bat"

Now navigate to the win32 folder in libxml. Run "cscript configure.js help" to get a listing of all the build options. For our build, we want to disable iconv and enable zlib. Enabling zlib support in libxml allows the DOM to transparently load zlib or gzip compressed files. Execute these commands:

cscript configure.js iconv=no zlib=yes include=c:/zlib-1.2.3.win32/include lib=c:/zlib-1.2.3.win32/lib
nmake /f Makefile.msvc

The "include" and "lib" options tell libxml where to find third-party libraries, specifically zlib in our case. Adjust the paths to point to wherever you installed zlib. Once you run those commands, you'll have both static lib and DLL versions of libxml in <libxml>/win32/bin.msvc.

Linux and Mac

On Linux and Mac, we just use the stock libxml that comes with the system, so we don't need to worry about building it ourselves.

MinGW

First we need to build zlib. Download the zlib 1.2.3 source, then open a shell and run the following commands.

cd <zlib>
./configure && make
make install prefix=<zlib>/install

Now download libxml 2.6.32 and run these commands.

cd <libxml>
./configure --with-zlib=c:/zlib/install --without-libiconv --disable-shared --disable-dependency-tracking
strip -g <libxml>.libs/libxml2.a

The strip command removes the debug info from the library. The output is <libxml>/.libs/libxml2.a

PS3

On PS3, we use TinyXml for XML parsing instead of libxml. It's possible to get libxml building on PS3, but we don't need it for now.

TinyXml

The DOM has been tested with TinyXml version 2.5.3, released on May 6th 2007. The only platform that actually requires TinyXml usage is the PS3.

In the DOM TinyXml plug-in, we don't use any of the STL features of TinyXml, so you don't need to include STL support in the TinyXml build.

Visual Studio

Download TinyXml. It comes with Visual Studio .sln files for building. Make sure to set the runtime library to multithreaded DLL in the release build and multithreaded debug DLL in the debug build.

Linux, MinGW

Download TinyXml and copy the makefile from <dom-path>/external-libs/tinyxml/build to the TinyXml folder you downloaded. Then open a shell and go to the TinyXml path and run "make". The output lib file is linux/libtinyxml.a.

Mac

The makefile for Linux and PS3 could be trivially adapted to build a Mac universal binary lib, but that hasn't been necessary, so currently the TinyXml DOM plug-in isn't supported on Mac.

PS3

Same as Linux, except run "make platform=ps3". The output lib file is ps3/libtinyxml.a.

PCRE

The DOM uses PCRE 7.6. All platforms require PCRE.

Visual Studio

PCRE comes with CMake files so you can generate the appropriate build files for Visual Studio. You need to build separate libs for each supported version of Visual Studio, as they're not compatible. Also, debug builds are needed for PCRE. Remember to disable debug info in the debug project settings.

Linux

On Linux, it's expected that your distro will provide PCRE development files. If not, the PCRE documentation explains how to build PCRE for a Linux system.

Mac

On Mac we want to build a universal binary, so the default build for Unix systems needs to be tweaked a bit. Download and extract PCRE 7.6 and open a terminal.

cd <pcre>
mkdir mac && cd mac
CXXFLAGS="-O2 -arch i386 -arch ppc" CFLAGS="-O2 -arch i386 -arch ppc" LDFLAGS="-arch i386 -arch ppc" ../configure
make

The output is <pcre>/mac/.libs/[libpcre.a libpcrecpp.a]. If you're using Mac OS X Tiger, the configure command needs to be tweaked slightly to generate a universal binary.

CXXFLAGS="-O2 -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \
CFLAGS="-O2 -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \
LDFLAGS="-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \
../configure --disable-dependency-tracking

This information was taken from here.

MinGW

Download PCRE 7.6 and open a shell.

mkdir <pcre>/mingwBuild && cd <pcre>/mingwBuild
CPPFLAGS=-DPCRE_STATIC ../configure --enable-rebuilt-chartables --disable-dependency-tracking
make

The output is <pcre>/mingwBuild/.libs/[libpcre.a libpcrecpp.a].

PS3

Download and extract PCRE. Copy the entire "ps3" directory from <dom-path>/external-libs/pcre/build to the pcre folder you downloaded. Open a shell and go to the pcre/ps3 directory and run "make".

Boost Filesystem

The Boost filesystem library is used in the DOM automated tests and in the DOM itself to handle temporary files created for ZAE archives (since SVN revison 637). The DOM ships with Boost 1.35. Starting with Boost 1.35 the Filesystem library depends on the System library, so the DOM also needs Boost System.

Visual Studio

Boost filesystem requires both a debug and release lib for proper use in the DOM. Since we want to disable debug info in the debug build, we can't use the normal lib files provided by the Boost Windows installer.

Instead, download and extract the Boost 1.35 source. Copy the "vc8" folder from <dom>/external-libs/boost/build/system to <boost>/libs/system/build, and also copy the vc8 folder from <dom>/external-libs/boost/build/filesystem to <boost>/libs/filesystem/build. Open the System solution and build both debug and release, then do the same for Filesystem.

The Boost libs don't play nicely with other versions of Visual Studio, so you'll need separate builds for each version of VS you want to support. To build a library for VC9, run the DOM's vc8to9.py script to generate VC9 project files.

cd <dom>/external-libs/boost/build
python ../../../../projects/vc8to9.py system/vc8 system/vc9
python ../../../../projects/vc8to9.py filesystem/vc8 filesystem/vc9

Then repeat the process described above for building with VC8.

Linux

It's expected that your distro will provide suitable boost filesystem development files. Otherwise, Boost comes with documentation that explains how to build on Linux.

Mac

On Mac, we need a universal binary, so the Boost build system has to be tweaked somewhat. Download the Boost 1.35 source and open a terminal.

cp <dom>/external-libs/boost/build/system/Makefile <boost>/libs/system/build
cp <dom>/external-libs/boost/build/filesystem/Makefile <boost>/libs/filesystem/build
make -C <boost>/libs/system/build
make -C <boost>/libs/filesystem/build

MinGW

Download the Boost 1.35 source, then download the Boost Jam binaries (ntx86) and extract to <boost>. Open a terminal.

cd <boost>
./bjam --build-dir=mingwBuild --toolset=gcc --with-filesystem link=static stage

The output is in the mingwBuild folder. We want libboost_system-mgw34-mt-1_35.lib and libboost_filesystem-mgw34-mt-1_35.lib. Rename them to libboost_system.a and libboost_filesystem.a.

PS3

Download the Boost 1.35 source and open a terminal.

cp <dom>/external-libs/boost/build/system/Makefile <boost>/libs/system/build
cp <dom>/external-libs/boost/build/filesystem/Makefile <boost>/libs/filesystem/build
cp <dom>/external-libs/boost/build/system/error_code.cpp <boost>/libs/system/src
cp <dom>/external-libs/boost/build/filesystem/operations.cpp <boost>/libs/filesystem/src
make -C <boost>/libs/system/build platform=ps3
make -C <boost>/libs/filesystem/build platform=ps3

minizip

Since SVN revison 637 minizip is used to extract ZAE archives. Minizip is included in the zlib source distribution. Additional information is available on the minizip webpage.

Visual Studio

As we use libxml with zlib support and that zlib build does not include minizip I added a minizip dependency. To build it on your own follow these steps:

  • Create new VS project
  • Add .c and .h files from zlib123\contrib\minizip (except minizip.c and miniunz.c)
  • Add zlib123 to include path
  • Set C/C++ -> Optimization -> "Whole Program Optimization" to No. This avoids a linker warning.

Linux

Neither Redhat nor Debian provide minizip packages. So I included it's source in external-libs/minizip/src. It can be built with: make project=minizip. You can specify other parameters such as colladaVersion or conf as well.

Mac

see linux.

MinGW

see linux.

PS3

TODO