BuildingLibreOffice

Building LibreOffice

This page discribes two ways to build LibreOffice on Ubuntu:

  • upstream developer build
  • packaging builds

The packaging build is not much different from any other Ubuntu/Debian Packaging. However, will need around 30GB of discspace and a lot of time for it as it comes with everything and the kitchen sink.

The upstream developer build has quite a few advantages:

  • it makes it easy to contribute patches upstream
  • it is smaller and thus builds quicker
  • it has fewer dependencies and thus is less fragile

Packaging build

A basic packaging build is done with these instuctions:

apt-get build-dep libreoffice
apt-get source libreoffice
cd libreoffice*
dpkg-buildpackage -uc -us

You will need about 30GB of discspace. The build takes about ~2.5 hours on my current notebook (i7-2720QM with 16GB RAM on a SSD with ccache).

It usually makes sense to use ccache:

apt-get install ccache
export CCACHE_DIR=${HOME}/.ccache_distro36
export DEB_BUILD_OPTIONS="ccache parallel=9"
export CCACHE_BASEDIR=`readlink -f .`
ccache -M10G

so repeated builds will not take that long.

Upstream developer build

To do a upstream developer build do:

apt-get install git && apt-get build-dep libreoffice
git clone git://anongit.freedesktop.org/libreoffice/core
cd core
./autogen.sh --disable-binfilter --disable-mozilla --without-help --without-myspell-dicts
make
make check

This will build the current (unstable) upstream master. Thats good if you want to contribute a patch or feature for the next stable major release as you can then directly push your patch (or submit it for review, however if you just want to debug an specific issue you might want to do so on a specific version of LibreOffice. To build LibreOffice 3.5.4 final release for example, do a:

git checkout libreoffice-3.5.4.2

after the clone (this will give you the rc2 = final of 3.5.4). An upstream developer build is much faster (~1-2 hours without ccache) since it leaves out l10n and lots of other stuff which is usually not needed for debugging or coding. Still ccache helps here too (~5-10 minutes on the same hardware):

apt-get install ccache
export CCACHE_DIR=${HOME}/.ccache_upstream
export CCACHE_BASEDIR=`readlink -f .`
ccache -M10G

for more information on building LibreOffice see upstream docs: http://wiki.documentfoundation.org/Development/Native_Build

BuildingLibreOffice (last edited 2012-10-18 21:26:04 by wirelessben)