GNOME Bugzilla – Bug 783683
Meson build system for GLib
Last modified: 2017-07-15 00:53:40 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.
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.
The Meson build was merged in master. Let's track each missing feature separately.