Bug 113121 - Switch build system to meson or cmake
Summary: Switch build system to meson or cmake
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: lowest enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Dev-related
  Show dependency treegraph
 
Reported: 2017-10-14 18:05 UTC by Yan Pas
Modified: 2024-08-11 07:19 UTC (History)
4 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 Yan Pas 2017-10-14 18:05:07 UTC
Description:
Autotools is very complicated and slow build system with bad windows support. Building such a huge project like libreoffice takes a lot of time (even after recompiling only one file the hole project rebuild is slow). There are already some alternatives with modularity and simpler architecture: trendy meson and popular cmake.

Steps to Reproduce:
-

Actual Results:  
-

Expected Results:
-


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
Comment 1 Adolfo Jayme Barrientos 2017-10-17 13:42:33 UTC
Can you bring this up to the ESC?
Comment 2 Yan Pas 2017-10-17 19:36:13 UTC
What is ESC?
Comment 3 Adolfo Jayme Barrientos 2017-10-20 09:14:25 UTC
https://wiki.documentfoundation.org/Development/ESC

Be aware that this request is like asking for a unicorn, however…
Comment 4 Adolfo Jayme Barrientos 2020-03-12 17:21:00 UTC
From ESC meeting minutes, 2020-02-13 [1]:

----
* Meson build system experiments by Jussi Pakkanen (Ilmari)
    + Meson creator Jussi has done preliminary feasibility evaluation for free
    + https://nibblestew.blogspot.com/2020/02/building-very-small-subset-of.html
    + https://nibblestew.blogspot.com/2020/02/trying-to-build-slightly-larger-slice.html
    + if there is interest in principle, we can seek independent funding for a prototype
    + prototype would make it easier to evaluate benefits
    + Ilmari’s perspective: want to make the codebase more approachable for newcomers

    + understand that we don’t want to drop something that works already (Ilmari)
    + not yet asking for a decision, but please think about this
    + what problem does this solve? (Kendy)
      + usually LO breaks the tools
    + GNOME / wayland is moving to this from autotools (Ilmari)
    + sitting on the fence (Thorsten)
      + significant cost to migrate to anything
      + there are load of unsolved problems with the build system, though
    + would not be great to pay some external developers to do the migration and then let us maintain it (Stephan)
      + agreed (Kendy, Cloph)
    + better spend funding money elsewhere (Kendy)
      + e.g. external libs that can’t build in parallel
----

 [1]: https://lists.freedesktop.org/archives/libreoffice/2020-February/084440.html
Comment 5 Mathletic 2024-04-18 21:04:41 UTC
Four years later, it might be a good idea to repeat the question and hear what people think today.

1. Autotools lack man power and is admitting this fact openly.
2. The problem at hand is, that Autotools became more exotic and fewer developers are able or willing to spend time with it.
3. In the meantime a couple of other big project moved away from Autotools, e.g., Flatpak, Mesa, Xorg.
4. Given the prototype can be updated, LibreOffice can introduce it as an optional way of building and improving it over time. This does not necessarily cost money. Nevertheless, I think it would be money well spent.
5. Maybe use CMake instead of Meson. Most important is getting rid of Autotools mid-term.
Comment 6 Eyal Rozenberg 2024-08-08 19:20:18 UTC
I don't do LO development, but as a C++ developer on several other projects, including one-and-a-half which transitioned to CMake, I have found the adoption of CMake to be a useful endeavor, in several senses:

* Typically reduces the amount of custom code relating to build configuration.
* Improves portability - although that requires a bit of care when writing the build description files (called CMakeLists.txt in CMake)
* Facilitates building with different tools, e.g. both Make and Ninja - with the latter speeding up build times somewhat.
* Provides convenient TUI and GUI for reviewing and controlling build parameters/options.
* Makes it easier to rely on 3rd-party libraries in any number of ways (OS distro, fetching from source repository, interaction with package managers such as conan, etc.)
* Reasonably straightforward to invoke

Also, the Kitware people have a mediocre-to-good responsiveness to bug reports. I've done more than a bit of QA on CMake itself w.r.t. CUDA support, and many of the issues I've brought up have been resolved, sometimes even quickly. I am guessing they would be even more responsive to LibreOffice as a project - perhaps it's worth approaching them.


----

All of the above is only partially the case-, again in my experience, with Meson. I find it is less flexible, more finicky, harder for newcomers, and has more problems with interaction/composition of multiple projects. Thorsten said (?) that "there are load of unsolved problems with the build system, though" - I would feel better trying to tackle those with CMake, not meson.