Compiling Zimbra server on Ubuntu 8.04LTS

Last version of Zimbra collaboration, version 6.0.6, had been subject to several delays, which lead to a gap of nearly three weeks since the first proposed release date. These dates are considered target, thus flexible. Normally, I wouldn’t get crazy about release dates. Yes, while you may wish to get your hands on, because it fixes the most annoying but you ever had, you can wait some more days anyway.

But 6.0.6 had several fixes I really needed at some place. And after the second delay, I decided to try to compile Zimbra from source. Brave you think? Me too…

Well, you know, compiling a software is not always something really straightforward. Considering that Zimbra is a mix of several different projects, that raises complexity a lot. So, while according to the wiki building from source on Debian Lenny is an easy task, it never really is!

So, the start point is the above wiki page: GNR on Debian Lenny. It says it’s updated until last february, for 6.0.5, so we should be up to date enough, right?

First we need to get the source. Download perforce executable and put it into the path. Unless changed in the download page this should work for amd64:

wget -P /usr/local/bin http://www.perforce.com/downloads/perforce/r10.1/bin.linux26x86_64/p4
chmod +x /usr/local/bin/p4

If it doesn’t work, go to perforce download page and adjust url.
Then issue:

export P4PORT=codes.zimbra.com:2666
p4 -u public -P public1234 -c public-view sync -f //depot/zcs/GNR-606/...

Depending on what you wish to compile, the latest directory may change. I.e. if you need 6.0.7, the dir will be //depot/zcs/GNR-607/… . The command will get Zimbra sources into /home/public, so make sure you have the rights to write there.

Now go and have a lunch, fetching perforce source takes its time as they’re ~750MB. In the meantime, you can prepare the host system. Since I’m trying to build on a Debian based, commands won’t change. But despite of what stated on the document, at least on Ubuntu 8.04 some other packages are needed. This is the full apt command for the needed stuff:

aptitude install lsb ant sun-java6-jdk sun-java6-jre sun-java5-jdk sun-java5-jre autoconf locales libtool bison flex libncurses5-dev libpcre3-dev libexpat1-dev libpopt-dev libwww-perl libperl-dev unzip libz libextutils-parsexs-perl libsasl2-dev libldap2-dev zlib1g-dev 

Zimbra 6 series build should be compatible on both 1.5 and 1.6, but to be safe let’s tell the compiler to use Java 1.5:

update-alternatives --config java

and select the proper option relative to J1.5.

Download the latest JRE from java.com, extract it somewhere and then:

cd jre1.6.0_22/
mkdir -p /home/public/p4/GNR/ThirdPartyBuilds/x86_64/java
tar cvzf /home/public/p4/GNR/ThirdPartyBuilds/x86_64/java/jdk1.6.0_22.tgz *

Lot of Zimbra devs place Java in /usr/loca, so as a workaround for some build issues, we need a symlink for it:

ln -s /usr/lib/jvm/java-1.5.0-sun /usr/local/java

And finally launch build:

mkdir -p /opt/zimbra
cd /home/public/p4/GNR/ZimbraBuild/
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
./buildZCS.sh -t 

The -t option can be omitted in successive builds.

It took ~70 minutes on an Intel(R) Xeon(R) CPU X3430 @ 2.40GHz with 8GB of RAM and a quite fast raid array. The final /home/public directory will end up to take few less than 6GB.

6 pensieri su “Compiling Zimbra server on Ubuntu 8.04LTS

  1. hi..

    i trying to build zimbra 6.07 in ubuntu 8.04LTS from your instruction…but i can not build ThirdParty …the perl error eccured in verify perl Moudle build…have you any suggestion ??

    ThirdParty-Perllibs.log :

    ……..
    …..
    make[2]: Entering directory `/home/public/p4/zcs-6.0.7_GA_2483-src/ThirdParty/Perl/tmp/swatch-3.2.3′
    Installing /home/public/p4/zcs-6.0.7_GA_2483-src/ThirdParty/Perl/zimbramon/lib/auto/Swatch/Actions/autosplit.ix
    Installing /home/public/p4/zcs-6.0.7_GA_2483-src/ThirdParty/Perl/zimbramon/lib/Swatch/Threshold.pm
    Installing /home/public/p4/zcs-6.0.7_GA_2483-src/ThirdParty/Perl/zimbramon/lib/Swatch/Throttle.pm
    Installing /home/public/p4/zcs-6.0.7_GA_2483-src/ThirdParty/Perl/zimbramon/lib/Swatch/Actions.pm
    Installing /home/public/p4/zcs-6.0.7_GA_2483-src/ThirdParty/Perl/zimbramon/man/man1/swatch.1p
    Installing /home/public/p4/zcs-6.0.7_GA_2483-src/ThirdParty/Perl/zimbramon/man/man3/Swatch::Threshold.3pm
    Installing /home/public/p4/zcs-6.0.7_GA_2483-src/ThirdParty/Perl/zimbramon/man/man3/Swatch::Throttle.3pm
    Installing /home/public/p4/zcs-6.0.7_GA_2483-src/ThirdParty/Perl/zimbramon/man/man3/Swatch::Actions.3pm
    Installing /home/public/p4/zcs-6.0.7_GA_2483-src/ThirdParty/Perl/zimbramon/bin/swatch
    Appending installation info to /home/public/p4/zcs-6.0.7_GA_2483-src/ThirdParty/Perl/zimbramon/lib/i486-linux-gnu-thread-multi/perllocal.pod
    make[2]: Leaving directory `/home/public/p4/zcs-6.0.7_GA_2483-src/ThirdParty/Perl/tmp/swatch-3.2.3′
    /usr/share/perl5/Config/IniFiles.pm
    /usr/share/perl5/HTTP/Request.pm
    /usr/share/perl5/LWP/UserAgent.pm

    very Thanks..!

  2. I don’t see errors in the logs you posted (maybe use pastebin next time! 🙂 )
    Anyway my compile was nearly a PoC, so I didn’t try anymore! Look for the real error!

  3. Thanks for your reply ,
    oh..exactly i see it when i building ThirdParty and building failed !

    ………..
    Logging to ThirdParty-Perllibs.log
    Compiling perl lib Crypt-SSLeay-0.57 …done.
    Compiling perl lib Crypt-OpenSSL-Random-0.04 …done.
    Compiling perl lib Crypt-OpenSSL-RSA-0.26 …done.
    Compiling perl lib Array-Compare-1.17 …done.
    Compiling perl lib Tree::DAG_Node …done.
    Compiling perl lib Sub::Uplevel …done.
    Compiling perl lib Test::Exception …done.
    Compiling perl lib Test::Warn …done.
    Compiling perl lib Net-SSLeay-1.36 …done.
    Compiling perl lib XML-Parser-2.36 …done.
    Compiling perl lib IO …seddone.
    Compiling perl lib Scalar::Util …done.
    Compiling perl lib IO::Socket::SSL …done.
    Compiling perl lib Socket6 …done.
    Compiling perl lib DBI …done.
    Compiling perl lib IO::Zlib …done.
    Compiling perl lib Bit::Vector …done.
    Compiling perl lib HTML::Tagset …done.
    Compiling perl lib HTML::Parser …done.
    Compiling perl lib URI …done.
    Compiling perl lib Net::HTTP …done.
    Compiling perl lib Net::SMTP …done.
    Compiling perl lib Proc::ProcessTable …done.
    Compiling perl lib HTTP::Parser …done.
    Compiling perl lib IO::Stringy …done.
    Compiling perl lib E/ER/ERYQ/MIME-Lite-2.117.tar.gz …done.
    Compiling perl lib D/DA/DAGOLDEN/Module-Build-0.3607.tar.gz …done.
    Compiling perl lib Mail::Mailer …done.
    Compiling perl lib Convert::BinHex …done.
    Compiling perl lib D/DO/DONEILL/MIME-tools-5.427.tar.gz …done.
    Compiling perl lib SOAP::Lite …done.
    Compiling perl lib Net::Telnet …done.
    Compiling perl lib Config::IniFiles …done.
    Compiling perl lib Config::Properties …done.
    Compiling perl lib Cache::FastMmap …done.
    Compiling perl lib Device::SerialPort …done.
    Compiling perl lib Date::Calc …done.
    Compiling perl lib S/SB/SBECK/Date-Manip-5.56.tar.gz …done.
    Compiling perl lib Date::Parse …done.
    Compiling perl lib Time::HiRes …done.
    Compiling perl lib Convert::ASN1 …done.
    Compiling perl lib Net::LDAP …done.
    Compiling perl lib Net::Server …done.
    Compiling perl lib Unix::Syslog …done.
    Compiling perl lib Parallel::ForkManager …done.
    Compiling perl lib Package::Constants …done.
    Compiling perl lib IO::Compress::Base …done.
    Compiling perl lib IO::Compress::Gzip …done.
    Compiling perl lib Compress::Raw::Zlib …done.
    Compiling perl lib P/PM/PMQS/Compress-Zlib-1.42.tar.gz …done.
    Compiling perl lib Archive::Tar …done.
    Compiling perl lib Digest::SHA1 …done.
    Compiling perl lib Digest::HMAC …done.
    Compiling perl lib Digest::HMAC_MD5 …done.
    Compiling perl lib Convert::TNEF …done.
    Compiling perl lib Convert::UUlib …done.
    Compiling perl lib Net::IP …done.
    Compiling perl lib Net::DNS …done.
    Compiling perl lib File::Tail …done.
    Compiling perl lib File::Temp …done.
    Compiling perl lib File::Grep …done.
    Compiling perl lib Data::UUID …done.
    Compiling perl lib List::Compare …done.
    Compiling perl lib Getopt::Easy …done.
    Compiling perl lib Crypt::SaltedHash …done.
    Compiling perl lib Archive::Zip …done.
    Compiling perl lib Digest::SHA …done.
    Compiling perl lib Error …done.
    Compiling perl lib Mail::DKIM …done.
    Compiling perl lib K/KH/KHAMPTON/XML-SAX-Base-1.04.tar.gz …done.
    Compiling perl lib XML::SAX::Expat …done.
    Compiling perl lib XML::Simple …done.
    Compiling perl lib IO::Socket::INET6 …done.
    Compiling perl lib NetAddr::IP …done.
    Compiling perl lib Net::DNS::Resolver::Programmable …done.
    Compiling perl lib version …done.
    Compiling perl lib Geography::Countries …done.
    Compiling perl lib IP::Country …done.
    Compiling perl lib DBD::SQLite …done.
    Compiling perl lib Net-LDAPapi-3.0.3 …done.
    Compiling perl lib BerkeleyDB-0.41 …done.
    Compiling perl lib DB_File …done.
    Compiling perl lib DBD::mysql …done.
    Compiling perl lib Mail-SPF-v2.008 …done.
    Compiling perl lib Mail-SpamAssassin-3.3.1 …done.
    Compiling perl lib swatch-3.2.3 …done.
    Verifying perl module build…
    /home/public/p4/HELIX-710/ThirdParty/Perl/zmcheckbuiltmodules.pl >> ThirdParty-Perllibs.log 2>&1;
    make: *** [check] Error 1

  4. i have same errors in zimbra GNR 6.07 and Helix710..
    maybe it depened on perl lib path or cpan installations…i dont know..do you have any suggestion ????

  5. hi Maxxer..

    solved my problem…problem is , Makefile dont install Inifiles , UserAgent and Resuest files but in checkBuild in checks this files and can not find it…i added it manually in makefile and problem solved…

    very thanks for your help

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Solve : *
25 + 13 =


Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.