Compiling Desktop app: WARNING: unrecognized options: --enable-qtapp

Hi.

I’m an Arch Linux package maintainer, and I wanted to try and package the new Collabora desktop application. However, I quickly ran into issues following the build instructions over at Build Collabora Office for Linux | Collabora Online - Community Page

I’m on branch distro/collabora/coda-25.04 on both https://github.com/CollaboraOnline/online.git as well as https://github.com/LibreOffice/core.git and doing the following:

./autogen.sh
./configure \
    --enable-qtapp \
    --with-lo-path="${LOCOREPATH}/instdir" \
    --with-lokit-path="${LOCOREPATH}/include" \
    --enable-debug \
    CXXFLAGS="-O2 -g -fPIC"

Results in a built application, but only the WOPI/Online version, not the qt version. Most likely because ./configure doesn’t have the flag mentioned:

checking whether the compiler is clang... no
checking for LibreOffice path... found
...
WARNING: unrecognized options: --enable-qtapp

It appears to have been added in this commit: initial CODA-Q Qt6 WebEngine app · CollaboraOnline/online@f0ff607 · GitHub

But that fork does not build as of writing this, due to a few code issues that I wouldn’t know where to begin fixing.

Any idea where I could be going wrong since the flag for configure is missing?
(I wish to avoid pre-built flatpak for as long as possible, and build from source for packaging reasons)

The desktop app is built in the sub-dir qt/the flag applies to the Makefile to include it.

But that fork does not build as of writing this, due to a few code issues that I wouldn’t know where to begin fixing.

It should build, you might have some dependency issue, not sure.

I have it built on my Arch system.

./configure --with-lo-path=$HOME/code/libreoffice/core/instdir --with-lokit-path=$HOME/code/libreoffice/core/include --enable-debug --enable-qtapp PKG_CONFIG_PATH=

Can you share some of your logs ?

I feel I’ve missed something crucial, because these are the only `*qt*` folders in either libreoffice core or collabora online repo under the `distro/collabora/co-25.04` branch:

./libreoffice-core-25.04/avmedia/source/qt6
./libreoffice-core-25.04/include/vcl/qt
./libreoffice-core-25.04/vcl/inc/qt5
./libreoffice-core-25.04/vcl/inc/qt6
./libreoffice-core-25.04/vcl/qt5
./libreoffice-core-25.04/vcl/qt6

And I suspect you’re referring to this qt/ folder which only lives on the `main` branch.
So I’m wondering why the buld instructions first of all does not reference entering the `qt/` folder - and also reference the wrong branch?

Or am I mix-matching instructions some how?

But sure enough, using the `main` branch allows me to do `–enable-qtapp` (without jumping into the qt/ folder). However this results in a few build errors (I’ll attach the log in a new post, because new users can’t attach files and I’ve maxed out two links in one post).

I can get around a few of them with the following:

diff --git a/net/FakeSocket.hpp b/net/FakeSocket.hpp
index 1a4c71ef0d..c97e89e598 100644
--- a/net/FakeSocket.hpp
+++ b/net/FakeSocket.hpp
@@ -16,6 +16,8 @@

 #pragma once

+#include <config.h>
+
 #include <common/Util.hpp>

 #if MOBILEAPP
diff --git a/qt/WebView.cpp b/qt/WebView.cpp
index 0588c35057..67998d3fc5 100644
--- a/qt/WebView.cpp
+++ b/qt/WebView.cpp
@@ -9,6 +9,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */

+#include <config.h>
+
 #include "WebView.hpp"
 #include "bridge.hpp"
 #include <QWebChannel>

Here’s the error log prior to the above diff patch: https://0x0.st/PQuZ.txt

It still errors out after the patch, which I’ll need to figure out: https://0x0.st/PQuN.txt

I also have to override which `moc` version is being used, because the default on my system is moc 5 from qt5-base:

./autogen.sh
./configure \
	--enable-qtapp \
	--with-lo-path="${LOCOREPATH}/instdir" \
	--with-lokit-path="${LOCOREPATH}/include" \
	--enable-debug \
	CXXFLAGS="-O2 -g -fPIC" \
	PKG_CONFIG_PATH= \
	MOC=/usr/lib/qt6/moc
make -j$(nproc)
diff --git a/qt/Makefile.am b/qt/Makefile.am
index 45e322986b..731c05e0da 100644
--- a/qt/Makefile.am
+++ b/qt/Makefile.am
@@ -53,8 +53,10 @@ cmake_list= \
             ../kit/LogUI.cpp \
             ../kit/KitWebSocket.cpp \
             ../net/FakeSocket.cpp \
+            ../net/HttpRequest.cpp \
             ../net/Socket.cpp \
             ../wsd/ClientSession.cpp \
+            ../wsd/WSDGlobals.cpp \
             ../wsd/DocumentBroker.cpp \
             ../wsd/COOLWSD.cpp \
             ../wsd/ClientRequestDispatcher.cpp \

After applying this third patch, it appears that it builds smoothly.
Also tried building against the system-version of libreoffice with `–with-lo-path=/usr/lib/libreoffice` and that builds too.

And I can launch the application, but when opening a document I various issues, among them I get:

GBM is not supported with the current configuration. Fallback to Vulkan rendering in Chromium.
Unspecified Application Error

Hi @Torxed , nice that you are looking into packaging the desktop app on Arch.

So in general distro/collabora/coda-25.04 is still being merged into main, it is known that it does not build sucessfully on main, additionally it is a bit behind fix/patch wise.

Last release we did was from distro/collabora/coda-25.04, and it should still be building fine.

And if you’d like to see which core.git and online.git checkout makes sense refer to the flathub flatpak manifest at https://github.com/flathub/com.collaboraoffice.Office/blob/master/com.collaboraoffice.Office.json

Let me know what blocks you when you try to build from distro/collabora/coda-25.04 branch I’ll gladly help.

Cheers,
Sarper

1 Like