Difference between revisions of "Documentation/Building Guide/Building on Linux"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Simplified Software Reqs)
(major refactoring)
Line 19: Line 19:
 
This document describes building OpenOffice.org on Linux.
 
This document describes building OpenOffice.org on Linux.
 
__TOC__
 
__TOC__
 
+
= Requirements =
 
== Hardware Requirements ==
 
== Hardware Requirements ==
  
Line 48: Line 48:
 
* gtk2 and libtiff including the development headers<sup>[[#Foot4|4]]</sup>.
 
* gtk2 and libtiff including the development headers<sup>[[#Foot4|4]]</sup>.
  
== Overview ==
+
== Cheatsheet ==
  
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]].
+
This section is meant as a reminder or checklist for those who have some experience in building OpenOffice.org.
  
 
You are advised to check the release notes for the release you are building to inform yourself about changes since previous releases.
 
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:
+
<code>$SRC_ROOT</code> will denote the directory in which the source code of OpenOffice.org is stored.
./configure
+
  
In this example, the script <CODE>configure</CODE> is executed.
+
== Full Builds ==
  
It is possible to use bash or tcsh as shell. This is enabled with the <CODE>--with-use-shell</CODE> 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 <CODE>.sh</CODE> suffix to the tcsh environment file.
+
To perform a full build, you need to follow these steps:
  
<CODE>$SRC_ROOT</CODE> will denote the directory in which the source code of OpenOffice.org is stored.
+
=== Configure ===
 +
* Run the <code>configure</code> script to check all requirements. Run the following command to view all possible options.
  
== Building a Full Build ==
+
./configure --help
  
To perform a full build, you need to follow these steps:
+
An example configure command (on Ubuntu 9.04 with as much libraries by the system used as possible):  
 +
./configure --with-use-shell=bash --with-system-libs \
 +
--without-system-jars --without-system-icu --without-system-agg \
 +
--without-system-lpsolve --without-system-mspack --disable-mozilla
  
* Run the <CODE>configure</CODE> script to check all requirements. Run the following command to view all possible options.
+
See the last information box in the configure script for more information for your platform.
./configure --help
+
  
When the configure script has been run the <CODE>LinuxIntelEnv.Set</CODE> is created.
+
{{Documentation/Caution| Please check for any warnings emitted by the configure-script.}}
  
* Source the <CODE>LinuxIntelEnv.Set</CODE> script to set all environment variables.
+
=== bootstrap ===
 +
When configure finished successfully, run:
  
If you use bash use:
+
  ./bootstrap
  source LinuxX86Env.Set.sh
+
  
If you use csh or tcsh use:
+
to create the dmake executable required to build OpenOffice.org.
source LinuxX86Env.Set
+
rehash
+
  
See the last information box in the configure script for more information for your platform.
+
=== Setting the enviroment ===
  
The last step before the real build is done is to build the buildtools that OpenOffice.org uses. To do so, run:
+
When the configure script has been run successfully a file <code>LinuxIntelEnv.Set.sh</code> was created<sup>[[#Foot5|5]]</sup>.
./bootstrap
+
Do this:
  
To have the build create a ready-to-be-run installation for testing purposes, set the following environment variables.
+
source LinuxX86Env.Set.sh
 +
 
 +
to set up the enviroment for the build.
 +
 
 +
=== configure to build a ready-to-run installation (optinal) ===
 +
To have the build create a ready-to-be-run installation for testing purposes, set the following environment variables<sup>[[#Foot6|6]]</sup>.
 
  export LOCALINSTALLDIR="/my/Destination/Dir"
 
  export LOCALINSTALLDIR="/my/Destination/Dir"
 
  export PKGFORMAT="installed"
 
  export PKGFORMAT="installed"
 +
If you do not set PKGFORMAT, native packages (.deb/.rpm) will be build.
  
Build the software by typing the following in <CODE>$SRC_ROOT</CODE>:
+
=== Starting the build ===
 +
Build the software by typing the following in <code>$SRC_ROOT</code><sup>[[#Foot7|7]]</sup>:
 
  dmake
 
  dmake
or
 
make
 
  
You can also run the following in the <CODE>instetoo_native</CODE> module:
+
The building procedure will take several hours.
build --all
+
  
You can also run the following in a specific module:
+
== Rebuilding a module ==
build
+
deliver
+
  
The building procedure will take several hours.
+
To rebuild a module you can delete all output directories with, rebuild and redeliver into the solver with:</p>
  
 +
cd $MODULE
 +
rm -rf unxlngi6.pro
 +
build && deliver
  
If you wish to control the build more you can perform a build with local
+
(The directory name might be slightly different: 64-bit Linux is unxlngx6.pro for example)
install sets. <code>instsetoo_native</code> will create rpm's or the actual delivery package for your platform.
+
  
cd $SRC_ROOT
+
== Partitial rebuild ==
cd instetoo_native
+
build --all
+
  
To clean up a previous build you can delete all output directories with</p>
+
If you decide to rebuild a module in an incompatible way, you will need to rebuild all modules depending on it (directly or indirectly)
rm -rf */unxlngi4.pro
+
  
If you decide to rebuild a module or build each module individually (mind dependencies!), you will have to use the <CODE>build</CODE> tool. A subsequent <CODE>deliver</CODE> will copy all created binaries, libraries etc. into the
+
cd $SRC_ROOT/instsetoo_native
solver tree:
+
build --from $INCOMPATIPLEMODULE --prepare
 +
build --from $INCOMPATIBLEMODULE
  
$SRC_ROOT/(module)&gt; build
+
The build process started with <code>build --all</code> in <code>$SRC_ROOT/instsetoo_native</code> will create an installation set in English. A simple <code>build</code> in <code>$SRC_ROOT/instsetoo_native</code> will also create the installation sets, provided all other modules are already built<sup>[[#Foot8|8]]</sup>.
$SRC_ROOT/(module)&gt; deliver
+
  
== Building a Project with Debug Information ==
+
== Building module with Debug Information ==
  
To rebuild a complete project with debug information follow the following instructions.
+
To rebuild a module with debug information and additional assertions and checks, run:
  
Remove all object files by removing the <CODE>unxlngi4.pro</CODE> directory.
+
cd $MODULE
  rm -rf */unxlngi4.pro
+
  build --from $MODULE --prepare # removes old output trees and solver
 +
build --from $MODULE
  
Then run <CODE>build</CODE> with the debug option set to true:
+
For details, see [[Debugging]]
  
$SRC_ROOT/(module)&gt; rm -rf unxlngi4.pro
+
== Finding Installation Sets ==
$SRC_ROOT/(module)&gt; build debug=true
+
  
== Building an Installation Set ==
+
The english installation set will be located at <code>$SRC_ROOT/instsetoo_native/unxlngi6.pro/OpenOffice/{deb,rpm,archive}/install/en-US/</code><sup>[[#Foot9|9]]</sup>.
  
The build process (started with a top-level <CODE>dmake</CODE> or <CODE>build --all</CODE> in <CODE>$SRC_ROOT/instsetoo_native</CODE>) will create an installation sets in English. A simple <CODE>build</CODE> in <CODE>$SRC_ROOT/instsetoo_native</CODE> will also create the installation sets, provided all other modules are
+
== Tips ==
already built.  
+
Note that using ccache can reduce your compile times and dramatically reduce recompile times.
  
If you have built an installation set earlier and want to re-build it, delete the local outpath first:
+
== Footnotes ==
$SRC_ROOT/instsetoo_native&gt; rm -rf unxlngi4.pro
+
<span id="Foot1"><sup>1</sup>Should be in place with most Linux distributions. Note the there are currently some issues with X version 4.3.</span>
  
The English installation set will be located at <CODE>$SRC_ROOT/instsetoo_native/unxlngi4.pro/OpenOffice/install/en-US</CODE>. Execute the <CODE>setup</CODE> binary to install:
+
<span id="Foot2"><sup>2</sup>PAM should be installed by default on most linux distributions. You should only need to add the development package.</span>
  
$SRC_ROOT&gt; cd instsetoo_native/unxlngi4.pro/OpenOffice/install/en-US
+
<span id="Foot3"><sup>3</sup>You can also (still?) use tcsh instead of bash, but bash is installed almost everywhere anyway. It is possible to use bash or tcsh as shell. This is switched with the <CODE>--with-use-shell</CODE> configure switch.
en-US&gt; ./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 [[#BuildingLocalized | Building Localized Versions of OpenOffice.org]].
+
<span id="Foot4"><sup>4</sup>Unless you disable the crash-reporter when running <CODE>./configure</CODE>.
  
For a network installation, use the <CODE>-net</CODE> option to <CODE>setup</CODE>. Details on the network installation process
+
<span id="Foot5"><sup>5</sup>When you want to use tcsh instead of bash, you will need to use the file <code>LinuxX86Env.Set</code> instead:
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.
+
source LinuxX86Env.Set
 +
rehash
 +
If you do not use tcsh, it is better to delete that file, as it will get in the way for tab-completion sooner or later.
 +
</span>
  
For information on creating an automated <a href="http://installation.openoffice.org/01RESPONSE_SO52_final_rev2.pdf">
+
<span id="Foot6"><sup>6</sup>Alternativly you can set:
installation script</a> and create a response file.</p>
+
export FORCE2ARCHIVE=true
 +
This will create a tarball that can easily be unpacked and run anywhere.
 +
</span>
  
== Building Localized Versions of OpenOffice.org ==
+
<span id="Foot7"><sup>7</sup>You can also run:
 +
make
 +
but GNU/make will just start dmake.
 +
You can also run the following in the <code>instetoo_native</code> module:
 +
build --all
 +
For details run:
 +
build --help
 +
</span>
  
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 <CODE>completelangiso</CODE> macro in <CODE>$SRC_ROOT/solenv/inc/postset.mk</CODE> for all the currently supported language tags.
+
<span id="Foot8"><sup>8</sup><code>build --all</code> Would rebuild changed/missing files.
 +
{{Documentation/Caution| However, it does not check for incompatible modules. If unsure, use <code>build --from --prepare</code>.}}
 +
</span>
 +
 
 +
<span id="Foot9"><sup>9</sup>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 [[#BuildingLocalized | 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 <code>completelangiso</code> macro in <code>$SRC_ROOT/solenv/inc/postset.mk</code> for all the currently supported language tags.
  
 
Example:
 
Example:
  ./configure --with-lang="de fr
+
 
 +
  ./configure --with-lang="de fr"
 +
 
 
This enables the build of the localized German and French version.
 
This enables the build of the localized German and French version.
  
The environment variable <CODE>WITH_LANG</CODE> will then contain the language tags of the additional (en-US will always be build)
+
The environment variable <code>WITH_LANG</code> will then contain the language tags of the additional (en-US will always be build)
 
languages.
 
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.
 
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
+
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.
with the --with-lang switch during the configure phase. Note that you can only build the
+
language packs <b>after</b> you have build the complete office with all selected
+
languages.
+
  
  $SRC_ROOT&gt; cd instsetoo_native/util; dmake ooolanguagepack
+
  cd $SRC_ROOT/instsetoo_native/util
 +
dmake ooolanguagepack
 +
</span>
  
== Tips ==
 
Note that using ccache can reduce your compile times and dramatically reduce recompile times.
 
 
== Footnotes ==
 
<span id="Foot1"><sup>1</sup>Should be in place with most Linux distributions. Note the there are currently some issues with X version 4.3.</span>
 
<span id="Foot2"><sup>2</sup>PAM should be installed by default on most linux distributions. You should only need to add the development package.</span>
 
<span id="Foot3"><sup>3</sup>You can also (still?) use tcsh instead of bash, but bash is installed almost everywhere anyway.
 
<span id="Foot4"><sup>4</sup>Unless you disable the crash-reporter when running ./configure.
 
 
{{PDL1}}
 
{{PDL1}}

Revision as of 00:25, 17 July 2009

Building Guide
Introduction

Getting the source
Basic Concepts
Build Requirements
Building on Windows
Building on Mac OS X
Building on Linux
Building on Solaris

This document describes building OpenOffice.org on Linux.

Requirements

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
    • gcc >= 3.3
    • current reference compiler gcc 4.2.3
  • The X11 development libraries and header files1.
  • PAM including the development headers2.
  • bash3.
  • gtk2 and libtiff including the development headers4.

Cheatsheet

This section is meant as a reminder or checklist for those who have some experience in building OpenOffice.org.

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

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

Full Builds

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

Configure

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

An example configure command (on Ubuntu 9.04 with as much libraries by the system used as possible):

./configure --with-use-shell=bash --with-system-libs \
--without-system-jars --without-system-icu --without-system-agg \
--without-system-lpsolve --without-system-mspack --disable-mozilla

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

Documentation caution.png Please check for any warnings emitted by the configure-script.

bootstrap

When configure finished successfully, run:

./bootstrap

to create the dmake executable required to build OpenOffice.org.

Setting the enviroment

When the configure script has been run successfully a file LinuxIntelEnv.Set.sh was created5. Do this:

source LinuxX86Env.Set.sh

to set up the enviroment for the build.

configure to build a ready-to-run installation (optinal)

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

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

If you do not set PKGFORMAT, native packages (.deb/.rpm) will be build.

Starting the build

Build the software by typing the following in $SRC_ROOT7:

dmake

The building procedure will take several hours.

Rebuilding a module

To rebuild a module you can delete all output directories with, rebuild and redeliver into the solver with:</p>

cd $MODULE
rm -rf unxlngi6.pro
build && deliver

(The directory name might be slightly different: 64-bit Linux is unxlngx6.pro for example)

Partitial rebuild

If you decide to rebuild a module in an incompatible way, you will need to rebuild all modules depending on it (directly or indirectly)

cd $SRC_ROOT/instsetoo_native
build --from $INCOMPATIPLEMODULE --prepare
build --from $INCOMPATIBLEMODULE

The build process started with build --all in $SRC_ROOT/instsetoo_native will create an installation set in English. A simple build in $SRC_ROOT/instsetoo_native will also create the installation sets, provided all other modules are already built8.

Building module with Debug Information

To rebuild a module with debug information and additional assertions and checks, run:

cd $MODULE
build --from $MODULE --prepare # removes old output trees and solver
build --from $MODULE

For details, see Debugging

Finding Installation Sets

The english installation set will be located at $SRC_ROOT/instsetoo_native/unxlngi6.pro/OpenOffice/{deb,rpm,archive}/install/en-US/9.

Tips

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

Footnotes

1Should be in place with most Linux distributions. Note the there are currently some issues with X version 4.3.

2PAM should be installed by default on most linux distributions. You should only need to add the development package.

3You can also (still?) use tcsh instead of bash, but bash is installed almost everywhere anyway. It is possible to use bash or tcsh as shell. This is switched with the --with-use-shell configure switch.

4Unless you disable the crash-reporter when running ./configure.

5When you want to use tcsh instead of bash, you will need to use the file LinuxX86Env.Set instead:

source LinuxX86Env.Set
rehash

If you do not use tcsh, it is better to delete that file, as it will get in the way for tab-completion sooner or later.

6Alternativly you can set:

export FORCE2ARCHIVE=true

This will create a tarball that can easily be unpacked and run anywhere.

7You can also run:

make

but GNU/make will just start dmake. You can also run the following in the instetoo_native module:

build --all

For details run:

build --help

8build --all Would rebuild changed/missing files.

Documentation caution.png However, it does not check for incompatible modules. If unsure, use build --from --prepare.

9The 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.

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.

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.

cd $SRC_ROOT/instsetoo_native/util
dmake ooolanguagepack

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



Personal tools