Apache OpenOffice Building Guide

From Apache OpenOffice Wiki
< Documentation
Revision as of 15:27, 4 April 2012 by Andre (Talk | contribs)

Jump to: navigation, search

Template:Documentation/Building Guide AOO TOC


Preface

This guide will help you to build Apache OpenOffice from its source code. It details the prerequisites and explains how to download the source code, prepare and then run the build.

This document is loosely based on an older, now deprecated, version.


Getting help

You can get help by searching this wiki or by asking questions on the developers mailing list.

You can help us improve this guide by pointing out any errors (preferably after finding a solution.)

Basics

In order to build Apache OpenOffice you need a proper environment. This includes

  • a command line interpreter, typically a bash shell (although sh should be enough) inside a terminal.
  • C++ compiler and linker. The exact choice depends on the operating system.
  • Perl interpreter and several modules.
  • Many tools from the Unix world like make or sed.

The exact list of requirements will be detailed on operating specific sub pages. Note that while some of these tools come pre-installed with the Linuxes, FreeBSD, Mac, Solaris etc. on Windows you will need to install Cygwin to provide them.

Getting the source

The source code is available as SVN repository at https://svn.apache.org/repos/asf/incubator/ooo.

Check it out with

  svn co https://svn.apache.org/repos/asf/incubator/ooo/trunk ooo

More details can be found here.

Organization of the source and output tree

The source code has four top level directories:

main/
contains most of the so called modules. Each module typically provides one or more libraries. The source code of the writer application for example can be found in main/sd/.
ext_libraries/
is the new home of modules that build external libraries (libraries maintained outside of Apache OpenOffice and often outside Apache).
ext_sources/
contains the tar balls (archives) of external libraries. They are included both for convenience and to make sure that specific versions remain available. Note that the source package of the Apache OpenOffice release does not contain any external tar balls.
extras/
holds the localization data.

Most tools and scripts that are used for building are located below main/solenv/:

  • dmake makefiles in main/solenv/inc/
  • gmake makefiles in main/solenv/gbuild/
  • executables and perl files in main/bin/
  • perl modules in main/bin/modules/

Libraries and other output files that are shared between modules are stored in main/solver/.


Building

Overview

Building Apache OpenOffice consists of three steps:

Configuring/bootstrapping
Detect platform, operating system, compiler, etc. and write the information into a shell script for later use. The developer can turn on or off certain features in this phase.
Building
Compile the source code, transform other input files, apply localization.
Packing
Create a set of files, the installation set, that can be installed on the respective operating system. This can be msi/cab files for windows, deb or rpm for Linux, dmg for Mac.

The configure step has to be carried out only once. Building and packing is necessary after every source code change. There are short cuts to avoid parts of these steps (when you know what you are doing.)

General Build Requirements

The general requirements for all platforms are

Requirement Description
Java JDK Java Implementation compatible with JDK 1.5 or JDK 1.6. OpenJDK is supported as well.
Perl Perl 5. For the regular build Mdiles Archive:Zip (rpm:perl-Archive-Zip) and XML:Parser (rpm:perl-XML-Parser) are required. For committing changes to the repository Crypt:SSLeay and SOAP:Lite are also required.
CUPS cups headers. Provided by a cups-devel package or a libcups2-devel
PAM PAM support. Provided by a pam-devel package or a libpam-dev
Apache Ant Ant 1.7
Archiver zip and unzip
gperf gperf tool
Mozilla1 Some Mozilla libraries are needed. Choose one of the following:
  • Get the source from here.2
  • Get prebuild libraries from here.3
NSS4 Mozilla build tools5 are needed for Windows. They can be obtained here.

Notes:
1. If you are a new developer, don't use the libraries. By using the --disable-mozilla switch for ./configure you waive the extra functionality.
2. Copy the package into main/moz/download. The ./configure script will detect the source being present.
3. You have to configure with --disable-build-mozilla to enable the use of the prebuild libraries. Place LINUXGCCI{inc,lib,runtime}.zip into main/moz/zipped. The files can be reused if the packages were build following the instructions of the previous point. In the latter case they can be found in main/moz/unxlngi6.pro of a successful build.
4. The nss module will be introduced in DEV300m57. nss contains a subset of libraries from Mozilla (the moz module). They are supposed to be more current then those in the moz module. To prevent building nss and instead use the libraries from the moz module one can use the configure switch --disable-nss-module. This switch will be removed soon!
5. Use the configure switch --with-mozilla-build to tell configure where the tools are installed. For example: --with-mozilla-build=c:/mozilla-build

Personal tools