Building OpenOffice.org

From Apache OpenOffice Wiki
Revision as of 14:11, 4 August 2006 by Cloph (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

These are the instructions on how to build "vanilla" OpenOffice.org. Vanilla means: without tools like ooobuild that wrap the build-process. If you're using ooobuild, have a look at Building_with_ooobuild instead.

Compiling OpenOffice.org : the practice

Getting the sources

To not make these instructions longer than necessary, there is a dedicated page on how to get the source.

Dependencies

Of course you need to have some development libraries installed to build OpenOffice.org. The configure script will complain if something is missing. Until this guide lists the prerequisites, please have a look at http://tools.openoffice.org/

While not dependencies, it is strongly recommended to install (and configure) | ccache - this will greatly reduce build time on subsequent builds.

Building a Milestone

Running configure

The first step after getting the sources (and hopefully all prerequisites) is to run configure:

cd <SRC_ROOT>
cd config_office
./configure

You will most likely have to tell configure where it finds some packages such as ant or tell it what java to use. Use

./configure --help

to get a list of valid options that you can use.

If you forgot to install some dependencies, the configure will remind you which one are lacking.

Special hint related to ant: Make sure to use an absolute path.

Bootstrapping

When configure ran fine (i.e. it did finish without any error or warnings), you can continue the build. Configure creates an environment file that you need to read into your shell. If you run bash, use

cd <SRC_ROOT>
source LinuxIntelEnv.Set.sh

If you run a tcsh or similar, use

cd <SRC_ROOT>
source LinuxIntelEnv.Set
rehash

The last step before the real build is to build the buildtools that OOo uses. To do so, simply run

./bootstrap

in <SRC_ROOT>

Starting the real build

Now it is time for the real build Just type

dmake

in <SRC_ROOT> and then relax. Building OOo takes some time (approx 10-12 hours on standard desktop PC) so you can do other things in the meantime.

Building a CWS

In order to build a cws, you need to first checkout the milestone that the cws is based upon (see Getting the source above). After that, you have to update the modules included in the cws with the cvs tag of the CWS.

You can either use EIS to get information about what milestone is the base for the CWS (see the field "Milestone (current)") and what modules it includes (see the table "Modules & Files") - or you can use | Tinderbox's tag-list to get this information.

Once you have collected the necessary information, you can run

cd <SRC_ROOT>
cvs [optional cvs flags such as -z #] update -dP -r <cwstag> <module1> <module2> <moduleN>

Where

  • SRC_ROOT is the top-level directory of your milestone-checkout
  • cwstag is the cvs tag of the CWS. The tag is in the form cws_<main codeline>_<name of cws>, for example cws_src680_chart2mst3

Note: If you're using cvs using the ssh-tunnel, use ssh's compression rather than cvs compression - that gives better results


Tips and Tricks

Here are some tips that make your life easier or can accelerate the build

set nodep=TRUE

If you set the environment variable nodep to TRUE, then dependendy information files are not created - the build finishes faster.

But only enable that on a clean build. Once you have built OOo and then made modifications, unset the variable again to be on the safe side.

set NO_HIDS=TRUE

similar to the nodep variabnle, this one prevents the generation of HIDs (Help IDs) that are mainly used for automated testing - if you only want to build OOo, you don't need those.

use parallel builds

If you have a multiprocessor machine or similar, you can run a parallel build. There are two levels of parallelism - one operating on makefile level, the other one on module level

set maxprocess=<numer or processes>

This is the makefile-parallelism. This tells dmake how many targets it is allowed to build in parallel

running parallel build.pl

For parallelism on the module level, you have to run build from <SRC_ROOT>/instsetoo_native with the -P<number> switch, for example:

build -P2

saving diskscpace by linking to the solver only

use "--dlv_switch -link" when running build to tell deliver to only link the files instead of copying them:

build --dlv_switch -link
Personal tools