After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783683 - Meson build system for GLib
Meson build system for GLib
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: build
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on: 783270
Blocks: 782980
 
 
Reported: 2017-06-12 12:54 UTC by Tim-Philipp Müller
Modified: 2017-07-15 00:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim-Philipp Müller 2017-06-12 12:54:49 UTC
There is currently a Meson build port for GLib in the wip/meson branch.

This ticket is to track the status of this and what needs to be done to get it merged.

Status:
=======

 - should work fine on Linux and Windows (with MSVC + mingw)

 - OS/X probably needs some extra checks/tweaks, untested.


Missing:
========

 - GAtomic checks and defines are missing (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 etc.)

 - tests/ unicode collate unit test


Problems:
=========

 - currently points to mesonised libffi fork in github.com/centricular/libffi as subproject. You can't build upstream libffi with 32-bit MSVC, and 64-bit MSVC requires shell and doesn't produce DLLs. (I may not be summarising this 100% correctly.) One could point the subproject to upstream libffi and ship patches in the GLib subprojects/ directory, but that might be a bit messy to maintain. It's also not clear if the patches in the centricular repo are upstreamable in their current state, the 32-bit backport is very hacky and duplicates code and  support for arches that couldn't be tested was removed there because it was just a headache to support those. Not sure what to do with all this. libffi isn't the best maintained upstream either.

 - on debian sid (with meson master) the docs build fails for me on ninja install, in the gobject docs: at first with

   gobject-scan.c:8:22: fatal error: gobject.cI: No such file or directory

   then subsequent "ninjc -C builddir gobject-doc" with

   gobject-scan.c:5:25: fatal error: glib-object.h: No such file or directory

   May or may not be related to https://github.com/mesonbuild/meson/issues/1681
   I have not had time to look into this yet.
Comment 1 Tim-Philipp Müller 2017-06-12 12:58:05 UTC
More:

- Should make sure all files installed are the same between autotools + meson builds

- Should check all configure options have been moved over

- -Bsymbolic support is missing IIRC

- Can't use gnome module in glib itself because all functions look for build tools in PATH; must implement a way in Meson to specify the build tool to each function, but this is something for Meson and not for GLib, and probably more of an inconvenience than a blocker.
Comment 2 Emmanuele Bassi (:ebassi) 2017-07-15 00:53:40 UTC
The Meson build was merged in master.

Let's track each missing feature separately.