From Apache OpenOffice Wiki
Revision as of 08:52, 5 April 2007 by Rt (Talk | contribs)

Jump to: navigation, search

These are the instructions on how to build "vanilla" (or "up-stream") Vanilla means: without tools like ooo-build that wrap the build-process. If you're using ooo-build, have a look at Building_with_ooobuild instead.

Compiling : the practice

Getting the sources

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


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

Different Platforms

Some information for specific platforms is provided at tools.

Also for Mac OS X see MacOSXBuildInstructions, for GNU/Linux Sparc see GNULinuxSparcPorting and for Windows see Windows.

Building a Milestone

Running configure

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

cd config_office

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.


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


If you run a tcsh or similar, use

source LinuxX86Env.Set

Note: the environment script filename might be different on a different architecture. Replace 'X86' by what is appropriate. Also note that on older version it is 'Intel' and not 'X86'.

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



Starting the real build

Now it is time for the real build Just type


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 Childworkspace (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:

setenv CVSROOT ""
cvs [optional cvs flags such as -z #] update -dP -r <cwstag> <module1> <module2> <moduleN>


  • 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

For example, you can issue :

cd src680-m172
setenv CVSROOT ""
cvs -z3 update -dP -r cws_src680_chart2mst3 chart2/ offuh/

Tips and Tricks

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


If possible (Not for Windows builds), it is strongly recommended to install (and configure) ccache - this will greatly reduce build time on subsequent builds.

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.


Similar to the nodep variable, 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

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

create prebuilt mozilla and use that instead of recompiling everytime

For the mozilla-components you have the choice to either build from mozilla sources, to use precompiled packages (the "official" ones can be obtained from or to use system-mozilla (the one installed on your buildsystem, not everything might work, depending on the version you got installed) You can easily create your own version of the prepacked binaries if you wish to do so (either because you cannot use the official ones because of mismatch of compiler version used to build them/other technical reasons or because you want to use stuff you didn't build yourself). To do so:

  • build the moz module from the mozilla sources
    (use --enable-build-mozilla when running configure and put the mozilla-source tarball to moz/download)
  • in moz run dmake zip to create the zip files
  • you'll find the zips in {unxlngi#,wntmsci#}.pro/zipped

Copy them to a location of your liking. Now instead of using --enable-build-mozilla, use --disable-build-mozilla and copy the zips you created or downloaded to moz/zipped and these will be used when compiling. This will greatly reduce build-time (you save the time that would otherwise be spent on compiling mozilla)

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