Difference between revisions of "Building OpenOffice.org"
m (Restore something that got lost) |
|||
Line 12: | Line 12: | ||
While not dependencies, it is strongly recommended to install (and configure) [http://ccache.samba.org/ ccache] - this will greatly reduce build time on subsequent builds. | While not dependencies, it is strongly recommended to install (and configure) [http://ccache.samba.org/ ccache] - this will greatly reduce build time on subsequent builds. | ||
+ | |||
+ | ==Different Platforms== | ||
+ | Some information for specific platforms is provided at [http://tools.openoffice.org#Build tools]. | ||
+ | |||
+ | Also for Mac OS X see [[MacOSXBuildInstructions]] and for GNU/Linux Sparc see [[GNULinuxSparcPorting]] | ||
= Building a Milestone = | = Building a Milestone = |
Revision as of 02:15, 13 August 2006
These are the instructions on how to build "vanilla" OpenOffice.org. Vanilla means: without tools like ooobuild that wrap the build-process. If you're using ooobuild, have a look at Building_with_ooobuild instead.
Contents
Compiling OpenOffice.org : the practice
Getting the sources
To not make these instructions longer than necessary, there is a dedicated page on how to get the source.
Dependencies
Of course you need to have some development libraries installed to build OpenOffice.org. The configure script will complain if something is missing. Until this guide lists the prerequisites, please have a look at http://tools.openoffice.org/
While not dependencies, it is strongly recommended to install (and configure) ccache - this will greatly reduce build time on subsequent builds.
Different Platforms
Some information for specific platforms is provided at tools.
Also for Mac OS X see MacOSXBuildInstructions and for GNU/Linux Sparc see GNULinuxSparcPorting
Building a Milestone
Running configure
The first step after getting the sources (and hopefully all prerequisites) is to run configure:
cd <SRC_ROOT> cd config_office ./configure
You will most likely have to tell configure where it finds some packages such as ant or tell it what java to use. Use
./configure --help
to get a list of valid options that you can use.
If you forgot to install some dependencies, the configure will remind you which one are lacking.
Special hint related to ant: Make sure to use an absolute path.
Bootstrapping
When configure ran fine (i.e. it did finish without any error or warnings), you can continue the build. Configure creates an environment file that you need to read into your shell. If you run bash, use
cd <SRC_ROOT> source LinuxIntelEnv.Set.sh
If you run a tcsh or similar, use
cd <SRC_ROOT> source LinuxIntelEnv.Set rehash
The last step before the real build is to build the buildtools that OOo uses. To do so, simply run
./bootstrap
in <SRC_ROOT>
Starting the real build
Now it is time for the real build Just type
dmake
in <SRC_ROOT> and then relax. Building OOo takes some time (approx 10-12 hours on standard desktop PC) so you can do other things in the meantime.
Building a CWS
In order to build a cws, you need to first checkout the milestone that the cws is based upon (see Getting the source above). After that, you have to update the modules included in the cws with the cvs tag of the CWS.
You can either use EIS to get information about what milestone is the base for the CWS (see the field "Milestone (current)") and what modules it includes (see the table "Modules & Files") - or you can use Tinderbox's tag-list to get this information.
Once you have collected the necessary information, you can run:
cd <SRC_ROOT> setenv CVSROOT ":pserver:anoncvs@anoncvs.services.openoffice.org:/cvs" cvs [optional cvs flags such as -z #] update -dP -r <cwstag> <module1> <module2> <moduleN>
Where
- SRC_ROOT is the top-level directory of your milestone-checkout
- cwstag is the cvs tag of the CWS. The tag is in the form cws_<main codeline>_<name of cws>, for example cws_src680_chart2mst3
Note: If you're using cvs using the ssh-tunnel, use ssh's compression rather than cvs compression - that gives better results
For example, you can issue :
cd src680-m172 setenv CVSROOT ":pserver:anoncvs@anoncvs.services.openoffice.org:/cvs" cvs -z3 update -dP -r cws_src680_chart2mst3 chart2/ offuh/
Tips and Tricks
Here are some tips that make your life easier or can accelerate the build
set nodep=TRUE
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.
set NO_HIDS=TRUE
Similar to the nodep variabnle, 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.
use 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
set maxprocess=<numer or processes>
This is the makefile-parallelism. This tells dmake how many targets it is allowed to build in parallel
running parallel build.pl
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 (the "official" ones can be obtained from tools.openoffice.org) 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
unxlngi#.pro/zipped
Copy them to a location of your liking.
Now instead of using --enable-build-mozilla
, just copy the zips you created 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)
saving diskscpace by linking to the solver only
Use "--dlv_switch -link" when running build to tell deliver to only link the files instead of copying them:
build --dlv_switch -link