|
Ubuntu Hardy - Build ThirdParty |
|
Prerequisites
This is the second stage of three in the process of building ZCS for Ubuntu Hardy. You MUST have gone through the first stage, Setup Build Environment. If you haven't go back and do it now!
Intro
Building ThirdParty is a painful process. Put a strong brew on, and/or order a batch of happy keepy uppy narcotics. Note that as of the new p4 sourcetree, most of the various opensource tarballs are now included (thanks Qanah!!!), which makes the process a whole lot easier.
There is a top level Makefile and build script that attempts to build the entire ThirdParty section in one go, automatically. It is strongly recommended to not attempt this - almost certainly one or more of the components will fail the first time round, and there are many inter-dependencies. It is more sensible to build component by component, checking each one as you go along. I have patched the toplevel Makefile to allow invidual building of all the different components.
I've changed the behaviour of buildThirdParty.sh for our purposes. The original does a p4 synch each call and then tries to build the entire ThirdParty unconditionally. Our modified script calls the get_plat_env.sh and then calls the main Makefile with whatever argument we give it. This allows us to use it as a wrapper to build whatever ThirdParty component we want, eg:
./buildThirdParty.sh openldap
You can download both of these files individually here, just overwrite the existing files in /opt/build.zimbra/source/FRANKLIN/ThirdParty to use them.
Build Components
run buildThirdParty.sh for each component in turn. After compilation has finished, look through the log (/tmp/ThirdParty.log.<component>) to make sure everything has gone OK. Compile in this order:
openssl
sleepycat
mysql
libxml2
heimdal
curl
cyrus-sasl
openldap
aspell
clamav
apache-httpd
php
Postfix
dspam
rrdtool
snmp
memcached
nginx
tcmalloc
Build Perl Component
Make second cup of very strong coffee.
Make sure your PERLLIB was set in /etc/profile in the Setup Build Environment section - if this is not set correctly, the perl component will not build.First, edit the CPAN template for your build environment. Edit Perl/MyConfig.template:
Change all instances of @@BUILDROOT@@ to src dir, eg. /opt/build.zimbra/source/FRANKLIN/ThirdParty/Perl
Change the internal Zimbra cpan mirror to a public mirror:
'urllist' => [q[http://www.mirrorservice.org/sites/ftp.funet.fi/pub/languages/perl/CPAN/],],Set siteinstalllib to the same as $PERLLIB:
'installsitelib' => q[$PERLLIB],At this point I would recommend updating Bundle::CPAN, just to make sure your environment is setup well before you go off and run the main makefile, and it gets rid of lots of irritating messages in the log file. First cd Perl, then run make and quickly Ctrl-C, this will setup your MyConfig.pm in /root/.cpan/. Then update CPAN.
perl -MCPAN -e 'install "Bundle::CPAN"'Now hold your breath and try the main build:
makeAfter it's run its course, check /tmp/ThirdParty-Perllibs.log very carefully. I find the easiest way is to load it in in emacs(/vi/whatever) and search for the string "won't" - this indicates some compile failure. Typical things that go wrong are:
Crypt::SSLeay can't find /opt/csw. Run it by hand and give it the path when asked (do this symlink bodge first, the Makefile.PL is too stupid to find correct include path):
ln -s /opt/csw/include/openssl /opt/csw/include/openssl/openssl
perl -MCPAN -e 'install "Crypt::SSLeay"
Prepare JDK
** IGNORE THIS SECTION FOR NOW **
Although we have to build Zimbra with Java 1.5, it runs on 1.6. We have to prepare jdk1.6 into a tarball and place it into ThirdPartyBuilds for the build process to find.
sh jdk-6u4-linux-x64.bin
or
sh jdk-6u4-linux-i586.bin
tar czf jdk1.6.0_04.tgz jdk1.6.0_04
mkdir -p /opt/build.zimbra/source/FRANKLIN/ThirdPartyBuilds/x86_64/java
mv jdk1.6.0_04.tgz /opt/build.zimbra/source/FRANKLIN/ThirdPartyBuilds/x86_64/java
** END IGNORE **
For ZCS 5.0.6, we create JDK 1.5 tarball for make process:
sh jdk-1_5_0_15-linux-amd64.bin
tar czf jdk1.5.0_15.tgz jdk1.5.0_15
mv jdk1.5.0_15.tgz /opt/build.zimbra/source/FRANKLIN/ThirdPartyBuilds/x86_64/java/
Build Zimbra
Right, now you're ready to start building Zimbra!
<- Go Here ->
|
|