Building FRANKLIN on CentOS 5
Introduction
This HOWTO covers the basic steps required to build Zimbra. For more information, see these essential documents:
These might be helpful, too:
Getting the source
There are two main places where to get the Zimbra sources:
- Zimbra Community Builds (http://sourceforge.net/projects/zimbracommunity)
- Zimbra's official Perforce repositories (instructions below)
To download official Zimbra sources, first get proprietary Perforce client (free) from http://www.perforce.com/perforce/downloads/platform.html. Next create a temporary directory for the sources
$ mkdir /home/username/temp
Next do some linking to work around p4's default behaviour:
$ ln -s /home/username/temp /home/public
Then export some P4-related environment variables and do a full resync. This is required, because p4 is a proprietary program and it can't track changes for the public account.
$ export P4EDITOR=nano $ export P4PORT=codes.zimbra.com:2666 $ p4 -u public -P public1234 -c public-view sync -f //depot/zcs/FRANKLIN/...
Perforce should now start downloading the source code.
Preparing the build environment
Stock CentOS5 install has only a few basic repositories configured. You need to add rpmforge to your list of yum repositories. You can get the repository information and instructions from http://dag.wieers.com/rpm/packages/rpmforge-release.
Troubleshooting
Zimbra build problems can be divided into a couple main categories:
- Undocumented, missing dependencies
- Faulty assumptions about the build environment
- Problems with the sources or the downloaded source tree
Instead of trying to document every problem I encountered, I'll simply describe how these problems can be circumvented.
Finding and installing missing dependencies
It's certain that Zimbra won't build cleanly if you just follow the various Wiki articles and README files. When the build fails, it's usually due to a missing dependency. If the error message tells you which software package is missing, you can just guess the package name
$ yum search package $ yum install package
Most likely you need lots of development packages. They are named something-devel in CentOS. If the build process complains about a single missing file, you can find it by installing yum-utils and then using repoquery to locate the package containing the missing file:
$ yum install yum-utils $ repoquery -a -f *missing-file
This is similar to using apt-file on Debian-based systems.