Warning
Much of the information here is outdated and refers to obsolete OOo versions.
For current information on how to build OOo, see the OOo Wiki: Building Guide
Building OpenOffice.org 2.x (680er/300er series) under Linux under Solaris under Windows with tcsh under Windows with 4NT
Beware! The build instructions for OpenOffice.org 1.1.x (and older) are different!
Last changes made: $Date: 2010/06/08 16:09:13 $
This document describes the requirements and actions that you need to build
OpenOffice.org on
Commands you have to type on the keyboard follow this syntax throughout this document:
config_office> ./configure
In this example, the script configure
is executed
in the directory config_office
.
Since OpenOffice.org 2.1.x (SRC680_m175) it is possible to use bash instead
of tcsh. This has to be enabled with the --with-use-shell
configure switch.
The following instructions are for the tcsh case but the savy *NIX user should be able
to guess the needed changes. The environment file for bash adds an additional
.sh
suffix to the tcsh environment filename.
D:\my\source> winenv.bat
In this example, the script winenv.bat
is executed in the directory
D:\my\source
under a 4NT shell. Unless stated otherwise, all commands
appearing in this document should be entered from a 4NT shell (the exception
is the configure script which has to be run from a cygwin bash shell).
$SRC_ROOT
will denote the directory in which the source code
of OpenOffice.org is stored.
Table of Contents
- Overview
- Build Requirements
- Build Instructions
- Instructions to Build an Installation Set
- Building Localized Versions of OpenOffice.org
- Building Localized Language Packs
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 the Build Requirements section.
Even experienced builders are well advised to check the release notes at http://development.openoffice.org/releases/2.0.0rc2.html and the section Build Requirements in this document to inform yourself about changes since the previous releases.
Detailed step-by-step build descriptions are given from the next section on.
Overview of Performing a Full Build
To perform a full build, you need to follow these steps:
- Get the source code, either from the download webpage (http://download.openoffice.org/next) or alternatively via a check-out from the cvs tree against a release tag, e.g. OpenOffice_3_1_0.
- Run the
configure
script to check all requirements and to create the script - Run the
configure
script in a cygwin bash shell to check all requirements and to create the scriptwinenv.bat
. - Run the
- Source the
- Create the build tools using
bootstrap
. - Recompute tcsh's directory hash using
rehash
. - Build typing
dmake
in$SRC_ROOT
, orbuild --all
in theinstetoo_native
module, orbuild
followed bydeliver
in the individual modules.
LinuxIntelEnv.Set
.SolarisSparcEnv.Set
.winenv.set
.LinuxIntelEnv.Set
SolarisSparcEnv.Set
winenv.set
winenv.bat
(under 4NT) Please see the last screen from the configure script for more specific information on setting up for your platform.
Build Requirements
Before you start building, you must ensure that your system satisfies the
recommended software and hardware requirements for the type of system you
are working on. For
Get the source code
You have two options to get the source code:
-
Download the source code tarball
(http://download.openoffice.org/3.1.0/source.html),
e.g.
OOo_3.1.0_src_core.tar.gz
in case of the 3.1 stable release.Unpack the tarballs as follows:
> tar -xvzf OOo_3.1.0_src_core.tar.gz > cd OOO300m9
This will be $SRC_ROOT from now on. Please check the OpenOffice.org Wiki for more detailed information about the source tarballs.
-
Another possibility is to check out the code from the subversion tree.
The non-bold slash means that the command should be in one line. It is
possible to update an already existing older copy to a newer release:
$SRC_ROOT> svn / co svn://svn.services.openoffice.org/ooo/tags/OpenOffice_3_1_0 /
-
A note on the tags (i.e. the argument to the -r option in the cvs commands listed above): If trunk is used as a tag, you will get the newest latest source code. This, however, will most likely not build since development is going on there. See http://tools.openoffice.org#CWS for a description of the development process with child workspaces and Environment Information System for the current child workspaces and milestones.
Generating the Build Environment and Build Tools
The configure
script to check/prepare the build environment.
It checks that all software, hardware, and
system requirements for the build are satisfied, and creates a
configuration file called
LinuxIntelEnv.Set
SolarisSparcEnv.Set
winenv.set
Ideally, in keeping with the principles of open source, you would use an open source shell to build on a computer running a Win32 operating system. However, you decided to use a non-open source shell to build on a computer running a Win32 operating system: the 4NT command shell.
On the other hand, the bash
shell from the cygwin tools is needed to run
the configure
script which generates the build environment. The
configure
script checks that all software, hardware, and system
requirements for the build are satisfied, and it creates a configuration file
called winenv.bat
that sets all necessary
build environment variables and builds the dmake.exe
.
See the example below.
This configuration file is created in the
If you are running a compiler with a non-standard name or location
make sure that the environment variables CC and CXX point to your
c and c++ compiler. (This can also be used to to use To run the
Before running configure, make sure that all needed Programs are in the system path
or start configure with the appropriate command line switches.
The following should demonstrate in detail what steps have to be done to
set up the environment. For this examples we assume that
To run the
There are a number of options that you can use with the
The following should demonstrate in detail what steps have to be done to
set up the environment:
Run the configure script according to the following example. We
assume here that
Running the configure script could then look like the following (bold typed
text is what you enter):
Note the change in pathname notation. Since the cygwin bash
shell won't accept backslashes, paths have to be typed in a
cygwin bash notation which is
There are a number of further options that you can use with the
After running
To create the dmake make utility that is needed for the build of
OpenOffice.org type the following command:
Now source the configuration file which sets all environment variables:
Don't forget to run
afterwards.
After running SRC_ROOT
directory.
A top-level makefile script makefile.mk
bootstrap
from the config-office
directory SRC_ROOT
as well. This is due to technical reasons:
The SRC_ROOT
directory in the cvs tree can only hold directories.
On the other hand, the top-level makefile.mk
should logically be
placed in the top-level directory SRC_ROOT
. The cvs tree holds
these files in config_office
and configure
copies
them up.
ccache
to reduce your compile time.)
export CC=/your/path/to/gcc
export CXX=/your/path/to/g++
export CC=/your/path/to/cc
export CXX=/your/path/to/CC
configure
script, type the following command:
$SRC_ROOT> cd config_office
config_office> ./configure
C:\OOO300_m9
C:\j2sdk1.4.1_02
C:\PROGRA~1\MICROS~1.NET\Vc7
(or c:\Programme\Microsoft Visual Studio .NET 2003\Vc7
)
C:\PROGRA~1\MICROS~5
Other Shells - Example
You are able to enable the use of tcsh
with --with-use-shell=tcsh
or the use of bash with --with-use-shell=bash
.
configure
script, type the following command:
$SRC_ROOT> cd config_office
config_office> ./configure --with-cl-home="/cygdrive/c/Programme/Microsoft Visual Studio .NET 2003/Vc7"
--with-jdk-home=/cygdrive/c/j2sdk1.4.1_02 --with-use-shell=tcsh
configure
script. To display these options, type the following command:
config_office> ./configure --help
--with-use-shell=4nt
You should exit the bash shell. Now you can run the environment
settings file
C:\OOO300_m9
C:\j2sdk1.4.1_02
c:\Programme\Microsoft Visual Studio .NET 2003\Vc7
.
C:\unzip
(open a cygwin bash shell)
cd /cygdrive/c/OOO310_m11/config_office
./configure --with-cl-home="/cygdrive/c/Programme/Microsoft Visual Studio .NET 2003/Vc7" --with-jdk-home=/cygdrive/c/j2sdk1.4.1_02 --with-unzip-home=/cygdrive/c/unzip --with-use-shell=4nt
.
.
.
(some screen output here)
.
.
.
(more screen output here)
bash-2.02$ exit
winenv.bat
from your 4NT shell.
/cygdrive/c/path/to/file
,
instead of C:\path\to\file
. This may appear
confusing at the moment, but sticking to this notation will
work.
configure
script. To display these options, type
the following command:
config_office> bash configure --help
configure
, you have to continue in a tcsh shell:
$SRC_ROOT> tcsh
$SRC_ROOT> ./bootstrap
$SRC_ROOT> rehash
configure
you have to execute the
configuration file which sets all environment variables. The generated
file is called winenv.bat
.
If you experiment with the newest sources from the cvs-tree, mind that updates
to the configure process may not happen via updates of configure
(the script file) but via the files configure.in
and
set_soenv.in
. The configure script itself is created from
configure.in
using the
autoreconf
command. The perl script set_soenv is created when you
run configure from set_soenv.in.
If you need to modify or create a correct configure you would run commands
like the following:
$SRC_ROOT> cd config_office config_office> cvs update configure.in config_office> autoreconf
$SRC_ROOT> cd config_office config_office> cvs update configure.in get a bash shell config_office>bash autoconf exit the bash shell
configure
script. If you only use code from the
snapshot releases on the web, you don't need to be concerned about this.
Build Instructions
Building a Full Build of the Office Suite
Now you are ready to build OpenOffice.org. To build the entire suite, all you have to do (after having created the environment as described above) is to run dmake from the top-level directory. This may take several hours.$SRC_ROOT> dmake
If you wish to control the build more you can perform a build with local install sets or tarballs.
- instsetoo_native will create rpm's or the actual delivery package for your platform.
- instsetoo will create a single tar file containing the build however it is deprecated.
cd $SRC_ROOT cd instetoo_native build --all
To clean up a previous build you can delete all output directories with
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
The following table shows the time required to build on a system with a particular specification. You can use these details to estimate the time required to build on your system.
Architecture | Intel |
Processor | Pentium III |
Processor speed | 600 MHz |
RAM | 256 MB |
Hard disk | 4 GB IDE |
Time (for 1.x series) | ~12 h |
Note that using ccache can reduce your compile times and dramatically reduce recompile times.
Architecture | SPARC |
Model | Ultra 30 |
Processor speed | 300 MHz |
RAM | 512 MB |
Hard disk | 10000 RPM model |
Time (for SRC680_m74) | ~39 h |
Architecture | Intel |
Processor | Athlon XP1700 |
Processor speed | 1466 MHz |
RAM | 512 MB |
Hard Disk | 160 GB 7200 RPM IDE |
Time (for SRC680_m86) | ~17 h |
Building a Project with Debug Information
To rebuild a complete project with debug information, remove all object
files by removing the
unxlngi4.pro
unxsols3.pro
wntmsci10.pro
build
with the debug option set to true:
$SRC_ROOT/(module)> rm -rfunxlngi4.pro unxsols3.pro wntmsci10.pro $SRC_ROOT/(module)> build debug=true
Instructions to Build 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, please delete the local outpath first:
$SRC_ROOT/instsetoo_native> rm -rfunxlngi4.pro unxsols3.pro wntmsci10.pro
The English installation set will be located at
$SRC_ROOT/instsetoo_native/
.
Execute the setup
binary to install:
$SRC_ROOT> cd instsetoo_native/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 next section Building Localized Versions of OpenOffice.org).unxlngi4.pro unxsols3.pro wntmsci10.pro /OpenOffice/install/en-USen-US> ./setup en-US> setup.exe
For a network installation, use the -net
option to
setup
. Details on the network installation process
can be found at
http://installation.openoffice.org/proposals/netinstall.html
in the installation project webpage.
For information on creating an automated installation script and create a response file.
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, unfortunately not all languages are supported. Check the value
of the completelangiso
macro in $SRC_ROOT/solenv/inc/postset.mk
for all the currently supported language tags.
Example: --with-lang="de fr"
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