LibreOffice (Development)

A good starting point is Developer Central.

This section is about LibreOffice but is not concerned with using it but how to develop it, or in other words make changes to LibreOffice and fix bugs. At this stage the notes here are rough and mostly concerned with getting a development environment for LibreOffice built.

The following steps, are what I have done:

  • Install openSUSE 13.1 with KDE desktop
  • Disk Partitions: uncheck "Propose Separate Home Partition (just to keep all space in one place)
  • Software: remove "Office Software" and "Games"
  • Software: add "KDevelop4" under "Development -> IDE"
  • Complete Installation
  • Run all system updates, which includes scanning for them
  • sudo zypper ar http://download.opensuse.org/repositories/LibreOffice:/Unstable/openSUSE_13.1/LibreOffice:Unstable.repo - this adds the correct repository
  • sudo zypper si -d libreoffice (this should mean some of following not needed
  • Install git, ccache, automake, cups-devel, ccache is the compiled code cache which speeds subsequent builds
  • git clone git://anongit.freedesktop.org/libreoffice/core libreoffice
  • cd ./libreoffice
  • ccache --max-size 32G
  • ./autogen.sh
  • ./autogen.sh --enable-dbgutil
  • make - this took about 6 hours in a VM
  • ./instdir/program/soffice - tada!
  • make kdevelop-ide-integration - needs Python 3 on the path
  • make
  • Start KDevelop
  • Select "Open Project" and navigate to a makefile, for example in ./libreoffice/sd
  • Watch the progress bar in the bottom right, this needs to finish!
Note that I installed the standard openSUSE Python3 to get the step that needs it to work, I selected two packages "python3" and "python3-devel" as the headers are needed.

Recently I have had issues building with GStreamer 1.0, however knowing that GStreamer 0.10 worked previously I have found that the following two AutoGen options have helped to either disable GStreamer completely or revert back to GStreamer 0.10.
./autogen.sh --disable-gstreamer
./autogen.sh --disable-gstreamer --enable-gstreamer-0_10

However, a better solution is to install GStreamer 1.0, so use Apper Software Management and carefully pick the items with a 1.0 version number, then it will work.

After the first build

Once you have a build done you are ready to try your first update, or you might just want to poke around. However LibreOffice Easy Hacks - The Document Foundation Wiki is a good place to start to contribute.

Refresh from git

Change into your libreoffice directory and do git pull -r, after which you will need to do make build. There is also git reset --hard, which I have not tried but will get a clean git state if you have nothing to commit.

Useful Links

The official starting point is Source Code | LibreOffice - Free Office Suite - Fun Project - Fantastic People from where all the fun begins! If you need more detail or help then Building LibreOffice on Linux: Tips and Tricks - The Document Foundation Wiki is the real starting point.

Investigate