LibOCon Latinoamérica – Asunción 2019, July 19 – 20

A quick video inviting you to the LibreOffice Latin America Conference 2019! (English subtitles are available.) It will be held at the Facultad Politécnica de Universidad Nactional de Asunción (FPUNA) in Asunción, Paraguay on July 19th (Friday) and 20th (Sat). For more information about the conference please visit the website.

Please confirm that you want to play a YouTube video. By accepting, you will be accessing content from YouTube, a service provided by an external third party.

YouTube privacy policy

If you accept this notice, your choice will be saved and the page will refresh.

Start developing LibreOffice! Download the source code, and build on Linux

Please don’t use these instructions in practice – they become obsolete over time. Instead, follow the wiki article for building on Linux as well as the article on Linux Build Dependencies.

(This post was originally written in Hungarian by Adam Kovacs for his blog. Thanks Adam!)

In the previous part of this tutorial series, we showed how to register with Git and Gerrit, to prepare your setup for building LibreOffice and submitting patches.

Today, we describe the steps you need to download and compile the LibreOffice source code on Linux. You can, of course, modify the source code you have downloaded and, if you compile it, you can make sure your changes are working well after the compilation.

In this guide, we are using GNU/Linux distributions (typically Debian and Ubuntu-based distributions) with the apt package management frontend. Those who do not use these distributions need to run apt-get install and similar commands instead.

(Note: an internet connection is required during the compilation, after the build-nocheck command.)


Step 1: Install some required programs and packages

Open a terminal (In Ubuntu, Ctrl+Alt+t) and run this command:

sudo apt-get install git gstreamer1.0-libav libkrb5-dev nasm graphviz ccache

Then enter the password for your username. (If you do not have administrator privileges, you cannot do these steps.)


Step 2: Specify update manager sources

In the file /etc/apt/sources.list, add one of the following lines depending on your distribution:

  • Debian 9:
    deb-src http://http.debian.net/debian/ stretch main
  • Ubuntu 16.04:
    deb-src http://archive.ubuntu.com/ubuntu/ xenial main
  • Ubuntu 18.04:
    deb-src http://archive.ubuntu.com/ubuntu/ bionic main
  • Ubuntu 18.10:
    deb-src http://archive.ubuntu.com/ubuntu/ cosmic main
  • Ubuntu 19.04:
    deb-src http://archive.ubuntu.com/ubuntu/ disco main

You can edit the file using:

sudo nano /etc/apt/sources.list
sudo gedit /etc/apt/sources.list

In Nano, to exit and save: Ctrl+x, then y, then enter. The exact version and codename of the Linux distribution can be found by running the uname -a and lsb_release -a commands.


Step 3: Download available updates and build dependencies

Enter these commands to ensure you get the latest packages, and everything required to build LibreOffice from the source code:

sudo apt-get update
sudo apt-get build-dep libreoffice

Step 4: Download the LibreOffice source code

Create a new directory somewhere for LibreOffice. For example, in your own directory:

cd ~
mkdir libreoffice
cd libreoffice

Go to this directory and run this command there:

git clone git://gerrit.libreoffice.org/core libreoffice

Step 5: Setting up the autogen.input file

Create an autogen.input file in the LibreOffice directory, with this content:

--without-junit
--without-java
--without-help
--without-doxygen
--disable-odk
--enable-debug

You may also need these:

--without-krb5
--without-gssapi

If you still need some settings in autogen.input, you can use the ./autogen.sh –help command to list all possible settings.

Note: if you start compiling and miss any of these options, eg the –enable-debug line, and then add the missing line to autogen.input, the next compilation process will not replace the existing files. If you want the newly inserted line in autogen.input to be valid for the newer compilation, you must delete the results of the old compilation using the make clean command.


Step 6: Build the code

Run these commands:

./autogen.sh
make

If you would like to compile without unit tests (for example, if you don’t want to check that what you have changed in the source code will cause regressions), use the build-nocheck parameter instead:

make build-nocheck

Step 7: Run the new build

When the code is compiled, you can start it from the LibreOffice directory:

./instdir/program/soffice
./instdir/program/soffice --writer
./instdir/program/soffice --calc

At this point, a lot of information is written to the command line while running LibreOffice. We can turn them off like this:

SAL_LOG=-INFO instdir/program/soffice

Now only SAL_DEBUG type values will be written to the command line (if they are already placed in the code somewhere).

If you just want to convert a file (for example, to fix export errors), you can do so. The converted file is then created in the LibreOffice directory (it is therefore advisable not to place the files to be converted in the LibreOffice directory, to avoid confusing them with the files that have already been converted). For instance:

SAL_LOG=-INFO instdir/program/soffice --convert-to docx ../chart_borderline.docx

Additional information

When the compilation is finished, and we modify the contents of one of the source files, we will start the compilation again. But this will not compile the entire codebase from scratch (unless we run the make clean command), but it only compiles the files we modified, which is a significant time saving.

If we forget to include a setting in autogen.input, but the compilation has already been done, then it is not enough to add the setting and start the compilation again – we also need to run make clean before.

For example, if we compiled without –enable-debug, add –enable-debug to the autogen.input file, then run make clean, followed by make or make build-nocheck.

You can also compile specific modules of LibreOffice:

make sw

Or:

make sw.build

These are the names of the modules:

  • sw: Writer (formerly StarWriter)
  • sc: the spreadsheet (Calc)
  • sd: Impress and Draw
  • dbaccess: database manager (Base)
  • starmath: formula editor
  • oox: source code files for importing and exporting Office Open XML files (docx, xlsx, pptx, …)
  • chart2: source code files for managing charts

For more modules, see here.


Keep watching the blog for more guides and tips for LibreOffice development!

Announcing a new website: What can I do for LibreOffice!

Here at The Document Foundation, we’re always encouraging people to join our projects and community. Contributing to a well-known open source project is a great way to meet new people, have fun, build up skills and experience, and help to make the world a better place!

However, large FOSS projects can be daunting too. Our Get involved page aims to make the on-boarding process for newcomers easier, by breaking the process down into smaller steps, and we plan other improvements to that page.

But today, we’re announcing a new website targeted at potential contributors: What can I do for LibreOffice. This is inspired by What can I do for Mozilla, and much of the work was done by our awesome contributors from Albania – read their blog post about it here.

In “What can I do for LibreOffice”, visitors are asked what they’re interested in, and pointed to resources to get started. So instead of large web pages with walls of text, visitors can click around and find something that catches their eyes. The website source is on Gerrit if anyone has suggestions for updates or additions, and the site can be translated too.

Anyway, click here to check it out – and let us know what you think!

LibreOffice 6.3 on Linux, a statement

Following the availability of LibreOffice 6.3 Beta, there have been speculations about 32-bit compatibility based on a the missing 32-bit binaries for Linux.

We have prepared a short and a long statement to clarify the situation.

TL;DR

  1. The Document Foundation is ending the provision of 32-bit binaries, and NOT 32-bit compatibility as a whole.

  2. Distro vendors or anyone running a more current 32-bit Linux system can still create 32-bit versions of LibreOffice, as developers have not in any way removed 32-bit compatibility from the source code. Additionally, we are not removing any 32-bit builds that were previously created.

  3. Most Linux users are sourcing LibreOffice from their distro repositories, which are usually compiled against the distro’s version of the various external libraries. We do not anticipate distros dropping 32-bit LibreOffice packages.

  4. TDF does not anticipate the same decision happening for LibreOffice 32-bit binaries for Windows any time soon.

LONG

  1. During the last two years, the number of downloads of the 32-bit Linux distribution-neutral binaries provided by The Document Foundation have decreased to a very low number. Today, the time needed to compile, test, maintain and distribute those binaries is not worth the effort, based on current download numbers. So, TDF is ending the provision of 32-bit binaries, and NOT 32-bit compatibility as a whole.

  2. Today, 32-bit packages are very much the domain of specific Linux distros rather than a general user need. So, we are leaving them to distros, who will upstream fixes. Indeed, distro vendors or anyone running a more current 32-bit Linux system can still create 32-bit versions of LibreOffice, as developers have not in any way removed 32-bit compatibility from the source code. Additionally, TDF is not removing any 32-bit binaries that were previously created.

  3. Most Linux users are sourcing LibreOffice from their distro repositories, which are usually compiled against the distro’s version of the various external libraries. LibreOffice by itself ships a number of external components to avoid dependencies, while distros link against the versions of those components which are part of the distro anyway. TDF does not anticipate distros dropping 32-bit LibreOffice packages.

  4. The Document Foundation does not anticipate the same decision happening for Windows 32-bit binaries any time soon. Of course, if downloads of Windows 32-bit binaries from TDF mirror servers drop to the same very low number as Linux 32-bit packages, TDF will reconsider the situation.

Next C++ workshop: MSTs and Graph Implementations, 6 June at 18:00 UTC

Learn C++ features with the help of LibreOffice developers! We’re running regular workshops which focus on a specific topic, and are accompanied by a real-time IRC meeting. For the next one, the topic is MSTs and Graph Implementations. Start by watching this presentation:

Please confirm that you want to play a YouTube video. By accepting, you will be accessing content from YouTube, a service provided by an external third party.

YouTube privacy policy

If you accept this notice, your choice will be saved and the page will refresh.

And check out the suggested EasyHacks.

Then join us for a discussion via our #libreoffice-dev IRC channel. You can ask experienced LibreOffice developers questions, and learn more about the language. We look forward to meeting you!

Month of LibreOffice, May 2019: The winners!

At the beginning of May, we started a new Month of LibreOffice, celebrating contributions all across the project. Well, May has come to a close now, so how many people got sticker packs throughout the month? Check it out…

It’s the best Month of LibreOffice ever, beating the previous one by 10! So congratulations to everyone who won a sticker pack – and thanks so much for your contributions. It’s great to see such a passionate community helping to bring powerful, free and open source software to the world.

Now, how can you claim your sticker pack? Click the 355 above, and if you see your name (or username) on that page, get in touch! Email mike.saunders@documentfoundation.org with your name (or username) from the wiki page so that we can check, along with your postal address, and we’ll send you these:

(Note: your address will only be used to post the stickers, and will be deleted immediately afterwards.) If you contributed to the project in May but you’re not on the wiki page, please let us know so that we can add you!

But there is one more thing…

For this Month of LibreOffice, we have a special bonus: 12 sticker winners have also been selected at random to get an exclusive LibreOffice glass mug! It looks like this:

And here are the winners:

  • Dave Barton
  • DaeHyun Sung
  • ve3oat
  • @muvon (Mastodon)
  • Platterbaff
  • Oliver Brinzing
  • Adam Kovacs
  • Mihail Balabanov
  • @RonneyGey (Mastodon)
  • Olexandr Pylypchuk
  • Seda Stamboltsyan
  • Durgapriyanka

Congratulations to you all! We’ll be in touch with details for claiming your mugs…

So, the Month of LibreOffice has finished – but we plan to do another one in November, with another opportunity to get cool merchandise! And, of course, you can join our friendly community at any time and contribute back to the project. Cheers!