Building on Linux

From Apache OpenOffice Wiki
Jump to: navigation, search


This document describes building OpenOffice.org on Linux.

Hardware Requirements

  • 1 or more reasonable fast CPUs, x-way CPU's recommended.
  • 1 GB Ram ( 2 GB recommended )
  • 10 GB free disk space

Software Requirements

  • glibc: for OOo<=3.1: 2.2.x or higher , for OOo>3.1: 2.3.2 or higher
  • C/C++ Compiler: OpenOffice.org has been successfully build on Linux with gcc versions greater 3.3.x. Currently "officially used" GCC version is 4.2.3
  • The X11 development libraries and header files should be installed. Should be in place with most Linux distributions. Note the there are currently some issues with X version 4.3
  • PAM (should come with most Linux distributions). You must install the development package for your distribution.
  • Shell: either bash or csh are supported.
  • GTK - If you enable the crash reporter in configure then you need the gtk2, jpeg and tiff development libraries.

Overview

This section is meant as a reminder or checklist for those who have some experience in building OpenOffice.org. Everybody else should jump to #Build Requirements.

You are advised to check the release notes for the release you are building to inform yourself about changes since previous releases.

Commands you have to type on the keyboard follow this syntax throughout this document:

./configure

In this example, the script configure is executed.

It is possible to use bash or tcsh as shell. This is enabled with the --with-use-shell configure switch. These instructions are for tcsh, but you should be able to guess the needed changes for bash. The environment file for bash adds an additional .sh suffix to the tcsh environment file.

$SRC_ROOT will denote the directory in which the source code of OpenOffice.org is stored.

Building a Full Build

To perform a full build, you need to follow these steps:

  • Run the configure script to check all requirements. Run the following command to view all possible options.

./configure --help

When the configure script has been run the LinuxIntelEnv.Set is created.

  • Source the LinuxIntelEnv.Set script to set all environment variables.

If you use bash use:

source LinuxX86Env.Set.sh

If you use csh or tcsh use:

source LinuxX86Env.Set
rehash

See the last information box in the configure script for more information for your platform.

The last step before the real build is done is to build the buildtools that OpenOffice.org uses. To do so, run:

./bootstrap

To have the build create a ready-to-be-run installation for testing purposes, set the following environment variables.

export LOCALINSTALLDIR="/my/Destination/Dir"
export PKGFORMAT="installed"

Build the software by typing the following in $SRC_ROOT:

dmake

or

make

You can also run the following in the instetoo_native module:

build --all

You can also run the following in a specific module:

build
deliver

The building procedure will take several hours.


If you wish to control the build more you can perform a build with local install sets. instsetoo_native will create rpm's or the actual delivery package for your platform.

cd $SRC_ROOT
cd instetoo_native
build --all

To clean up a previous build you can delete all output directories with</p>

rm -rf */unxlngi4.pro

If you decide to rebuild a module or build each module individually (mind dependencies!), you will have to use the build tool. A subsequent deliver will copy all created binaries, libraries etc. into the solver tree:

$SRC_ROOT/(module)> build
$SRC_ROOT/(module)> deliver

Building a Project with Debug Information

To rebuild a complete project with debug information follow the following instructions.

Remove all object files by removing the unxlngi4.pro directory.

rm -rf */unxlngi4.pro

Then run build with the debug option set to true:

$SRC_ROOT/(module)> rm -rf unxlngi4.pro $SRC_ROOT/(module)> build debug=true

Building an Installation Set

The build process (started with a top-level dmake or build --all in $SRC_ROOT/instsetoo_native) will create an installation sets in English. A simple build in $SRC_ROOT/instsetoo_native will also create the installation sets, provided all other modules are already built.

If you have built an installation set earlier and want to re-build it, delete the local outpath first:

$SRC_ROOT/instsetoo_native> rm -rf unxlngi4.pro

The English installation set will be located at $SRC_ROOT/instsetoo_native/unxlngi4.pro/OpenOffice/install/en-US. Execute the setup binary to install:

$SRC_ROOT> cd instsetoo_native/unxlngi4.pro/OpenOffice/install/en-US
en-US> ./setup

The en-US in the path names indicates that the localization is American English. This value corresponds to the language tags defined by RFC 1766 (Tags for the Identification of Languages). The German installation set will be located in a de subdirectory. This scheme holds true for all localizations you may have chosen explicitly (see Building Localized Versions of OpenOffice.org.

For a network installation, use the -net option to setup. Details on the network installation process can be found at <a href="http://installation.openoffice.org/proposals/netinstall.html">http://installation.openoffice.org/proposals/netinstall.html</a> in the installation project webpage.

For information on creating an automated <a href="http://installation.openoffice.org/01RESPONSE_SO52_final_rev2.pdf"> installation script</a> and create a response file.</p>

Building Localized Versions of OpenOffice.org

Running the configure script with the --with-lang option will introduce the build of additional language resources. This switch accepts one or more RFC 1766 language tags as arguments. Check the value of the completelangiso macro in $SRC_ROOT/solenv/inc/postset.mk for all the currently supported language tags.

Example:

./configure --with-lang="de fr

This enables the build of the localized German and French version.

The environment variable WITH_LANG will then contain the language tags of the additional (en-US will always be build) languages.

Building Localized Language Packs

If you build additional localized languages it is possible to generate Language Packs that contain only the changes needed to add the additional language to an OpenOffice.org of a different language.

The following commands will generate language packs languages that were specified with the --with-lang switch during the configure phase. Note that you can only build the language packs after you have build the complete office with all selected languages.

$SRC_ROOT> cd instsetoo_native/util; dmake ooolanguagepack

Tips

Note that using ccache can reduce your compile times and dramatically reduce recompile times.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools