Bug 146153 - Enable LibreOffice to be built on Wayland without X11
Summary: Enable LibreOffice to be built on Wayland without X11
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevEval
Depends on:
Blocks: Wayland
  Show dependency treegraph
 
Reported: 2021-12-09 20:03 UTC by Philipp Ammann
Modified: 2024-03-06 15:28 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Ammann 2021-12-09 20:03:42 UTC
Description:
With X11 development becoming slower every day and distros moving to Wayland-first desktops, I'd appreciate it if LibreOffice dropped hard dependencies on X11.

I'm on a Gentoo system without any X11-related libraries and tried to compile LO. After some very hackish changes `configure` went through, but compilation almost immediately because of missing X11 headers (and, presumably, libraries).

Steps to Reproduce:
Compile LibreOffice on a Wayland-only system without xlib/xcb etc.

Actual Results:
Doesn't build, multiple errors

Expected Results:
Successful compilation


Reproducible: Always


User Profile Reset: No



Additional Info:
I used the latest 7.2 from git for my tests.
Comment 1 Caolán McNamara 2021-12-10 08:59:46 UTC
we need a way in configure to disable the "gen" generic vclplug which needs X, and then there are some assumptions that not "using_x11" means "no gui" which is a different sort of thing of course.

We do use cairo in a any case, and in my distro (fedora) the system libcairo.so links to x11 so x11 gets linked in eventually even if we don't use it, but that's just an aside
Comment 2 junkmailnotread 2023-07-23 12:10:23 UTC
Adding my vote to this bug.

I too use Gentoo Linux. For me, LO is one of two packages blocking the complete removal of X11 (the other being xdg-utils).

A cursory audit of libreoffice-7.5.3.2 shared objects shows the following hard links to X11 libraries:

File: /usr/lib64/libreoffice/program/libdesktop_detectorlo.so
 0x0000000000000001 (NEEDED)             Shared library: [libX11.so.6]
File: /usr/lib64/libreoffice/program/libmergedlo.so
 0x0000000000000001 (NEEDED)             Shared library: [libX11.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libXext.so.6]
File: /usr/lib64/libreoffice/program/libvclplug_genlo.so
 0x0000000000000001 (NEEDED)             Shared library: [libXrender.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libX11.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libXext.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libXrandr.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libXinerama.so.1]
File: /usr/lib64/libreoffice/program/libvclplug_gtk3lo.so
 0x0000000000000001 (NEEDED)             Shared library: [libX11.so.6]

I presume libvclplug_genlo.so is the "gen" VCL plugin mentioned previously. I understand why that needs X11.

I presume libvclplug_gtk3lo.so is the "gtk3" VCL plugin. In principle there is no reason why that needs X11.

I have built libcairo.so, libepoxy.so, and libgtk-3.so without X11 support.

Happily, LO will still run without an X11 server running.
Comment 3 fictitiousexistence 2024-03-06 15:27:26 UTC
I was able to build on gentoo without the X11 libs using --without-x and --disable-randr, however when running,  I get "no suitable windowing system found, exiting."