Difference between revisions of "Documentation/Building Guide/Building on Linux"
B michaelsen (talk | contribs) m |
B michaelsen (talk | contribs) m (→See Also) |
||
Line 191: | Line 191: | ||
Now instead of using <code>--enable-build-mozilla</code>, use <code>--disable-build-mozilla</code> and copy the zips you created or downloaded to <code>moz/zipped</code> and these will be used when compiling. | Now instead of using <code>--enable-build-mozilla</code>, use <code>--disable-build-mozilla</code> and copy the zips you created or downloaded to <code>moz/zipped</code> 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). | This will greatly reduce build-time (you save the time that would otherwise be spent on compiling mozilla). | ||
− | + | ||
− | |||
= Footnotes = | = Footnotes = |
Revision as of 11:04, 19 July 2009
Building Guide
|
Introduction Getting the source |
Overview
Template:Documentation/Linux Template:Documentation/Note Template:Documentation/Tip
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
- gcc 4.2.3 is the current reference compiler
- The X11 development libraries and header files1.
- PAM including the development headers2.
- bash3.
- general polygon clipper library release 2.31
- gtk2 and libtiff including the development headers4.
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.
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 (optional)
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_ROOT
7:
dmake
The building procedure will take at least an hour (on a 3 GHz Quad-Core with 8GB RAM).
Partial Builds
There are two ways to do partial builds:
- compatible
- incompatible
Only do compatible partial builds if you know exactly what you are doing. Template:Documentation/Note
rebuilding from a module (incompatible build)
If you decide to change 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
rebuilding a module (compatible build)
To rebuild a module you can delete all output directories with, rebuild and redeliver into the solver with:
cd $MODULE build --from $MODULE --prepare build && deliver
A simple build
in $SRC_ROOT/instsetoo_native
will recreate the installation sets, provided all other modules have already been build.8
Building a 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 debug=true --from $MODULE
Drop the newly created binaries into an existing installation. Building an installation set with them will not help, as binaries are stripped on packing by default.
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 And Tricks
ccache
For Windows: download from here, do the following:
export CCACHE_DIR="some/place/with/space" ccache -M 2G -F 10000 export CCACHE_CPP2=TRUE export CXX="guw.pl ccache cl" # export USE_PCH= if you experience trouble with precompiled headers
dependencies
nodep
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. |
NO_HIDS
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.
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
parallelism on the directory level
export MAXPROCESS=<numer or processes>
This tells dmake how many targets it is allowed to build in parallel
parallelism on the module level
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 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 tomoz/download
- in
moz
rundmake zip
to create the zip files - you'll find the zips in
{platform}.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).
Footnotes
8build --all would rebuild changed/missing files. However, it does not check for incompatible modules. If unsure, use build --from --prepare .
|
9 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.
Note that you can only build the language packs after you have build the complete office with all selected languages. |
Content on this page is licensed under the Public Documentation License (PDL). |