<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hmeyer</id>
	<title>Apache OpenOffice Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hmeyer"/>
	<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/wiki/Special:Contributions/Hmeyer"/>
	<updated>2026-11-23T15:23:44Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_Linux&amp;diff=140414</id>
		<title>Documentation/Building Guide/Building on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_Linux&amp;diff=140414"/>
		<updated>2009-09-15T20:59:56Z</updated>

		<summary type="html">&lt;p&gt;Hmeyer: /* Footnotes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Documentation/Building Guide TOC&lt;br /&gt;
|ShowNextPage=none&lt;br /&gt;
|ShowPrevPage=none&lt;br /&gt;
}}&lt;br /&gt;
{{DISPLAYTITLE:Building on Linux}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
= Overview =&lt;br /&gt;
{{Template:Documentation/Linux|This document describes building OpenOffice.org on Linux.}}&lt;br /&gt;
{{Template:Documentation/Note|&amp;lt;code&amp;gt;$SRC_ROOT&amp;lt;/code&amp;gt; will denote the directory in which the source code of OpenOffice.org is stored.}}&lt;br /&gt;
{{Template:Documentation/Tip|You are advised to check the release notes for the release you are building to inform yourself about changes since previous releases.}}&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
== hardware requirements ==&lt;br /&gt;
&lt;br /&gt;
* 1 or more reasonable fast CPUs, x-way CPU&amp;#039;s recommended.&lt;br /&gt;
&lt;br /&gt;
* 1 GB Ram ( 2 GB recommended )&lt;br /&gt;
&lt;br /&gt;
* at least 10 GB free disk space&lt;br /&gt;
&lt;br /&gt;
== software requirements ==&lt;br /&gt;
&lt;br /&gt;
* glibc:&lt;br /&gt;
** for OOo&amp;lt;=3.1: 2.2.x or higher&lt;br /&gt;
** for OOo&amp;gt;3.1: 2.3.2 or higher&lt;br /&gt;
&lt;br /&gt;
* C/C++ Compiler:&lt;br /&gt;
** gcc &amp;gt;= 3.3 &lt;br /&gt;
** gcc 4.2.3 is the current reference compiler &lt;br /&gt;
&lt;br /&gt;
* The X11 development libraries and header files&amp;lt;sup&amp;gt;[[#Foot1|1]]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* PAM including the development headers&amp;lt;sup&amp;gt;[[#Foot2|2]]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* bash&amp;lt;sup&amp;gt;[[#Foot3|3]]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* gtk2 and libtiff including the development headers&amp;lt;sup&amp;gt;[[#Foot4|4]]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Full Builds =&lt;br /&gt;
&lt;br /&gt;
To perform a full build, you need to follow these steps:&lt;br /&gt;
&lt;br /&gt;
== configure ==&lt;br /&gt;
* Run the &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; script to check all requirements. Run the following command to view all possible options.&lt;br /&gt;
&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
An example configure command (on Ubuntu 9.04 with as much libraries by the system used as possible): &lt;br /&gt;
 ./configure --with-use-shell=bash --with-system-libs \&lt;br /&gt;
 --without-system-jars --without-system-icu --without-system-agg \&lt;br /&gt;
 --without-system-lpsolve --without-system-mspack --disable-mozilla&lt;br /&gt;
&lt;br /&gt;
See the last information box in the configure script or &lt;br /&gt;
[[:Category:Distribution-Specific_Build_Instructions]] &lt;br /&gt;
for more information for your platform.&lt;br /&gt;
&lt;br /&gt;
{{Documentation/Caution| Please check for any warnings emitted by the configure-script.}}&lt;br /&gt;
&lt;br /&gt;
== bootstrap ==&lt;br /&gt;
When configure finished successfully, run:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
to create the dmake executable required to build OpenOffice.org.&lt;br /&gt;
&lt;br /&gt;
== setting the environment ==&lt;br /&gt;
&lt;br /&gt;
When the configure script has been run successfully a file &amp;lt;code&amp;gt;LinuxX86Env.Set.sh&amp;lt;/code&amp;gt; was created&amp;lt;sup&amp;gt;[[#Foot5|5]]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
Do this:&lt;br /&gt;
&lt;br /&gt;
 source LinuxX86Env.Set.sh&lt;br /&gt;
&lt;br /&gt;
to set up the environment for the build.&lt;br /&gt;
&lt;br /&gt;
== configure to build a ready-to-run installation (optional) ==&lt;br /&gt;
To have the build create a ready-to-be-run installation for testing purposes, set the following environment variables after sourcing the &amp;lt;code&amp;gt;LinuxX86Env.Set.sh&amp;lt;/code&amp;gt; file&amp;lt;sup&amp;gt;[[#Foot6|6]]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
 export LOCALINSTALLDIR=&amp;quot;/my/Destination/Dir&amp;quot;&lt;br /&gt;
 export PKGFORMAT=&amp;quot;installed&amp;quot;&lt;br /&gt;
If you do not set PKGFORMAT, native packages (.deb/.rpm) will be build.&lt;br /&gt;
&lt;br /&gt;
== starting the build ==&lt;br /&gt;
Build the software by typing the following in &amp;lt;code&amp;gt;$SRC_ROOT&amp;lt;/code&amp;gt;&amp;lt;sup&amp;gt;[[#Foot7|7]]&amp;lt;/sup&amp;gt;:&lt;br /&gt;
 dmake&lt;br /&gt;
&lt;br /&gt;
The building procedure will take at least an hour (on a 3 GHz Quad-Core with 8GB RAM).&lt;br /&gt;
&lt;br /&gt;
= Partial Builds =&lt;br /&gt;
There are two ways to do partial builds:&lt;br /&gt;
* compatible&lt;br /&gt;
* incompatible&lt;br /&gt;
Only do compatible partial builds if you know exactly what you are doing.&lt;br /&gt;
{{Documentation/Note|For more information, see [[Compatible Builds]].}}&lt;br /&gt;
== rebuilding from a module (incompatible build) ==&lt;br /&gt;
&lt;br /&gt;
If you decide to change a module in an incompatible way, you will need to rebuild all modules depending on it (directly or indirectly):&lt;br /&gt;
&lt;br /&gt;
 cd $SRC_ROOT/instsetoo_native&lt;br /&gt;
 build --from $INCOMPATIPLEMODULE --prepare&lt;br /&gt;
 build --from $INCOMPATIBLEMODULE&lt;br /&gt;
&lt;br /&gt;
== rebuilding a module (compatible build) ==&lt;br /&gt;
&lt;br /&gt;
To rebuild a module you can delete all output directories with, rebuild and redeliver into the solver with:&lt;br /&gt;
&lt;br /&gt;
 cd $MODULE&lt;br /&gt;
 build --from $MODULE --prepare&lt;br /&gt;
 build &amp;amp;&amp;amp; deliver&lt;br /&gt;
&lt;br /&gt;
A simple &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;$SRC_ROOT/instsetoo_native&amp;lt;/code&amp;gt; will recreate the installation sets, provided all other modules have already been build.&amp;lt;sup&amp;gt;[[#Foot8|8]]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Documentation/Caution|This does &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; check for incompatible modules. If unsure, use an incompatible build (see above).}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Building a Module with Debug Information =&lt;br /&gt;
&lt;br /&gt;
To rebuild a module with debug information and additional assertions and checks, run:&lt;br /&gt;
&lt;br /&gt;
 cd $MODULE&lt;br /&gt;
 build --from $MODULE --prepare # removes old output trees and solver&lt;br /&gt;
 build debug=true --from $MODULE&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
{{Template:Documentation/Tip|For details, see [[Debugging]].}}&lt;br /&gt;
&lt;br /&gt;
= Finding Installation Sets =&lt;br /&gt;
&lt;br /&gt;
The english installation set will be located at &amp;lt;code&amp;gt;$SRC_ROOT/instsetoo_native/unxlngi6.pro/OpenOffice/{deb,rpm,archive}/install/en-US/&amp;lt;/code&amp;gt;&amp;lt;sup&amp;gt;[[#Foot9|9]]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Template:Documentation/Note| For 64-bit Linux it is &amp;lt;code&amp;gt;unxlngx6.pro&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;unxlngi6.pro&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
= Tips And Tricks =&lt;br /&gt;
== ccache ==&lt;br /&gt;
For Windows: download from [http://artax.karlin.mff.cuni.cz/~kendy/ccache/ here], do the following:&lt;br /&gt;
&lt;br /&gt;
 export CCACHE_DIR=&amp;quot;some/place/with/space&amp;quot;&lt;br /&gt;
 ccache -M 2G -F 10000&lt;br /&gt;
 export CCACHE_CPP2=TRUE&lt;br /&gt;
 export CXX=&amp;quot;guw.pl ccache cl&amp;quot;&lt;br /&gt;
 # export USE_PCH=  if you experience trouble with precompiled headers&lt;br /&gt;
== dependencies ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;nodep&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If you set the environment variable &amp;lt;code&amp;gt;nodep&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;TRUE&amp;lt;/code&amp;gt;, then dependency information files are not created - the build finishes faster.&lt;br /&gt;
&lt;br /&gt;
{{Template:Documentation/Caution|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.}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NO_HIDS&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Similar to the &amp;lt;code&amp;gt;nodep&amp;lt;/code&amp;gt; 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&amp;#039;t need those.&lt;br /&gt;
&lt;br /&gt;
== parallel builds ==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;parallelism on the global level&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
For parallelism on the global level, you have to run build from &amp;lt;code&amp;gt;$SRC_ROOT&amp;gt;/instsetoo_native&amp;lt;/code&amp;gt; with the &amp;lt;code&amp;gt;-P&amp;lt;number&amp;gt;&amp;lt;/code&amp;gt; switch, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
build -P2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This takes build how many dmake processes it is allowd to start in parallel.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;parallelism on the directory level&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 export MAXPROCESS=&amp;lt;numer or processes&amp;gt; &lt;br /&gt;
&lt;br /&gt;
This tells dmake how many targets it is allowed to build in parallel. When you don&amp;#039;t use build.pl but build a single directory (single makefile), you can achieve the same with&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dmake -P2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;combining both levels&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If you want to have parallelism on both levels, you can call&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
build -P2 -- -P2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;--&amp;quot; is a special build.pl parameter that passes every further parameters to the dmake processes it starts.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Recommendation &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== create prebuilt mozilla ==&lt;br /&gt;
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).&lt;br /&gt;
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&amp;#039;t build yourself).&lt;br /&gt;
To do so:&lt;br /&gt;
&lt;br /&gt;
* build the &amp;lt;code&amp;gt;moz&amp;lt;/code&amp;gt; module from the mozilla sources&lt;br /&gt;
* use &amp;lt;code&amp;gt;--enable-build-mozilla&amp;lt;/code&amp;gt; when running configure and put the mozilla-source tarball to &amp;lt;code&amp;gt;moz/download&amp;lt;/code&amp;gt;&lt;br /&gt;
* in &amp;lt;code&amp;gt;moz&amp;lt;/code&amp;gt; run &amp;lt;code&amp;gt;dmake zip&amp;lt;/code&amp;gt; to create the zip files&lt;br /&gt;
* you&amp;#039;ll find the zips in &amp;lt;code&amp;gt;{platform}.pro/zipped&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy them to a location of your liking.&lt;br /&gt;
Now instead of using &amp;lt;code&amp;gt;--enable-build-mozilla&amp;lt;/code&amp;gt;, use &amp;lt;code&amp;gt;--disable-build-mozilla&amp;lt;/code&amp;gt; and copy the zips you created or downloaded to &amp;lt;code&amp;gt;moz/zipped&amp;lt;/code&amp;gt; and these will be used when compiling.&lt;br /&gt;
This will greatly reduce build-time (you save the time that would otherwise be spent on compiling mozilla).&lt;br /&gt;
= See Also =&lt;br /&gt;
* [[:Category:Distribution-Specific Build Instructions]]&lt;br /&gt;
* [[Prepared Build Images]]&lt;br /&gt;
&lt;br /&gt;
= Footnotes =&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot1&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; {{Template:Documentation/Note|Should be in place with most Linux distributions. Note the there are currently some issues with X version 4.3.}}&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot2&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; {{Template:Documentation/Note|PAM should be installed by default on most linux distributions. You should only need to add the development package.}}&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot3&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; {{Template:Documentation/Note|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 &amp;lt;CODE&amp;gt;--with-use-shell&amp;lt;/CODE&amp;gt; configure switch.}}&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot4&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt; {{Template:Documentation/Note|The gtk2, jpeg and tiff libraries are not required if you disable the crash-reporter when running &amp;lt;CODE&amp;gt;./configure&amp;lt;/CODE&amp;gt;.}}&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot5&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt; {{Template:Documentation/Note|When you want to use tcsh instead of bash, you will need to use the file &amp;lt;code&amp;gt;LinuxX86Env.Set&amp;lt;/code&amp;gt; instead:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; source LinuxX86Env.Set&lt;br /&gt;
 rehash&amp;lt;/pre&amp;gt;&lt;br /&gt;
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.}}&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot6&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt; {{Template:Documentation/Tip|Alternativly you can set:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export FORCE2ARCHIVE=true&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will create a tarball that can easily be unpacked and run anywhere.&amp;lt;br&amp;gt;&lt;br /&gt;
If you use tcsh instead of bash, you will need to use &amp;lt;CODE&amp;gt;setenv&amp;lt;/CODE&amp;gt; instead of &amp;lt;CODE&amp;gt;export&amp;lt;/CODE&amp;gt;}}&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot7&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt; {{Template:Documentation/Note|You can also run:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;make&amp;lt;/pre&amp;gt;&lt;br /&gt;
but GNU/make will just start dmake. You can also run the following in the &amp;lt;code&amp;gt;instetoo_native&amp;lt;/code&amp;gt; module:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;build --all&amp;lt;/pre&amp;gt;&lt;br /&gt;
For details run:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;build --help&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot8&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt; {{Documentation/Caution|&amp;lt;code&amp;gt;build --all&amp;lt;/code&amp;gt; would rebuild changed/missing files. However, it does not check for incompatible modules. If unsure, use &amp;lt;code&amp;gt;build --from --prepare&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot9&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt; 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 &amp;lt;tt&amp;gt;de&amp;lt;/tt&amp;gt; subdirectory. This scheme holds true for all localizations you may have chosen explicitly.&lt;br /&gt;
&lt;br /&gt;
{{Template:Documentation/Tip|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 &amp;lt;code&amp;gt;completelangiso&amp;lt;/code&amp;gt; macro in &amp;lt;code&amp;gt;$SRC_ROOT/solenv/inc/postset.mk&amp;lt;/code&amp;gt; for all the currently supported language tags.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --with-lang=&amp;quot;de fr&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
This enables the build of the localized German and French version. The environment variable &amp;lt;code&amp;gt;WITH_LANG&amp;lt;/code&amp;gt; will then contain the language tags of the additional (en-US will always be build)&lt;br /&gt;
languages.}}&lt;br /&gt;
&lt;br /&gt;
{{Template:Documentation/Note|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. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd $SRC_ROOT/instsetoo_native/util&lt;br /&gt;
dmake ooolanguagepack&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
{{Template:Documentation/Caution|Note that you can only build the language packs &amp;#039;&amp;#039;&amp;#039;after&amp;#039;&amp;#039;&amp;#039; you have build the complete office with all selected languages.}}&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{PDL1}}&lt;/div&gt;</summary>
		<author><name>Hmeyer</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_Linux&amp;diff=140411</id>
		<title>Documentation/Building Guide/Building on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_Linux&amp;diff=140411"/>
		<updated>2009-09-15T20:53:29Z</updated>

		<summary type="html">&lt;p&gt;Hmeyer: /* configure to build a ready-to-run installation (optional) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Documentation/Building Guide TOC&lt;br /&gt;
|ShowNextPage=none&lt;br /&gt;
|ShowPrevPage=none&lt;br /&gt;
}}&lt;br /&gt;
{{DISPLAYTITLE:Building on Linux}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
= Overview =&lt;br /&gt;
{{Template:Documentation/Linux|This document describes building OpenOffice.org on Linux.}}&lt;br /&gt;
{{Template:Documentation/Note|&amp;lt;code&amp;gt;$SRC_ROOT&amp;lt;/code&amp;gt; will denote the directory in which the source code of OpenOffice.org is stored.}}&lt;br /&gt;
{{Template:Documentation/Tip|You are advised to check the release notes for the release you are building to inform yourself about changes since previous releases.}}&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
== hardware requirements ==&lt;br /&gt;
&lt;br /&gt;
* 1 or more reasonable fast CPUs, x-way CPU&amp;#039;s recommended.&lt;br /&gt;
&lt;br /&gt;
* 1 GB Ram ( 2 GB recommended )&lt;br /&gt;
&lt;br /&gt;
* at least 10 GB free disk space&lt;br /&gt;
&lt;br /&gt;
== software requirements ==&lt;br /&gt;
&lt;br /&gt;
* glibc:&lt;br /&gt;
** for OOo&amp;lt;=3.1: 2.2.x or higher&lt;br /&gt;
** for OOo&amp;gt;3.1: 2.3.2 or higher&lt;br /&gt;
&lt;br /&gt;
* C/C++ Compiler:&lt;br /&gt;
** gcc &amp;gt;= 3.3 &lt;br /&gt;
** gcc 4.2.3 is the current reference compiler &lt;br /&gt;
&lt;br /&gt;
* The X11 development libraries and header files&amp;lt;sup&amp;gt;[[#Foot1|1]]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* PAM including the development headers&amp;lt;sup&amp;gt;[[#Foot2|2]]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* bash&amp;lt;sup&amp;gt;[[#Foot3|3]]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* gtk2 and libtiff including the development headers&amp;lt;sup&amp;gt;[[#Foot4|4]]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Full Builds =&lt;br /&gt;
&lt;br /&gt;
To perform a full build, you need to follow these steps:&lt;br /&gt;
&lt;br /&gt;
== configure ==&lt;br /&gt;
* Run the &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; script to check all requirements. Run the following command to view all possible options.&lt;br /&gt;
&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
An example configure command (on Ubuntu 9.04 with as much libraries by the system used as possible): &lt;br /&gt;
 ./configure --with-use-shell=bash --with-system-libs \&lt;br /&gt;
 --without-system-jars --without-system-icu --without-system-agg \&lt;br /&gt;
 --without-system-lpsolve --without-system-mspack --disable-mozilla&lt;br /&gt;
&lt;br /&gt;
See the last information box in the configure script or &lt;br /&gt;
[[:Category:Distribution-Specific_Build_Instructions]] &lt;br /&gt;
for more information for your platform.&lt;br /&gt;
&lt;br /&gt;
{{Documentation/Caution| Please check for any warnings emitted by the configure-script.}}&lt;br /&gt;
&lt;br /&gt;
== bootstrap ==&lt;br /&gt;
When configure finished successfully, run:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
to create the dmake executable required to build OpenOffice.org.&lt;br /&gt;
&lt;br /&gt;
== setting the environment ==&lt;br /&gt;
&lt;br /&gt;
When the configure script has been run successfully a file &amp;lt;code&amp;gt;LinuxX86Env.Set.sh&amp;lt;/code&amp;gt; was created&amp;lt;sup&amp;gt;[[#Foot5|5]]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
Do this:&lt;br /&gt;
&lt;br /&gt;
 source LinuxX86Env.Set.sh&lt;br /&gt;
&lt;br /&gt;
to set up the environment for the build.&lt;br /&gt;
&lt;br /&gt;
== configure to build a ready-to-run installation (optional) ==&lt;br /&gt;
To have the build create a ready-to-be-run installation for testing purposes, set the following environment variables after sourcing the &amp;lt;code&amp;gt;LinuxX86Env.Set.sh&amp;lt;/code&amp;gt; file&amp;lt;sup&amp;gt;[[#Foot6|6]]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
 export LOCALINSTALLDIR=&amp;quot;/my/Destination/Dir&amp;quot;&lt;br /&gt;
 export PKGFORMAT=&amp;quot;installed&amp;quot;&lt;br /&gt;
If you do not set PKGFORMAT, native packages (.deb/.rpm) will be build.&lt;br /&gt;
&lt;br /&gt;
== starting the build ==&lt;br /&gt;
Build the software by typing the following in &amp;lt;code&amp;gt;$SRC_ROOT&amp;lt;/code&amp;gt;&amp;lt;sup&amp;gt;[[#Foot7|7]]&amp;lt;/sup&amp;gt;:&lt;br /&gt;
 dmake&lt;br /&gt;
&lt;br /&gt;
The building procedure will take at least an hour (on a 3 GHz Quad-Core with 8GB RAM).&lt;br /&gt;
&lt;br /&gt;
= Partial Builds =&lt;br /&gt;
There are two ways to do partial builds:&lt;br /&gt;
* compatible&lt;br /&gt;
* incompatible&lt;br /&gt;
Only do compatible partial builds if you know exactly what you are doing.&lt;br /&gt;
{{Documentation/Note|For more information, see [[Compatible Builds]].}}&lt;br /&gt;
== rebuilding from a module (incompatible build) ==&lt;br /&gt;
&lt;br /&gt;
If you decide to change a module in an incompatible way, you will need to rebuild all modules depending on it (directly or indirectly):&lt;br /&gt;
&lt;br /&gt;
 cd $SRC_ROOT/instsetoo_native&lt;br /&gt;
 build --from $INCOMPATIPLEMODULE --prepare&lt;br /&gt;
 build --from $INCOMPATIBLEMODULE&lt;br /&gt;
&lt;br /&gt;
== rebuilding a module (compatible build) ==&lt;br /&gt;
&lt;br /&gt;
To rebuild a module you can delete all output directories with, rebuild and redeliver into the solver with:&lt;br /&gt;
&lt;br /&gt;
 cd $MODULE&lt;br /&gt;
 build --from $MODULE --prepare&lt;br /&gt;
 build &amp;amp;&amp;amp; deliver&lt;br /&gt;
&lt;br /&gt;
A simple &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;$SRC_ROOT/instsetoo_native&amp;lt;/code&amp;gt; will recreate the installation sets, provided all other modules have already been build.&amp;lt;sup&amp;gt;[[#Foot8|8]]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Documentation/Caution|This does &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; check for incompatible modules. If unsure, use an incompatible build (see above).}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Building a Module with Debug Information =&lt;br /&gt;
&lt;br /&gt;
To rebuild a module with debug information and additional assertions and checks, run:&lt;br /&gt;
&lt;br /&gt;
 cd $MODULE&lt;br /&gt;
 build --from $MODULE --prepare # removes old output trees and solver&lt;br /&gt;
 build debug=true --from $MODULE&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
{{Template:Documentation/Tip|For details, see [[Debugging]].}}&lt;br /&gt;
&lt;br /&gt;
= Finding Installation Sets =&lt;br /&gt;
&lt;br /&gt;
The english installation set will be located at &amp;lt;code&amp;gt;$SRC_ROOT/instsetoo_native/unxlngi6.pro/OpenOffice/{deb,rpm,archive}/install/en-US/&amp;lt;/code&amp;gt;&amp;lt;sup&amp;gt;[[#Foot9|9]]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Template:Documentation/Note| For 64-bit Linux it is &amp;lt;code&amp;gt;unxlngx6.pro&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;unxlngi6.pro&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
= Tips And Tricks =&lt;br /&gt;
== ccache ==&lt;br /&gt;
For Windows: download from [http://artax.karlin.mff.cuni.cz/~kendy/ccache/ here], do the following:&lt;br /&gt;
&lt;br /&gt;
 export CCACHE_DIR=&amp;quot;some/place/with/space&amp;quot;&lt;br /&gt;
 ccache -M 2G -F 10000&lt;br /&gt;
 export CCACHE_CPP2=TRUE&lt;br /&gt;
 export CXX=&amp;quot;guw.pl ccache cl&amp;quot;&lt;br /&gt;
 # export USE_PCH=  if you experience trouble with precompiled headers&lt;br /&gt;
== dependencies ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;nodep&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If you set the environment variable &amp;lt;code&amp;gt;nodep&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;TRUE&amp;lt;/code&amp;gt;, then dependency information files are not created - the build finishes faster.&lt;br /&gt;
&lt;br /&gt;
{{Template:Documentation/Caution|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.}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NO_HIDS&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Similar to the &amp;lt;code&amp;gt;nodep&amp;lt;/code&amp;gt; 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&amp;#039;t need those.&lt;br /&gt;
&lt;br /&gt;
== parallel builds ==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;parallelism on the global level&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
For parallelism on the global level, you have to run build from &amp;lt;code&amp;gt;$SRC_ROOT&amp;gt;/instsetoo_native&amp;lt;/code&amp;gt; with the &amp;lt;code&amp;gt;-P&amp;lt;number&amp;gt;&amp;lt;/code&amp;gt; switch, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
build -P2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This takes build how many dmake processes it is allowd to start in parallel.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;parallelism on the directory level&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 export MAXPROCESS=&amp;lt;numer or processes&amp;gt; &lt;br /&gt;
&lt;br /&gt;
This tells dmake how many targets it is allowed to build in parallel. When you don&amp;#039;t use build.pl but build a single directory (single makefile), you can achieve the same with&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dmake -P2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;combining both levels&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If you want to have parallelism on both levels, you can call&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
build -P2 -- -P2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;--&amp;quot; is a special build.pl parameter that passes every further parameters to the dmake processes it starts.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Recommendation &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== create prebuilt mozilla ==&lt;br /&gt;
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).&lt;br /&gt;
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&amp;#039;t build yourself).&lt;br /&gt;
To do so:&lt;br /&gt;
&lt;br /&gt;
* build the &amp;lt;code&amp;gt;moz&amp;lt;/code&amp;gt; module from the mozilla sources&lt;br /&gt;
* use &amp;lt;code&amp;gt;--enable-build-mozilla&amp;lt;/code&amp;gt; when running configure and put the mozilla-source tarball to &amp;lt;code&amp;gt;moz/download&amp;lt;/code&amp;gt;&lt;br /&gt;
* in &amp;lt;code&amp;gt;moz&amp;lt;/code&amp;gt; run &amp;lt;code&amp;gt;dmake zip&amp;lt;/code&amp;gt; to create the zip files&lt;br /&gt;
* you&amp;#039;ll find the zips in &amp;lt;code&amp;gt;{platform}.pro/zipped&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy them to a location of your liking.&lt;br /&gt;
Now instead of using &amp;lt;code&amp;gt;--enable-build-mozilla&amp;lt;/code&amp;gt;, use &amp;lt;code&amp;gt;--disable-build-mozilla&amp;lt;/code&amp;gt; and copy the zips you created or downloaded to &amp;lt;code&amp;gt;moz/zipped&amp;lt;/code&amp;gt; and these will be used when compiling.&lt;br /&gt;
This will greatly reduce build-time (you save the time that would otherwise be spent on compiling mozilla).&lt;br /&gt;
= See Also =&lt;br /&gt;
* [[:Category:Distribution-Specific Build Instructions]]&lt;br /&gt;
* [[Prepared Build Images]]&lt;br /&gt;
&lt;br /&gt;
= Footnotes =&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot1&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; {{Template:Documentation/Note|Should be in place with most Linux distributions. Note the there are currently some issues with X version 4.3.}}&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot2&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; {{Template:Documentation/Note|PAM should be installed by default on most linux distributions. You should only need to add the development package.}}&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot3&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; {{Template:Documentation/Note|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 &amp;lt;CODE&amp;gt;--with-use-shell&amp;lt;/CODE&amp;gt; configure switch.}}&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot4&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt; {{Template:Documentation/Note|The gtk2, jpeg and tiff libraries are not required if you disable the crash-reporter when running &amp;lt;CODE&amp;gt;./configure&amp;lt;/CODE&amp;gt;.}}&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot5&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt; {{Template:Documentation/Note|When you want to use tcsh instead of bash, you will need to use the file &amp;lt;code&amp;gt;LinuxX86Env.Set&amp;lt;/code&amp;gt; instead:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; source LinuxX86Env.Set&lt;br /&gt;
 rehash&amp;lt;/pre&amp;gt;&lt;br /&gt;
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.}}&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot6&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt; {{Template:Documentation/Tip|Alternativly you can set:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export FORCE2ARCHIVE=true&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will create a tarball that can easily be unpacked and run anywhere.}}&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot7&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt; {{Template:Documentation/Note|You can also run:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;make&amp;lt;/pre&amp;gt;&lt;br /&gt;
but GNU/make will just start dmake. You can also run the following in the &amp;lt;code&amp;gt;instetoo_native&amp;lt;/code&amp;gt; module:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;build --all&amp;lt;/pre&amp;gt;&lt;br /&gt;
For details run:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;build --help&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot8&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt; {{Documentation/Caution|&amp;lt;code&amp;gt;build --all&amp;lt;/code&amp;gt; would rebuild changed/missing files. However, it does not check for incompatible modules. If unsure, use &amp;lt;code&amp;gt;build --from --prepare&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot9&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt; 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 &amp;lt;tt&amp;gt;de&amp;lt;/tt&amp;gt; subdirectory. This scheme holds true for all localizations you may have chosen explicitly.&lt;br /&gt;
&lt;br /&gt;
{{Template:Documentation/Tip|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 &amp;lt;code&amp;gt;completelangiso&amp;lt;/code&amp;gt; macro in &amp;lt;code&amp;gt;$SRC_ROOT/solenv/inc/postset.mk&amp;lt;/code&amp;gt; for all the currently supported language tags.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --with-lang=&amp;quot;de fr&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
This enables the build of the localized German and French version. The environment variable &amp;lt;code&amp;gt;WITH_LANG&amp;lt;/code&amp;gt; will then contain the language tags of the additional (en-US will always be build)&lt;br /&gt;
languages.}}&lt;br /&gt;
&lt;br /&gt;
{{Template:Documentation/Note|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. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd $SRC_ROOT/instsetoo_native/util&lt;br /&gt;
dmake ooolanguagepack&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
{{Template:Documentation/Caution|Note that you can only build the language packs &amp;#039;&amp;#039;&amp;#039;after&amp;#039;&amp;#039;&amp;#039; you have build the complete office with all selected languages.}}&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{PDL1}}&lt;/div&gt;</summary>
		<author><name>Hmeyer</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_Linux&amp;diff=140410</id>
		<title>Documentation/Building Guide/Building on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Documentation/Building_Guide/Building_on_Linux&amp;diff=140410"/>
		<updated>2009-09-15T20:52:51Z</updated>

		<summary type="html">&lt;p&gt;Hmeyer: /* setting the environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Documentation/Building Guide TOC&lt;br /&gt;
|ShowNextPage=none&lt;br /&gt;
|ShowPrevPage=none&lt;br /&gt;
}}&lt;br /&gt;
{{DISPLAYTITLE:Building on Linux}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
= Overview =&lt;br /&gt;
{{Template:Documentation/Linux|This document describes building OpenOffice.org on Linux.}}&lt;br /&gt;
{{Template:Documentation/Note|&amp;lt;code&amp;gt;$SRC_ROOT&amp;lt;/code&amp;gt; will denote the directory in which the source code of OpenOffice.org is stored.}}&lt;br /&gt;
{{Template:Documentation/Tip|You are advised to check the release notes for the release you are building to inform yourself about changes since previous releases.}}&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
== hardware requirements ==&lt;br /&gt;
&lt;br /&gt;
* 1 or more reasonable fast CPUs, x-way CPU&amp;#039;s recommended.&lt;br /&gt;
&lt;br /&gt;
* 1 GB Ram ( 2 GB recommended )&lt;br /&gt;
&lt;br /&gt;
* at least 10 GB free disk space&lt;br /&gt;
&lt;br /&gt;
== software requirements ==&lt;br /&gt;
&lt;br /&gt;
* glibc:&lt;br /&gt;
** for OOo&amp;lt;=3.1: 2.2.x or higher&lt;br /&gt;
** for OOo&amp;gt;3.1: 2.3.2 or higher&lt;br /&gt;
&lt;br /&gt;
* C/C++ Compiler:&lt;br /&gt;
** gcc &amp;gt;= 3.3 &lt;br /&gt;
** gcc 4.2.3 is the current reference compiler &lt;br /&gt;
&lt;br /&gt;
* The X11 development libraries and header files&amp;lt;sup&amp;gt;[[#Foot1|1]]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* PAM including the development headers&amp;lt;sup&amp;gt;[[#Foot2|2]]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* bash&amp;lt;sup&amp;gt;[[#Foot3|3]]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* gtk2 and libtiff including the development headers&amp;lt;sup&amp;gt;[[#Foot4|4]]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Full Builds =&lt;br /&gt;
&lt;br /&gt;
To perform a full build, you need to follow these steps:&lt;br /&gt;
&lt;br /&gt;
== configure ==&lt;br /&gt;
* Run the &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; script to check all requirements. Run the following command to view all possible options.&lt;br /&gt;
&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
An example configure command (on Ubuntu 9.04 with as much libraries by the system used as possible): &lt;br /&gt;
 ./configure --with-use-shell=bash --with-system-libs \&lt;br /&gt;
 --without-system-jars --without-system-icu --without-system-agg \&lt;br /&gt;
 --without-system-lpsolve --without-system-mspack --disable-mozilla&lt;br /&gt;
&lt;br /&gt;
See the last information box in the configure script or &lt;br /&gt;
[[:Category:Distribution-Specific_Build_Instructions]] &lt;br /&gt;
for more information for your platform.&lt;br /&gt;
&lt;br /&gt;
{{Documentation/Caution| Please check for any warnings emitted by the configure-script.}}&lt;br /&gt;
&lt;br /&gt;
== bootstrap ==&lt;br /&gt;
When configure finished successfully, run:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
to create the dmake executable required to build OpenOffice.org.&lt;br /&gt;
&lt;br /&gt;
== setting the environment ==&lt;br /&gt;
&lt;br /&gt;
When the configure script has been run successfully a file &amp;lt;code&amp;gt;LinuxX86Env.Set.sh&amp;lt;/code&amp;gt; was created&amp;lt;sup&amp;gt;[[#Foot5|5]]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
Do this:&lt;br /&gt;
&lt;br /&gt;
 source LinuxX86Env.Set.sh&lt;br /&gt;
&lt;br /&gt;
to set up the environment for the build.&lt;br /&gt;
&lt;br /&gt;
== configure to build a ready-to-run installation (optional) ==&lt;br /&gt;
To have the build create a ready-to-be-run installation for testing purposes, set the following environment variables after sourcing the &amp;lt;code&amp;gt;LinuxIntelEnv.Set.sh&amp;lt;/code&amp;gt; file&amp;lt;sup&amp;gt;[[#Foot6|6]]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
 export LOCALINSTALLDIR=&amp;quot;/my/Destination/Dir&amp;quot;&lt;br /&gt;
 export PKGFORMAT=&amp;quot;installed&amp;quot;&lt;br /&gt;
If you do not set PKGFORMAT, native packages (.deb/.rpm) will be build.&lt;br /&gt;
&lt;br /&gt;
== starting the build ==&lt;br /&gt;
Build the software by typing the following in &amp;lt;code&amp;gt;$SRC_ROOT&amp;lt;/code&amp;gt;&amp;lt;sup&amp;gt;[[#Foot7|7]]&amp;lt;/sup&amp;gt;:&lt;br /&gt;
 dmake&lt;br /&gt;
&lt;br /&gt;
The building procedure will take at least an hour (on a 3 GHz Quad-Core with 8GB RAM).&lt;br /&gt;
&lt;br /&gt;
= Partial Builds =&lt;br /&gt;
There are two ways to do partial builds:&lt;br /&gt;
* compatible&lt;br /&gt;
* incompatible&lt;br /&gt;
Only do compatible partial builds if you know exactly what you are doing.&lt;br /&gt;
{{Documentation/Note|For more information, see [[Compatible Builds]].}}&lt;br /&gt;
== rebuilding from a module (incompatible build) ==&lt;br /&gt;
&lt;br /&gt;
If you decide to change a module in an incompatible way, you will need to rebuild all modules depending on it (directly or indirectly):&lt;br /&gt;
&lt;br /&gt;
 cd $SRC_ROOT/instsetoo_native&lt;br /&gt;
 build --from $INCOMPATIPLEMODULE --prepare&lt;br /&gt;
 build --from $INCOMPATIBLEMODULE&lt;br /&gt;
&lt;br /&gt;
== rebuilding a module (compatible build) ==&lt;br /&gt;
&lt;br /&gt;
To rebuild a module you can delete all output directories with, rebuild and redeliver into the solver with:&lt;br /&gt;
&lt;br /&gt;
 cd $MODULE&lt;br /&gt;
 build --from $MODULE --prepare&lt;br /&gt;
 build &amp;amp;&amp;amp; deliver&lt;br /&gt;
&lt;br /&gt;
A simple &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;$SRC_ROOT/instsetoo_native&amp;lt;/code&amp;gt; will recreate the installation sets, provided all other modules have already been build.&amp;lt;sup&amp;gt;[[#Foot8|8]]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Documentation/Caution|This does &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; check for incompatible modules. If unsure, use an incompatible build (see above).}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Building a Module with Debug Information =&lt;br /&gt;
&lt;br /&gt;
To rebuild a module with debug information and additional assertions and checks, run:&lt;br /&gt;
&lt;br /&gt;
 cd $MODULE&lt;br /&gt;
 build --from $MODULE --prepare # removes old output trees and solver&lt;br /&gt;
 build debug=true --from $MODULE&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
{{Template:Documentation/Tip|For details, see [[Debugging]].}}&lt;br /&gt;
&lt;br /&gt;
= Finding Installation Sets =&lt;br /&gt;
&lt;br /&gt;
The english installation set will be located at &amp;lt;code&amp;gt;$SRC_ROOT/instsetoo_native/unxlngi6.pro/OpenOffice/{deb,rpm,archive}/install/en-US/&amp;lt;/code&amp;gt;&amp;lt;sup&amp;gt;[[#Foot9|9]]&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Template:Documentation/Note| For 64-bit Linux it is &amp;lt;code&amp;gt;unxlngx6.pro&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;unxlngi6.pro&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
= Tips And Tricks =&lt;br /&gt;
== ccache ==&lt;br /&gt;
For Windows: download from [http://artax.karlin.mff.cuni.cz/~kendy/ccache/ here], do the following:&lt;br /&gt;
&lt;br /&gt;
 export CCACHE_DIR=&amp;quot;some/place/with/space&amp;quot;&lt;br /&gt;
 ccache -M 2G -F 10000&lt;br /&gt;
 export CCACHE_CPP2=TRUE&lt;br /&gt;
 export CXX=&amp;quot;guw.pl ccache cl&amp;quot;&lt;br /&gt;
 # export USE_PCH=  if you experience trouble with precompiled headers&lt;br /&gt;
== dependencies ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;nodep&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If you set the environment variable &amp;lt;code&amp;gt;nodep&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;TRUE&amp;lt;/code&amp;gt;, then dependency information files are not created - the build finishes faster.&lt;br /&gt;
&lt;br /&gt;
{{Template:Documentation/Caution|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.}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NO_HIDS&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Similar to the &amp;lt;code&amp;gt;nodep&amp;lt;/code&amp;gt; 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&amp;#039;t need those.&lt;br /&gt;
&lt;br /&gt;
== parallel builds ==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;parallelism on the global level&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
For parallelism on the global level, you have to run build from &amp;lt;code&amp;gt;$SRC_ROOT&amp;gt;/instsetoo_native&amp;lt;/code&amp;gt; with the &amp;lt;code&amp;gt;-P&amp;lt;number&amp;gt;&amp;lt;/code&amp;gt; switch, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
build -P2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This takes build how many dmake processes it is allowd to start in parallel.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;parallelism on the directory level&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 export MAXPROCESS=&amp;lt;numer or processes&amp;gt; &lt;br /&gt;
&lt;br /&gt;
This tells dmake how many targets it is allowed to build in parallel. When you don&amp;#039;t use build.pl but build a single directory (single makefile), you can achieve the same with&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dmake -P2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;combining both levels&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If you want to have parallelism on both levels, you can call&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
build -P2 -- -P2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;--&amp;quot; is a special build.pl parameter that passes every further parameters to the dmake processes it starts.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Recommendation &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== create prebuilt mozilla ==&lt;br /&gt;
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).&lt;br /&gt;
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&amp;#039;t build yourself).&lt;br /&gt;
To do so:&lt;br /&gt;
&lt;br /&gt;
* build the &amp;lt;code&amp;gt;moz&amp;lt;/code&amp;gt; module from the mozilla sources&lt;br /&gt;
* use &amp;lt;code&amp;gt;--enable-build-mozilla&amp;lt;/code&amp;gt; when running configure and put the mozilla-source tarball to &amp;lt;code&amp;gt;moz/download&amp;lt;/code&amp;gt;&lt;br /&gt;
* in &amp;lt;code&amp;gt;moz&amp;lt;/code&amp;gt; run &amp;lt;code&amp;gt;dmake zip&amp;lt;/code&amp;gt; to create the zip files&lt;br /&gt;
* you&amp;#039;ll find the zips in &amp;lt;code&amp;gt;{platform}.pro/zipped&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy them to a location of your liking.&lt;br /&gt;
Now instead of using &amp;lt;code&amp;gt;--enable-build-mozilla&amp;lt;/code&amp;gt;, use &amp;lt;code&amp;gt;--disable-build-mozilla&amp;lt;/code&amp;gt; and copy the zips you created or downloaded to &amp;lt;code&amp;gt;moz/zipped&amp;lt;/code&amp;gt; and these will be used when compiling.&lt;br /&gt;
This will greatly reduce build-time (you save the time that would otherwise be spent on compiling mozilla).&lt;br /&gt;
= See Also =&lt;br /&gt;
* [[:Category:Distribution-Specific Build Instructions]]&lt;br /&gt;
* [[Prepared Build Images]]&lt;br /&gt;
&lt;br /&gt;
= Footnotes =&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot1&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; {{Template:Documentation/Note|Should be in place with most Linux distributions. Note the there are currently some issues with X version 4.3.}}&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot2&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; {{Template:Documentation/Note|PAM should be installed by default on most linux distributions. You should only need to add the development package.}}&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot3&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; {{Template:Documentation/Note|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 &amp;lt;CODE&amp;gt;--with-use-shell&amp;lt;/CODE&amp;gt; configure switch.}}&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot4&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt; {{Template:Documentation/Note|The gtk2, jpeg and tiff libraries are not required if you disable the crash-reporter when running &amp;lt;CODE&amp;gt;./configure&amp;lt;/CODE&amp;gt;.}}&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot5&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt; {{Template:Documentation/Note|When you want to use tcsh instead of bash, you will need to use the file &amp;lt;code&amp;gt;LinuxX86Env.Set&amp;lt;/code&amp;gt; instead:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; source LinuxX86Env.Set&lt;br /&gt;
 rehash&amp;lt;/pre&amp;gt;&lt;br /&gt;
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.}}&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot6&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt; {{Template:Documentation/Tip|Alternativly you can set:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export FORCE2ARCHIVE=true&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will create a tarball that can easily be unpacked and run anywhere.}}&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot7&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt; {{Template:Documentation/Note|You can also run:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;make&amp;lt;/pre&amp;gt;&lt;br /&gt;
but GNU/make will just start dmake. You can also run the following in the &amp;lt;code&amp;gt;instetoo_native&amp;lt;/code&amp;gt; module:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;build --all&amp;lt;/pre&amp;gt;&lt;br /&gt;
For details run:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;build --help&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot8&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt; {{Documentation/Caution|&amp;lt;code&amp;gt;build --all&amp;lt;/code&amp;gt; would rebuild changed/missing files. However, it does not check for incompatible modules. If unsure, use &amp;lt;code&amp;gt;build --from --prepare&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Foot9&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt; 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 &amp;lt;tt&amp;gt;de&amp;lt;/tt&amp;gt; subdirectory. This scheme holds true for all localizations you may have chosen explicitly.&lt;br /&gt;
&lt;br /&gt;
{{Template:Documentation/Tip|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 &amp;lt;code&amp;gt;completelangiso&amp;lt;/code&amp;gt; macro in &amp;lt;code&amp;gt;$SRC_ROOT/solenv/inc/postset.mk&amp;lt;/code&amp;gt; for all the currently supported language tags.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --with-lang=&amp;quot;de fr&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
This enables the build of the localized German and French version. The environment variable &amp;lt;code&amp;gt;WITH_LANG&amp;lt;/code&amp;gt; will then contain the language tags of the additional (en-US will always be build)&lt;br /&gt;
languages.}}&lt;br /&gt;
&lt;br /&gt;
{{Template:Documentation/Note|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. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;cd $SRC_ROOT/instsetoo_native/util&lt;br /&gt;
dmake ooolanguagepack&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
{{Template:Documentation/Caution|Note that you can only build the language packs &amp;#039;&amp;#039;&amp;#039;after&amp;#039;&amp;#039;&amp;#039; you have build the complete office with all selected languages.}}&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{PDL1}}&lt;/div&gt;</summary>
		<author><name>Hmeyer</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Mercurial/Getting_Started&amp;diff=140210</id>
		<title>Mercurial/Getting Started</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Mercurial/Getting_Started&amp;diff=140210"/>
		<updated>2009-09-14T12:13:31Z</updated>

		<summary type="html">&lt;p&gt;Hmeyer: spelling, grammar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Mercurial]][[Category:SCM]]&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
This page aims to help cvs/svn users to get started with mercurial, without the need to dig in cyberspace for basic stuff.&lt;br /&gt;
If you have a tip or general remark to share, feel free to edit the page - It&amp;#039;s a wiki after all :-)&lt;br /&gt;
Especially if you see something wrong here, just correct it without asking for permission on the ML&lt;br /&gt;
&lt;br /&gt;
= The very basics: Mercurial is a DVCS =&lt;br /&gt;
Mercurial (hg) is a distributed version control system. This is a major difference compared to tools like CVS or subversion and that difference imposes a changed workflow compared to centralized version control systems.&lt;br /&gt;
&lt;br /&gt;
== Your checkout is a full repository ==&lt;br /&gt;
In a simplified view, every checkout is a full repository. You have history and version info for other branches in your local tree. So naturally such a checkout is rather big compared to a single-revision checkout done by cvs and svn. So you won&amp;#039;t checkout a full repo every time (unless you have bandwidth to waste and too much time on your hands :-)&lt;br /&gt;
Instead you will regularly update your local copy with the changes that were added to the repository and then &amp;quot;clone&amp;quot; (that&amp;#039;s the term used for a &amp;quot;checkout&amp;quot;) your local repository instead.&lt;br /&gt;
&lt;br /&gt;
== Your commits go to your local repository first ==&lt;br /&gt;
Another difference is that any change you commit will be done in your local copy only at first.&lt;br /&gt;
You can accumulate many different commits locally and need to &amp;quot;push&amp;quot; changes to the master to finally have them in the main repo/available for everyone.&lt;br /&gt;
&lt;br /&gt;
== There are no version numbers anymore ==&lt;br /&gt;
Because multiple persons can do local commits, have different &amp;quot;local master copies&amp;quot; (somebody else could have pushed a change to the master before that alters the file you change yourself), it is impossible to refer to a specific version of a file by a version number. What is version 23 of a file? The one in your local copy, that doesn&amp;#039;t exist on the master yet? Or version 23 of a file of another user that did commit the same file locally?&lt;br /&gt;
So instead of version numbers, specific versions are refered to using &amp;quot;changeset&amp;quot; identifiers. Think of it as checksums.&lt;br /&gt;
&lt;br /&gt;
= So how to use it then (aka: What commands do I have to type?) =&lt;br /&gt;
This section is meant to summarize (sometimes duplicate) the [http://www.selenic.com/mercurial/wiki/ Documentation in the Mercurial wiki] - If you already know those pages, you won&amp;#039;t find anything new here..&lt;br /&gt;
&lt;br /&gt;
== creating a local copy ==&lt;br /&gt;
Creating a local copy means to clone from the master - the URL for the [[Mercurial Pilot]] is http://hg.services.openoffice.org/hg/DEV300&lt;br /&gt;
 $ hg clone http://hg.services.openoffice.org/hg/DEV300 [target-directory]&lt;br /&gt;
If you know that you&amp;#039;ll only use this as basis for different local clones and don&amp;#039;t want it to create the actual source-files, then you can use&lt;br /&gt;
 $ hg clone -U http://hg.services.openoffice.org/hg/DEV300 OOo-tip_repo-only&lt;br /&gt;
This will create a repository-only version, i.e. you&amp;#039;ll get an (apparently) empty OOo-tip-repo-only directory that holds the history/changeset data only, but not the actual files. Saves some diskspace and lessens the risk of modifying the master you intended to keep pristine.&lt;br /&gt;
&lt;br /&gt;
== updating the local copy with new changes from the master ==&lt;br /&gt;
As mentioned above, doing a full clone every time would be a waste, so how to stay up-to-date then?&lt;br /&gt;
(Well, for working on a cws you don&amp;#039;t need this, only when you want &amp;quot;HEAD&amp;quot; (called &amp;quot;tip&amp;quot; in Mercurial) or when you want a local copy of a master that is not available locally)&lt;br /&gt;
&lt;br /&gt;
Updating means &amp;quot;pulling the new changes&amp;quot; from the master:&lt;br /&gt;
 $ cd DEV300 # change to the directory of your main clone&lt;br /&gt;
 $ hg pull http://hg.services.openoffice.org/hg/DEV300&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Caveat&amp;#039;&amp;#039;&amp;#039;: While this grabs all the changes that were done on the master since the last checkout, it will *not* automatically update the source-code files on your disk. It basically only gets the history and changesets.&lt;br /&gt;
This is of course no biggie if you use a repo-only master anyway - but if you want local source-files to reflect the newest changes, you need to do an update of your tree:&lt;br /&gt;
 $ hg update&lt;br /&gt;
Since pulling the newest changes and updating to those changes is rather common, you can use the -u switch to the pull command to do both in one go:&lt;br /&gt;
 # alternative to separate pull and update&lt;br /&gt;
 $ hg pull -u http://hg.services.openoffice.org/hg/DEV300&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note&amp;#039;&amp;#039;&amp;#039;: the URL is optional in all of the above commands - if omitted, it will just use the URL that was used to clone the repo&lt;br /&gt;
&lt;br /&gt;
== cloning from the local repo to create a working copy ==&lt;br /&gt;
It is easier to keep a pristine copy of the sources as a base for new work, than to clean up an already modified repo, especially when you&amp;#039;re not familiar with the tools yet :-) - so to create a working playground for your real work, clone from your local main-clone:&lt;br /&gt;
 $ hg clone -U DEV300 target-dir # where DEV300 is your main-checkout&lt;br /&gt;
 $ hg --cwd target-dir update DEV300_m46 # same as &amp;quot;cd target-dir &amp;amp;&amp;amp; hg update -r DEV300_m46&amp;quot; &lt;br /&gt;
This is much faster than to use &amp;quot;hg clone -r DEV300_m46 DEV300 target-dir&amp;quot; and preserves future revisions in the target-clone.&lt;br /&gt;
It is much faster because the clone without revision uses hardlinks, creates a full-featured copy of the main-checkout very fast (plain copy). The subsequent update command (hg --cwd target-dir update DEV300_m46) creates the files that match the DEV300_m46 tag.&lt;br /&gt;
The clone with revision creates a DEV300_m46 straight ahead, but uses a different method called &amp;quot;pull protocol&amp;quot;. It needs to analyze the full history and changesets to isolate those that are included in DEV300_m46 and throws away everything that was added after DEV300_m46 and is much slower (and needs more diskspace)&lt;br /&gt;
&lt;br /&gt;
== show me the differences ==&lt;br /&gt;
== committing stuff ==&lt;br /&gt;
=== pushing changes ===&lt;br /&gt;
== what about merging ==&lt;/div&gt;</summary>
		<author><name>Hmeyer</name></author>
	</entry>
</feed>