Difference between revisions of "Building HELIX 7.1.4 on FreeBSD 9 amd64"

(Preparing build enviroment via /usr/ports)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Article Infobox|{{devel}}|{{ZCS 7.1}}||}}==General information==
+
{{Archive}}{{Article Infobox|{{devel}}|{{ZCS 7.1}}||}}==General information==
 
Please, read [[Zimbra_on_FreeBSD]] for all the details.
 
Please, read [[Zimbra_on_FreeBSD]] for all the details.
  
This guide describes building HELIX-714 on FreeBSD-9_'''amd64'''.
+
This guide describes building '''HELIX-714''' on FreeBSD-9_'''amd64'''. However, the very same guide works for other '''amd64''' versions as well.
  
 
At this point it's good to note that everything should be run as root unless stated otherwise.
 
At this point it's good to note that everything should be run as root unless stated otherwise.
Line 83: Line 83:
  
 
'''Note''': this tarball contains '''everything''' to simplify the build procedure on '''FreeBSD-9_amd64'''. It is the same source I used to build the packages therefore it is guaranteed to work.
 
'''Note''': this tarball contains '''everything''' to simplify the build procedure on '''FreeBSD-9_amd64'''. It is the same source I used to build the packages therefore it is guaranteed to work.
 +
 +
 +
If you are building on a different version of '''FreeBSD''' (!='''FreeBSD 9.0-RELEASE''') be sure to include your own version-specific-compiled ''java'':
 +
<pre>
 +
mkdir -p ThirdPartyBuilds/FreeBSD_amd64/java && cd ThirdPartyBuilds/FreeBSD_amd64/java && \
 +
    rm -rf openjdk6 && \
 +
    cp -pr /usr/local/openjdk6 openjdk6 &&\
 +
        tar zcf openjdk6.tgz openjdk6 && \
 +
            rm -rf openjdk6 && cd ../../../
 +
</pre>
 +
 
==Quick-hacks for a better day==
 
==Quick-hacks for a better day==
 
Since Zimbra is a [http://en.wikipedia.org/wiki/Linux Linux] lover by nature everything is ''/bin/bash'' but guess what.. we have ''/usr/local/bin/bash'':
 
Since Zimbra is a [http://en.wikipedia.org/wiki/Linux Linux] lover by nature everything is ''/bin/bash'' but guess what.. we have ''/usr/local/bin/bash'':
Line 91: Line 102:
 
First build yourself the native library and push it to the proper place:
 
First build yourself the native library and push it to the proper place:
 
<pre>
 
<pre>
cd ZimbraNative && make push && cd ../
+
cd ZimbraNative && gmake push && cd ../
 
</pre>
 
</pre>
  
Line 99: Line 110:
 
./buildZCS.sh -t
 
./buildZCS.sh -t
 
</pre>
 
</pre>
 +
 
==Installing Zimbra Collaboration Suite: HELIX-714 after a successful build==
 
==Installing Zimbra Collaboration Suite: HELIX-714 after a successful build==
 
<pre>
 
<pre>

Latest revision as of 16:24, 27 March 2015

Developer Article

Article Information

This article applies to the following ZCS versions.
  ZCS 7.1 Article  ZCS 7.1

General information

Please, read Zimbra_on_FreeBSD for all the details.

This guide describes building HELIX-714 on FreeBSD-9_amd64. However, the very same guide works for other amd64 versions as well.

At this point it's good to note that everything should be run as root unless stated otherwise.

Initial pre-build steps

Let's check our system:

uname -a
FreeBSD zmail.solko.sk 9.0-RELEASE FreeBSD 9.0-RELEASE #3: Tue Feb 21 22:30:14 CET 2012     solko@zmail.solko.sk:/usr/obj/usr/src/sys/GENERIC  amd64

We love some optimizations:

cat /etc/make.conf
COPTFLAGS= -O2 -pipe
CFLAGS= -O2 -fno-strict-aliasing -pipe

Preparing build enviroment via /usr/ports

I created simple "meta" ports which will take care of everything. Since I am a very very creative person I named those: mail/zimbra-rundeps and mail/zimbra-builddeps.

The first installs all dependencies needed to run HELIX-714 while the second installs all dependencies needed to build HELIX-714. For reasons vastly uknown the second requires the first one.

cd /usr/ports/mail
fetch http://zimbra.imladris.sk/download/ports/usrports_zimbra-rundeps-7.1.4.tgz && \
    tar xzf usrports_zimbra-rundeps-7.1.4.tgz && \
        rm -f usrports_zimbra-rundeps-7.1.4.tgz
fetch http://zimbra.imladris.sk/download/ports/usrports_zimbra-builddeps-7.1.4.tgz && \
    tar xzf usrports_zimbra-builddeps-7.1.4.tgz && \
        rm -f usrports_zimbra-builddeps-7.1.4.tgz
cd /usr/ports/mail/zimbra-builddeps && make config-recursive install

followed by an optional:

make distclean

to completely clean the build mess including source files.


If you are able to use /usr/ports you should be able to figure out the configure options (not that it matters much, mostly unimportant stuff).

If you are using a csh derivate shell, which is the FreeBSD default, run:

rehash

Preparing build enviroment via zimbra.imladris.sk

Since some people like to compile and others like to install-only I prepared all the necessary zimbra-builddeps packages.

cd /tmp && \
    fetch http://zimbra.imladris.sk/download/packages/HELIX-714/FreeBSD-9/amd64/zimbra-builddeps-7.1.4.tgz && \
        tar xzf zimbra-builddeps-7.1.4.tgz && \
            cd zimbra-builddeps-7.1.4 && \
                pkg_add zimbra-builddeps-7.1.4.tbz && cd /tmp && rm -rf zimbra-builddeps-7.1.4


If you are using a csh derivate shell, which is the FreeBSD default, run:

rehash

Grats, you just saved yourself a lot of time.

Getting the ready-to-build(TM) source from zimbra.imladris.sk

HELIX-714.fbsd-src.tgz

mkdir -p /home/public/p4 && \
    cd /home/public/p4 && \
        fetch http://zimbra.imladris.sk/download/src/HELIX-714.fbsd-src.tgz && \
            tar xzf HELIX-714.fbsd-src.tgz && cd HELIX-714.fbsd

Note: this tarball contains everything to simplify the build procedure on FreeBSD-9_amd64. It is the same source I used to build the packages therefore it is guaranteed to work.


If you are building on a different version of FreeBSD (!=FreeBSD 9.0-RELEASE) be sure to include your own version-specific-compiled java:

mkdir -p ThirdPartyBuilds/FreeBSD_amd64/java && cd ThirdPartyBuilds/FreeBSD_amd64/java && \
    rm -rf openjdk6 && \
    cp -pr /usr/local/openjdk6 openjdk6 &&\
        tar zcf openjdk6.tgz openjdk6 && \
            rm -rf openjdk6 && cd ../../../

Quick-hacks for a better day

Since Zimbra is a Linux lover by nature everything is /bin/bash but guess what.. we have /usr/local/bin/bash:

ln -s /usr/local/bin/bash /bin/bash

Building Zimbra Collaboration Suite: HELIX-714

First build yourself the native library and push it to the proper place:

cd ZimbraNative && gmake push && cd ../

Then get yourself occupied for at least an hour:

cd ZimbraBuild
./buildZCS.sh -t

Installing Zimbra Collaboration Suite: HELIX-714 after a successful build

cd zcs-7.*
./install.sh

Further reading

Zimbra_on_FreeBSD

--Solko 10:57, 27 February 2012 (PST)

Jump to: navigation, search