Problems to build Collabora Office for Windows

I try first time to get a build with WSL2 on Windows11. I have clone from https://gerrit.collaboraoffice.com/core. I have created an autogen.input file and run $ wsl ./autogen.sh.

(A) The output contains options that I have deactivated in my autogen.input. Especially it shows option –enable-release-build whereas my autogen.input has --enable-dbgutil

(B) A try of $ make fails with errors, e.g.

tar: .gitlab-ci.d/meson-cross/linux-386-gnu.meson: Cannot create symlink to ‘native-gnu.meson’: No such file or directory

Hi Regina,

Please follow the CODA-W build instructions here:

The --with-distro=CODAWindows switch is important, otherwise you won’t build the headless version of core.

Regards,

Miklos

The instruction says, “The static libraries that you are interested end up as zstd-1.5.7/build/VS2010/bin/x64_Debug/libzstd_static.lib and zstd-1.5.7/build/VS2010/bin/x64_Release/libzstd_static.lib .”

But I have only got a folder x64_Debug. There is not folder x64_Release . Does that matter?

Which one you get depends on the configuration in Visual Studio. “Debug” or “Release” on the line below the menu bar. I have used the Debug build of zstd with a Debug build of CODA and vice versa. I don’t remember whether that is essential.

I’m now at section “Build Collabora Office itself”. Problems:

(A) This section starts with “Clone the https://github.com/CollaboraOnline/online.git repo.” But in section “Build core” was already “Clone the https://gerrit.collaboraoffice.com/core repository.” I have cloned it from gerrit. Is that OK?

(B) Instruction says, “In an Ubuntu shell, run ./autogen.sh”. That does not work at all, it does not even find Visual Studio. I have tried then using gitbash as I do it for LibreOffice with wsl ./autogen.sh'. That runs the script, but it does not read my autogen.input file. It uses some defaults (from where?) and those have –enable-release-build whereas I want --enable-dbgutil.

(C) The instructions advise first to run ./autogen.sh and then ./configure.sh. But autogen.sh already runs configure.sh. Please explain.

(D) Instructions says to use cd browser && make. But there is no folder browser.

(E) Instructions says to run windows/coda/CODA.sln. But there is no such file.

I want a debug build of Collabora Office Desktop, not of Collabora Online. Is it the correct instruction at all?

With wsl ./autogen.sh I now get the error message:

checking for FONTCONFIG… configure: error: Package requirements (fontconfig >= 2.12.0) were not met:

Package ‘fontconfig’ not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables FONTCONFIG_CFLAGS
and FONTCONFIG_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

I have no idea what to do. In Ubuntu, I have already done install fontconfig and install libfontconfig1-dev. Please help.

hi @Regina

This usually happens because pkg-config isn’t installed — so even though you’ve got fontconfig on your system, the build script has no way to find it. Run this:

sudo apt update
sudo apt install pkg-config libfontconfig1-dev

Even if you already installed libfontconfig1-dev before, it’s worth reinstalling it after pkg-config is in place, since that’s what provides the .pc file the build system is looking for.

You can double-check everything is working with:

pkg-config --modversion fontconfig

Hope that helps :slight_smile:

hmm Windows build needs fontconfig? … oh it is true apparently, for Collabora Office (CODA) we build headless and that requires fontconfig… see this in configure.ac

```

if test "$_os" = "WINNT" -a "$enable_headless" = yes; then
    # We build them, don't do any pkg-config checks
    test_fontconfig=no
    test_freetype=no
    BUILD_TYPE="$BUILD_TYPE FONTCONFIG FREETYPE"
fi

this tries to set it up so that it builds the internal (bundled) fontconfig, so it should not complain about it missing from the system… but since it does, something doesn’t work.

could you try if adding --without-system-fontconfig to autogen.input helps?

(please be aware that i have never build this on Windows myself, and Tor is only here part-time…)

After re-installing as described by @darshan , the error no longer occurs. I have add --without-system-fontconfig to autogen.input and no error about fontconfig, but I cannot say, whether without-system-fontconfig alone would has solved the problem as well.

But next step in the instruction fails totally. All parameters given in the command ./configure … do not exist.

When I run make after ./autogen.sh then it fails with errors

tar: .gitlab-ci.d/meson-cross/linux-386-gnu.meson: Cannot create symlink to ‘native-gnu.meson’: No such file or directory

And same for lot of others with patch starting .gitlab-ci.d/meson-cross/

I wonder if it possible at all to build a Collabora Office for Windows same as a LibreOffice. All I want to do is test the SmartArt feature that Armin is currently implementing. And since he doesn’t want to push it to the TDF repository, I need a build from the Collabora repository.

Finally got a build. It turned out that the start with Build Collabora Office for Windowswas wrong. I have now made a fresh clone, have adapted my autogen.input from LibreOffice to the actual paths, call wsl ./autogen.shand make. The Office is build and runs as expected.

1 Like