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

From Apache OpenOffice Wiki
Jump to: navigation, search
(update software requirments for Linux, remove glibc that is not longer encessary for AOO)
Line 19: Line 19:
 
* at least 10 GB free disk space
 
* at least 10 GB free disk space
  
== software requirements ==
+
== Software requirements ==
  
 
{{Template:Documentation/Tip|You can find distribution specific package lists in the [[:Category:Distribution-Specific_Build_Instructions|Distribution specific build instructions pages]].}}
 
{{Template:Documentation/Tip|You can find distribution specific package lists in the [[:Category:Distribution-Specific_Build_Instructions|Distribution specific build instructions pages]].}}
 
* glibc:
 
** for OOo<=3.1: 2.2.x or higher
 
** for OOo>3.1: 2.3.2 or higher
 
  
 
* C/C++ Compiler:
 
* C/C++ Compiler:

Revision as of 13:51, 6 December 2011

[[{{{PrevPage}}}|< Previous Page

]]

[[{{{NextPage}}}|Next Page
>]]


Overview

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 )
  • at least 10 GB free disk space

Software requirements

Template:Documentation/Tip

  • C/C++ Compiler:
    • gcc >= 3.3
    • gcc 4.2.3 is the current reference compiler
  • The X11 development libraries and header files⧼cite_reference_link⧽
  • PAM including the development headers⧼cite_reference_link⧽
  • bash.
  • gtk2 and libtiff including the development headers⧼cite_reference_link⧽

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:

./configure --disable-mozilla --without-junit --disable-odk

See the last information box in the configure script or Category:Distribution-Specific_Build_Instructions for more information for your platform.

Documentation caution.png Please check for any warnings emitted by the configure-script. The page OpenSolaris Build Instructions/Configure Errors may be helpful in debugging all the dependencies.

bootstrap

When configure finished successfully, run:

./bootstrap

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

setting the environment

When the configure script has been run successfully a file LinuxX86Env.Set.sh or LinuxX86-64Env.Set.sh was created⧼cite_reference_link⧽. Do this:

source LinuxX86Env.Set.sh

or

source LinuxX86-64Env.Set.sh

to set up the environment for the build⧼cite_reference_link⧽.

Template:Documentation/Note

starting the build

Build the software by typing the following in $SRC_ROOT⧼cite_reference_link⧽:

cd instsetoo_native && build --all

The building procedure will take at least an hour (on a 3 GHz Quad-Core with 8GB RAM without CCACHE).

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.⧼cite_reference_link⧽


Documentation caution.png This does not check for incompatible modules. If unsure, use an incompatible build (see above).


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.

Template:Documentation/Tip

Finding Installation Sets

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

Template:Documentation/Note

Tips And Tricks

ccache

export CCACHE_DIR="some/place/with/space"
ccache -M 2G -F 100000
export CXX="ccache g++"
export CC="ccache gcc"

dependencies

nodep

If you set the environment variable nodep to TRUE, then dependency information files are not created - the build finishes faster.

Documentation caution.png 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 (directory) level, the other one on the global level. The two levels of parallelism result from the two-step build procedure in the OOo build environment. The build script runs through all the directories it reads from the build.lst files in all modules and calls dmake for every directory.

parallelism on the global level

For parallelism on the global level, you have to run build from $SRC_ROOT>/instsetoo_native with the -P<number> switch, for example:

build -P2

This takes build how many dmake processes it is allowd to start in parallel.

parallelism on the directory level

export MAXPROCESS=<numer or processes> 

This tells dmake how many targets it is allowed to build in parallel. When you don't use build.pl but build a single directory (single makefile), you can achieve the same with

dmake -P2

combining both levels

If you want to have parallelism on both levels, you can call

build -P2 -- -P2

"--" is a special build.pl parameter that passes every further parameters to the dmake processes it starts.

Recommendation

Experience tells that using the doubled number of cores in your machine is a good choice, using more threads does not make a big difference, except if the combined option is chosen. So even on single core machines using two threads will speed up the build considerably.

create prebuilt mozilla

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 to moz/download
  • in moz run dmake 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).

See Also


⧼cite_references_prefix⧽ ⧼cite_references_link_one⧽ ⧼cite_references_link_one⧽ ⧼cite_references_link_one⧽ ⧼cite_references_link_one⧽ ⧼cite_references_link_one⧽ ⧼cite_references_link_one⧽ ⧼cite_references_link_one⧽ ⧼cite_references_link_one⧽ ⧼cite_references_suffix⧽

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