LibreOffice-6.3.0

#### Beyond Linux® From Scratch (systemd Edition) - Version 9.0

### Chapter 39. Office Programs

- Prev

  Gnumeric-1.12.45

- Next

  Graphical Web Browsers

- Up
- Home

# LibreOffice-6.3.0

## Introduction to LibreOffice

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

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

### Package Information

- Core Download: http://download.documentfoundation.org/libreoffice/src/6.3.0/libreoffice-6.3.0.4.tar.xz

- Core Download MD5 sum: d24bd7e5116743196c67e7df4b18458f

- Core Download size: 215 MB

- Estimated disk space required: 8.7 GB (821 MB installed). Installing the whole set of languages was previously reported to require up to 26 GB (2.9 GB installed)

- Estimated build time: 60 SBU with parallelism=4 including typical download time

### Additional Downloads

- Dictionaries: http://download.documentfoundation.org/libreoffice/src/6.3.0/libreoffice-dictionaries-6.3.0.4.tar.xz

- Dictionaries MD5 sum: 81df66dd522a2c56a4f11b24247fb114

- Dictionaries size: 44 MB

- Help Files: http://download.documentfoundation.org/libreoffice/src/6.3.0/libreoffice-help-6.3.0.4.tar.xz

- Help Files MD5 sum: 483f654eaa94f17c462494029d42334a

- Help Files size: 13 MB

- Translations: http://download.documentfoundation.org/libreoffice/src/6.3.0/libreoffice-translations-6.3.0.4.tar.xz

- Translations MD5 sum: 21459291d488ecd7e4e8fb0fdcc55aca

- Translations size: 140 MB

### LibreOffice Dependencies

#### Required

Archive-Zip-1.64, UnZip-6.0, Wget-1.20.3, Which-2.21, and Zip-3.0

#### Recommended

### Note

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

apache-ant-1.10.6, Apr-1.7.0, Boost-1.70.0, CLucene-2.3.3.4, Cups-2.2.12, cURL-7.65.3, dbus-glib-0.110, libjpeg-turbo-2.0.2, GLM-0.9.9.5, GLU-9.0.1, GPGME-1.13.1, Graphite2-1.3.13, gst-plugins-base-1.16.0, GTK+-3.24.10 and GTK+-2.24.32 (see “Command Explanations”), HarfBuzz-2.6.0, ICU-64.2, libatomic_ops-7.6.10, Little CMS-2.9, librsvg-2.44.14, libxml2-2.9.9 and libxslt-1.1.33, lxml-4.4.1, Mesa-19.1.4, neon-0.30.2, NSS-3.45, OpenLDAP-2.4.48 (if connecting to an LDAP server), Poppler-0.79.0, PostgreSQL-11.5, Redland-1.0.17, Serf-1.3.9, and unixODBC-2.3.7

#### Optional

Avahi-0.7, BlueZ-5.50, DConf-0.32.0, desktop-file-utils-0.24, Doxygen-1.8.16 (not relevant if using --disable-odk), evolution-data-server-3.32.4, GDB-8.3, GnuTLS-3.6.9, KDE Frameworks-5.61.0, libpaper-1.1.24+nmu5, MariaDB-10.4.7 or MySQL, MIT Kerberos V5-1.17, NASM-2.14.02, SANE-1.0.27, telepathy-glib-0.24.1, Valgrind-3.15.0, VLC-3.0.8, Zenity-3.32.0, Apache Commons Codec, Apache Commons HttpClient, Apache Commons Lang, Apache Commons Logging, BeanShell, CoinMP, Cppunit, Firebird, glyphy, Gnome VFS, hamcrest, Hunspell, Hyphen, iwyu, libabw, libcdr, libcmis, libebook, libexttextcat, libfreehand, liblangtag, libmspub, libmwaw, libodfgen, libpagemaker, librevenge (WordPerfect Document importer), libvisio, libwpd, libwpg, libwps, lp_solve, mdds, MyThes, OpenCOLLADA, Orcus, and VIGRA

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

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/libreoffice

## Installation of LibreOffice

### Important

Unlike the other packages, we assume that you have not yet unpacked the package. This is because the `--no-overwrite-dir` switch is needed in case you unpack as the `root` user.

    tar -xf libreoffice-6.3.0.4.tar.xz --no-overwrite-dir &&
    cd libreoffice-6.3.0.4

Create symlinks to tarballs from the source directory so they won't get downloaded again:

    install -dm755 external/tarballs &&
    ln -sv ../../../libreoffice-dictionaries-6.3.0.4.tar.xz external/tarballs/ &&
    ln -sv ../../../libreoffice-help-6.3.0.4.tar.xz         external/tarballs/

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

    ln -sv ../../../libreoffice-translations-6.3.0.4.tar.xz external/tarballs/

### Note

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. Because of this, build time may vary from the published time more than usual.

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-6.3.0.4`:

    export LO_PREFIX=<PREFIX>

Locales "fr" and "en-GB", you will find below, are just examples; you should change them to suit your needs - you might want to read the "Command Explanations", further below, before proceeding.

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 Makefile.in &&

    sed -e '/JAVA_SOURCE_VER/s/6/7/' \
        -e '/JAVA_TARGET_VER/s/6/7/' \
        -i configure.ac

    ./autogen.sh --prefix=$LO_PREFIX         \
                 --sysconfdir=/etc           \
                 --with-vendor=BLFS          \
                 --with-lang='fr en-GB'      \
                 --with-help                 \
                 --with-myspell-dicts        \
                 --without-junit             \
                 --without-system-dicts      \
                 --disable-dconf             \
                 -disable-gtk -enable-gtk3   \
                 --disable-odk               \
                 --enable-release-build=yes  \
                 --enable-python=system      \
                 --with-jdk-home=/opt/jdk    \
                 --with-system-apr           \
                 --with-system-boost         \
                 --with-system-clucene       \
                 --with-system-curl          \
                 --with-system-epoxy         \
                 --with-system-expat         \
                 --with-system-glm           \
                 --with-system-gpgmepp       \
                 --with-system-graphite      \
                 --with-system-harfbuzz      \
                 --with-system-icu           \
                 --with-system-jpeg          \
                 --with-system-lcms2         \
                 --with-system-libatomic_ops \
                 --with-system-libpng        \
                 --with-system-libxml        \
                 --with-system-neon          \
                 --with-system-nss           \
                 --with-system-odbc          \
                 --with-system-openldap      \
                 --with-system-openssl       \
                 --with-system-poppler       \
                 --with-system-postgresql    \
                 --with-system-redland       \
                 --with-system-serf          \
                 --with-system-zlib

The instructions below will only build the package without running any unit tests. If you prefer to run the unit tests, replace make build-nocheck with make build or (as a regular user only) just make, but do not be surprised if a unit test fails right at the end of the build and breaks it.

Build the package:

    make build-nocheck

Now, as the `root` user:

    make distro-pack-install

If installed in `/opt/libreoffice-6.3.0.4` some additional steps are necessary. Issue the following commands, as `root` user:

    if [ "$LO_PREFIX" != "/usr" ]; then

      # This symlink is necessary for the desktop menu entries
      ln -svf $LO_PREFIX/lib/libreoffice/program/soffice /usr/bin/libreoffice &&

      # Set up a generic location independent of version number
      ln -sfv libreoffice-6.3.0.4 /opt/libreoffice

      # Icons
      mkdir -vp /usr/share/pixmaps
      for i in $LO_PREFIX/share/icons/hicolor/32x32/apps/*; do
        ln -svf $i /usr/share/pixmaps
      done &&

      # Desktop menu entries
      for i in $LO_PREFIX/lib/libreoffice/share/xdg/*; do
        ln -svf $i /usr/share/applications/libreoffice-$(basename $i)
      done &&

      # Man pages
      for i in $LO_PREFIX/share/man/man1/*; do
        ln -svf $i /usr/share/man/man1/
      done

      unset i
    fi

If you have installed desktop-file-utils-0.24, and you wish to update the MIME database, issue, as the `root` user:

    update-desktop-database

The suite and main modules can be started from the menu. From a terminal, the suite can be started with libreoffice command and the modules with libreoffice --`<module>` command, respectively, where `<module>` is one of base, calc, draw, impress, math or writer. Modules cannot be started using their shell starting script names (see "Installed Programs", below), if LO_PREFIX is other than `/usr`, unless `$LO_PREFIX/bin` directory is appended to the PATH.

## Command Explanations

sed -e ...: The first sed prevents compression of the manual pages, the second one prevents the install from failing, and the the third allows to build with OpenJDK-12.

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

`--with-lang='fr en-GB'`: This switch sets what languages to support. To list several languages, separate them with a space. For all languages, use `--with-lang=ALL`.

### Note

For a list of the available languages, look in `solenv/inc/langlist.mk`.

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

`--with-jdk-home=/opt/jdk`: This parameter will silence a warning that the configure script attempted to find JAVA_HOME automatically (even though that is passed in the environment). Omit this if you disabled java.

`--with-myspell-dicts`: This switch adds myspell dictionaries to the LibreOffice installation set.

`--with-system-boost`: This switch enables using system boost. From time to time, recent versions of boost break the build of libreoffice. In this case, it is possible to use the bundled copy of boost, by removing this flag.

`--disable-dconf`: This switch disables compiling LibreOffice with the GNOME DConf configuration system support.

`-disable-gtk -enable-gtk3`: This pair of switches tell the configure script to use GTK+-3 instead of GTK+-2.

`--without-junit`: This switch disables the tests for the deprecated HSQLDB driver which is written in Java. If you wish to build this driver replace this switch with the set of switches described below after '--without-java'.

`--without-system-dicts`: This switch disables use of dictionaries from system paths, so the ones installed by this package are used.

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

`--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.

`--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.

make distro-pack-install: this does a normal install, but if you add a DESTDIR environment variable it will also install a lot of (text) gid_Module_* files in the DESTDIR, to help distributions which want to break the package into parts.

`--with-parallelism=<count>`: This switch tells LibreOffice to use <count> CPU cores to compile in parallel. (Do not include literal angle brackets.) The default is to use all available cores on the system.

`--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 or later. It also disables Bluetooth support and font install via PackageKit.

`--disable-firebird-sdbc`: By default, the ability to connect to a firebird database is enabled. Add this switch if you do not need that feature.

`--disable-gstreamer-1-0`: Use this switch if you have not installed gst-plugins-base-1.16.0.

`--disable-gtk3`: Use this switch if you have not installed GTK+-3, or if you have installed it but wish to use GTK+-2 (the menu icons differ).

`--disable-postgresql-sdbc`: This switch disables compiling LibreOffice with the ability to connect to a PostgreSQL database. Use it if you have not installed PostgreSQL and you do not want LibreOffice to compile its bundled copy.

`--enable-lto`: This switch will enable Link Time Optimization, which results in slightly smaller libraries (about 40 MB). This is said to make LibreOffice programs load faster (and possibly run faster, e.g. when recalculating a spreadsheet). On an 8-core machine with 16GB of memory, the difference in compile times was minimal, but an extra 2GB was used for the work files. On machines with fewer processors or a lack of memory, the compile might be much slower.

`--without-java`: This switch disables Java support in LibreOffice. Java is needed for the deprecated HSQLDB driver, which allows reading databases created by other programs or in earlier versions of libreoffice base.

`--with-junit=/opt/ant/lib/junit-4.12.jar` and `--with-hamcrest=/opt/ant/lib/hamcrest-core-1.3.jar`: Those options are needed if you want to run the tests.

`--without-fonts`: LibreOffice includes a number of third-party TrueType fonts. If you have already installed some or all of the same fonts, you may prefer to use the system versions.

`--enable-kde5`: Builds with KDE/Plasma integration. If Qt-5.13.0 and/or KDE Frameworks-5.61.0 are not installed in `/usr`, the include and library directories must be specified in `QT5INC`, `QT5LIB`, `KF5INC`, and `KF5LIB`, respectively.

`--enable-evolution2`: Enables support for Evolution address books through Evolution Data Server. Note that Evolution Data Server must be installed for this feature to function.

## Contents

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/program
Installed Directory: $LO_PREFIX/lib/libreoffice

### Short Descriptions

libreoffice (or soffice) | is the main libreofice suite (symlink to $LO_PREFIX/lib/libreoffice/program/soffice).
lobase | is the database manager module shell starting script.
localc | is the spreadsheet module shell starting script.
lodraw | is the vector graphics editor and diagramming tool module shell starting script.
loimpress | is the (PowerPoint) presentations editor and displayer module shell starting script.
lomath | is the mathematical formula editor module shell starting script.
loweb | is the HTML editor module shell starting script.
lowriter | is the word processor module shell starting script.
unopkg | is a tool to manage LibreOffice extensions from the command line.

Last updated on 2019-08-23 20:24:38 -0700

- Prev

  Gnumeric-1.12.45

- Next

  Graphical Web Browsers

- Up
- Home