LibreOffice-26.2.2

#### Beyond Linux® From Scratch (systemd Edition) - Version r13.0-517

### Chapter 39. Office Programs

- Prev

  Gnumeric-1.12.60

- Next

  Graphical Web Browsers

- Up
- Home

# LibreOffice-26.2.2

## Introduction to LibreOffice

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

### Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

### Package Information

- Core Download: https://download.documentfoundation.org/libreoffice/src/26.2.2/libreoffice-26.2.2.2.tar.xz

- Core Download MD5 sum: acaa63689cc524173d0a79dcadb83367

- Core Download size: 278 MB

- Estimated disk space required: 7.6 GB including the additional files if downloaded during the build (744 MB installed). Installing the whole set of languages requires more than 25 GB (around 3 GB installed)

- Estimated build time: 24 SBU with parallelism=8 (will vary due to download time)

### Additional Downloads

### Note

Around 80 smallish tarballs and zip files will be downloaded during the build. The download time will vary with the local internet speed and server load. The download time is about 3 minutes on a fiber connection and probably not much more than 10 minutes on an ADSL connection. If you have not installed one or more of the following dependencies, they will also be downloaded during the build.

- Dictionaries: https://download.documentfoundation.org/libreoffice/src/26.2.2/libreoffice-dictionaries-26.2.2.2.tar.xz

  Dictionaries MD5 sum: 7fd7e703ac17a6970c8315d89b455e13

  Dictionaries size: 60 MB

- Help Files: https://download.documentfoundation.org/libreoffice/src/26.2.2/libreoffice-help-26.2.2.2.tar.xz

  Help Files MD5 sum: 97171746ac4ef40fbadc5e6b3d31a0a3

  Help Files size: 56 MB

- Translations: https://download.documentfoundation.org/libreoffice/src/26.2.2/libreoffice-translations-26.2.2.2.tar.xz

  Translations MD5 sum: 49d9571fe2de9fd7d6405e097f6dd4f7

  Translations size: 225 MB

### LibreOffice Dependencies

#### Required

Archive-Zip-1.68, libarchive-3.8.7, Wget-1.25.0, Which-2.23, and Zip-3.0

### Note

An Internet connection is needed for building this package. The system certificate store may need to be set up with make-ca-1.16.1 before building this package.

#### 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 both build and installed disk space along with increasing build time.

apache-ant-1.10.17, Boost-1.90.0, CLucene-2.3.3.4, Cups-2.4.19, cURL-8.20.0, GLM-1.0.3, GLU-9.0.3, gpgmepp-2.0.0, Graphite2-1.3.14, gst-plugins-base-1.28.2, GTK-3.24.52, harfBuzz-14.2.0, ICU-78.3, libatomic_ops-7.10.0, libepoxy-1.5.10, libjpeg-turbo-3.1.4.1, librsvg-2.62.1, libtiff-4.7.1, libwebp-1.6.0, libxml2-2.15.3 and libxslt-1.1.45, Little CMS-2.19, LLVM-22.1.0 (clang is preferred for rendering with skia), lxml-6.1.0, Mesa-26.0.1, nss-3.123.1, OpenLDAP-2.6.13 (if connecting to an LDAP server), Poppler-26.04.0, PostgreSQL-18.3, Redland-1.0.17, and unixODBC-2.3.14

#### Optional

Abseil-cpp-20260107.1, Avahi-0.8, BlueZ-5.86, DConf-0.49.0, desktop-file-utils-0.28, Doxygen-1.17.0 (not relevant if using --disable-odk), evolution-data-server-3.60.1, GDB-17.1, GnuTLS-3.8.13, GTK-4.22.4, KDE Frameworks-6.23.0, libpaper-2.2.7, MariaDB-11.8.6 or MySQL, MIT Kerberos V5-1.22.2, NASM-3.01, Qt-6.11.0, SANE-1.4.0, Valgrind-3.27.0, VLC-3.0.23, zxing-cpp-3.0.2, BeanShell, box2d, CoinMP, Cppunit, Dragonbox, Firebird, frozen, hamcrest, Hunspell, Hyphen, Java-WebSocket, jfreereport, jq, junit4, libabw, libcdr, libcmis, libebook, libeot, libepubgen, libetonyek, libexttextcat, libfixmath, libfreehand, liblangtag, libmspub, libmwaw, libnumbertext, libodfgen, libpagemaker, libqxp, librevenge (WordPerfect Document importer), libstaroffice, libvisio, libwpd, libwpg, libwps, libzmf, lp_solve, mdds, MyThes, odfvalidator, officeotron, Orcus, rhino, and suitesparse (colamd)

There are many optional dependencies not listed here. They can be found in the `download.lst` file in the sources directory.

Editor Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libreoffice

## Installation of LibreOffice

First, fix build failures introduced by the latest version of poppler:

    sed -e '/, const GooString/ s/GooString *\*/std::string \&/' \
        -i sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx \
           sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx

First, fix a bug with linking to zlib, fix a bug which would cause an install failure, and prevent compression of man pages:

    sed -i '/icuuc \\/a zlib\\'           writerperfect/Library_wpftdraw.mk &&
    sed -i "/distro-install-file-lists/d" Makefile.in                       &&
    sed -e "/gzip -f/d"   \
        -e "s|.1.gz|.1|g" \
        -i bin/distro-install-desktop-integration

If you have downloaded the dictionaries, help and translations tarballs, create symlinks to them from the source directory so they won't get downloaded again:

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

The instructions in the package unpack some tarballs into a location it cannot find later. Create some symlinks to help the build system out:

    ln -sv src/libreoffice-help-26.2.2.2/helpcontent2/ &&
    ln -sv src/libreoffice-dictionaries-26.2.2.2/dictionaries/ &&
    ln -sv src/libreoffice-translations-26.2.2.2/translations/

### 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-26.2.2.2`:

    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.

### Note

If you set the ACLOCAL environment variable to support installing Xorg in /opt, you will need to unset it for this package.

If you are building on a 32 bit machine, `CFLAGS` is set to -Os, which breaks the build. Prevent this by issuing:

    case $(uname -m) in
       i?86) sed /-Os/d -i solenv/gbuild/platform/LINUX_INTEL_GCC.mk ;;
    esac

Prepare LibreOffice for compilation by running the following commands:

    ./autogen.sh --prefix=$LO_PREFIX         \
                 --sysconfdir=/etc           \
                 --with-vendor=BLFS          \
                 --with-lang='fr en-GB'      \
                 --with-help=html            \
                 --with-myspell-dicts        \
                 --without-junit             \
                 --without-system-dicts      \
                 --disable-dconf             \
                 --disable-odk               \
                 --disable-mariadb-sdbc      \
                 --enable-release-build=yes  \
                 --enable-python=system      \
                 --with-jdk-home=/opt/jdk    \
                 --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-libtiff       \
                 --with-system-libpng        \
                 --with-system-libxml        \
                 --with-system-libwebp       \
                 --with-system-nss           \
                 --with-system-odbc          \
                 --with-system-openldap      \
                 --with-system-openssl       \
                 --with-system-poppler       \
                 --with-system-postgresql    \
                 --with-system-redland       \
                 --with-system-zlib          \
                 --with-system-zstd

Build the package:

    make build

Now, as the `root` user:

    make distro-pack-install

If installed in `/opt/libreoffice-26.2.2.2` some additional steps are necessary. Issue the following commands as the `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 $LO_PREFIX /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.28, 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 the libreoffice command and the modules with the libreoffice --`<module>` command, respectively, where `<module>` is one of base, calc, draw, impress, math, web, or writer. Modules cannot be started using their shell starting script names (see "Installed Programs", below), if LO_PREFIX is other than `/usr`, unless the `$LO_PREFIX/bin` directory is appended to the PATH.

## Command Explanations

`--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 that the translations file is not needed and won't be downloaded if using only en-US as a language.

### Note

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

`--with-help=html`: 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.

`--without-junit`: This switch disables the tests for the deprecated HSQLDB driver which is written in Java.

`--without-system-dicts`: This switch disables the use of dictionaries from system paths so that 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.

`--disable-mariadb-sdbc`: This switch disables the MariaDB SDBC connector for Libreoffice Base. Leaving it enabled results in a build failure because of a problem linking to MIT Kerberos V5-1.22.2.

`--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 the system installed Python 3 instead of the bundled one.

`--with-system-icu`: This switch tells the build system to use the system installed version of ICU.

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

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

`--disable-skia`: Use Cairo-1.18.4 for rendering instead of skia.

`--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 16 GB of memory, the difference in compile times was minimal, but an extra 2 GB 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. It is also needed for some optional user interface components.

`--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-evolution2`: Enables support for Evolution address books through Evolution Data Server. Note that Evolution Data Server must be installed for this feature to function.

`--enable-qt6`: This switch enables support for integration with Qt6 and the Qt6 theming engine. If Qt-6.11.0 is not installed in `/usr`, the include and library directories must be specified in the `QT6INC` and `QT6LIB` environment variables.

`--enable-kf6`: This switch enables KDE/Plasma integration. If Qt-6.11.0 and/or KDE Frameworks-6.23.0 are not installed in `/usr`, the include and library directories must be specified in `QT6INC`, `QT6LIB`, `KF6INC`, and `KF6LIB`, respectively. This includes a style plugin and KIO integration.

`--with-system-abseil`: This switch enables using a system version of the Abseil C++ libraries instead of the bundled copy. Add this switch if Abseil-cpp-20260107.1 is installed and you want to use it instead of the bundled copy.

`--with-system-zxing`: This switch enables using a system version of zxing-cpp instead of the bundled copy. Add this switch if zxing-cpp-3.0.2 is installed and you want to use it instead of the bundled copy.

`--enable-gtk4`: This switch enables integration with GTK-4, including the usage of a GTK-4 file browsing dialog and themes.

## 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

- Prev

  Gnumeric-1.12.60

- Next

  Graphical Web Browsers

- Up
- Home