Introduction to LibreOffice

LibreOffice is a full-featured office suite. It is largely compatible with Microsoft Office and is descended from

This package is known to build and work properly using an LFS-7.5 platform.

Package Information

Additional Downloads

LibreOffice Dependencies


Archive::Zip-1.37, UnZip-6.0, Wget-1.15, Which-2.20, and Zip-3.0




Most of these packages are recommended because if they're not installed, the build process will compile and install its own (often older) version.


Avahi-0.6.31, BlueZ-5.22, Doxygen-1.8.8 (not relevant if using --disable-odk), GDB-7.8, GTK+-3.12.2, kdelibs-4.14.0, libatomic_ops-7.4.2, MariaDB-10.0.13 or MySQL, MIT Kerberos V5-1.12.2, OpenJDK-, PostgreSQL-9.3.5, SANE-1.0.24, VLC-2.1.5, Cppunit, firebird, glew (OpenGL Extension Wrangler Library), Hunspell, Hyphen, libabw, libcdr, libcmis, libebook, libexttextcat, libfreehand, liblangtag, libmspub, libmwaw, libodfgen, librevenge (WordPerfect Document importer), libvisio, libwpd, libwpg, libwps, lp_solve, mdds, MyThes, ogl-math - OpenGL Mathematics (GLM), Orcus, VIGRA, and Zenity

There are many optional dependencies not listed here. They can be found in “download.lst” (source directory).

User Notes:

Installation of LibreOffice



Untaring the libreoffice- tarball as root has the curious effect of changing the ownership of the parent directory to a user with numerical id 11012 and with the permissions set to allow read, write and execute for that user only! If you untared as root in your home folder you could end up unable to log in again. If you untared it in /usr you would find your user account unable to access any file in /usr.

You can avoid this unpleasantness by not untaring it as root. If you must untar it as root pass the option --no-overwrite-dir to tar. This is the default when you untar as a user but has to be passed as an option when untaring as root:

tar -xf libreoffice- --no-overwrite-dir &&
cd libreoffice-

Unpack the dictionaries file and create symlinks to tarballs from the source directory so they won't get downloaded again (it is not necessary to unpack the help nor the translations tarballs):

install -dm755 external/tarballs &&

tar -xf ../libreoffice-dictionaries- --no-overwrite-dir --strip-components=1 &&

ln -sv ../../../libreoffice-dictionaries- \
       external/tarballs/ &&
ln -sv ../../../libreoffice-help- \

If you have downloaded the translations tarball, create a symlink:

ln -sv ../../libreoffice-translations- external/tarballs/


During the build process, some packages will be downloaded (including the ones listed as recommended and optional dependencies) if they are not present on the system. Doing so, build time may be different for everyone.

In the rest of the page, locales "en-US" and "pt-BR" are examples; you can change them to suit your needs - you might want to read the "Command Explanations", further below, before proceeding.

Due to the large size of the package, you may prefer to install it in /opt, instead of /usr. Depending on your choice, replace <PREFIX> by /usr or by /opt/libreoffice-


For i686 systems, fix a problem inroduced by gcc-4.9.0:

patch -Np1 -i ../libreoffice- &&

Prepare LibreOffice for compilation by running the following commands:

sed -e "/gzip -f/d"   \
    -e "s|.1.gz|.1|g" \
    -i bin/distro-install-desktop-integration        &&
sed -e "/distro-install-file-lists/d" -i &&

sed -e "/distro-install-file-lists/d"           \
    -e "s:fetch_Download_item:&_unchecked:" \
    -e "/fetch_Download_item/s:,no-check::"     \
   -i                                  &&

chmod -v +x bin/unpack-sources                     &&
sed -e "s/target\.mk/langlist\.mk/"                \
    -e "s/tar -xf/tar -x --strip-components=1 -f/" \
    -e "/tar -x/s/lo_src_dir/start_dir/"           \
    -i bin/unpack-sources                          &&

./ --prefix=$LO_PREFIX         \
             --sysconfdir=/etc           \
             --with-vendor="BLFS"        \
             --with-lang="en-US pt-BR"   \
             --with-help                 \
             --with-alloc=system         \
             --without-java              \
             --disable-gconf             \
             --disable-odk               \
             --disable-postgresql-sdbc   \
             --enable-release-build=yes  \
             --enable-python=system      \ 
             --with-system-clucene       \
             --with-system-cairo         \
             --with-system-curl          \
             --with-system-expat         \
             --with-system-graphite      \
             --with-system-harfbuzz      \
             --with-system-icu           \
             --with-system-jpeg          \
             --with-system-lcms2         \
             --with-system-libpng        \
             --with-system-libxml        \
             --with-system-mesa-headers  \
             --with-system-neon          \
             --with-system-npapi-headers \
             --with-system-nss           \
             --with-system-odbc          \
             --with-system-openldap      \
             --with-system-openssl       \
             --with-system-poppler       \
             --with-system-redland       \
             --with-system-zlib          \
             --with-parallelism=$(getconf _NPROCESSORS_ONLN)

The instructions below will only build the package without running any unit tests. If you prefer to run the unit tests, replace make build with make.

Build the package:

make build

Now, as the root user:

make distro-pack-install                                  &&
install -v -m755 -d $LO_PREFIX/share/appdata              &&
install -v -m644    sysui/desktop/appstream-appdata/*.xml \

If the dictionaries have been built, again as root user:

chown -cR 0:0 dictionaries/                                                        &&
mkdir -pv $LO_PREFIX/lib/libreoffice/share/extensions/dict-en                      &&
cp -vR dictionaries/en/*    $LO_PREFIX/lib/libreoffice/share/extensions/dict-en    &&
mkdir -pv $LO_PREFIX/lib/libreoffice/share/extensions/dict-pt-BR                   &&
cp -vR dictionaries/pt_BR/* $LO_PREFIX/lib/libreoffice/share/extensions/dict-pt-BR

If installed in /opt/libreoffice- and the icons in the new items of the desktop menu are not properly displayed, optionally run the following commands, as root user (it may be necessary to logout the session, before the icons appear):

mkdir -pv /usr/share/pixmaps &&
for i in writer base calc draw impress math startcenter writer
  ln -svf /opt/libreoffice-$i.png \
unset i

Command Explanations

sed -e ...: First sed prevents compression of the manual pages, the second one prevents a script that causes install to fail from running, the third one fixes the download location and the fourth one fixes the unpack script.

chmod -v +x ...: Fix the unpack script's permissions.

--with-vendor=BLFS: This switch sets BLFS as the vendor which is mentioned when you click "About" on the toolbar.

--with-lang="en-US pt-BR": This switch sets what languages to support. To list several languages, separate them with a space. For all languages, use --with-lang=ALL.



For a list of the available languages, you can uncompress the translations tarball, tar -xf ../libreoffice-translations- --no-overwrite-dir -C /tmp, and run ls /tmp/libreoffice-

--with-help: Without this switch, the help files are not built.

--with-alloc=system: This switch tells LibreOffice to use system allocator instead of the internal one.

--without-java: This switch disables Java support in LibreOffice.

--disable-gconf: This switch disables compiling LibreOffice with the deprecated GNOME configuration system support.

--disable-odk: This switch disables installing the office development kit. Remove if you want to develop a LibreOffice based application.

--disable-postgresql-sdbc: This switch disables compiling LibreOffice with the ability to connect to a PostgreSQL database. Remove it if you would like LibreOffice to be able to connect to a PostgreSQL database. If you have installed PostgreSQL on your system and would like LibreOffice to use that rather than compile its own copy, use the --with-system-postgresql switch.

--enable-release-build=yes: This switch enables a Release Build. LibreOffice can be built as a Release Build or as a Developer Build, because their default installation paths and user profile paths are different. Developer Build displays the words "Dev" and "Beta" in several places (e.g, menu and splash screen).

--enable-python=system: This switch tells LibreOffice to use installed Python 3 to build the translations instead of the bundled one. If you don't need to build any translations, you can use --disable-python instead.

--with-system-*: These switches prevent LibreOffice from trying to compile its own versions of these dependencies. If you've not installed some of the dependencies, remove the corresponding switches.

--with-parallelism=$(getconf _NPROCESSORS_ONLN): This switch tells LibreOffice to use all your CPUs to compile in parallel and speed up the build.

--disable-cups: Use this switch if you don't need printing support.

--disable-dbus: Use this switch if you've not installed D-Bus-1.8.0. It also disables Bluetooth support and font install via PackageKit.

--disable-gstreamer-0-10: Use this switch if you've not installed gst-plugins-base-0.10.36.

--enable-gstreamer: Use this switch if you want to use gst-plugins-base-1.4.0 instead of gst-plugins-base-0.10.36 for the avmedia module.

--enable-gtk3: Use this switch if you want to build the GTK+ 3 integration module.

--enable-kde4: Use this switch if you want to build the KDE integration module.


Installed Programs: libreoffice, lobase, localc, lodraw, loffice, lofromtemplate, loimpress, lomath, loweb, lowriter, soffice and unopkg; several programs under $LO_PREFIX/lib/libreoffice/program
Installed Libraries: several libraries under $LO_PREFIX/lib/libreoffice/{ure/lib,program}
Installed Directory: $LO_PREFIX/lib/libreoffice

Short Descriptions


is a database manager.


is a spreadsheet program.


is a vector graphics editor and diagramming tool.


can edit and display PowerPoint presentations.


is a mathematical formula editor.


is a word processor.


is a tool to manage LibreOffice extensions from the command line.

Last updated on 2014-08-29 11:34:30 +0000