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 786796 - gtk-doc build fails with meson
gtk-doc build fails with meson
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: docs
2.53.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 790954
 
 
Reported: 2017-08-25 11:41 UTC by Armin K.
Modified: 2017-12-11 15:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
docs: Fix building with meson (3.17 KB, patch)
2017-08-25 11:41 UTC, Armin K.
none Details | Review
Patch (2.06 KB, patch)
2017-11-10 01:38 UTC, Xavier Claessens
committed Details | Review

Description Armin K. 2017-08-25 11:41:46 UTC
Created attachment 358390 [details] [review]
docs: Fix building with meson

When -Dwith-docs=yes is set when building with meson, install process would fail, with messages such as:

'gtkdoc-scangobj' failed with status 1
gobject-scan.c:8:10: fatal error: 'gobject.cI' file not found
#include "gobject.cI"

I've tracked the issue to meson using paths relative to top source/build directories in subdirectories, making gtk-doc pass invalid paths to the compiler, which then fails to find the necessary headers.

Attached patch, although an ugly fix, fixes the issue for me.
Comment 1 Philip Withnall 2017-09-08 16:10:59 UTC
Can we fix this in Meson instead?
Comment 2 Armin K. 2017-09-08 16:13:45 UTC
I think so, yes. But even with fixes in meson, there are still some parts of this patch that would be required.
Comment 3 Xavier Claessens 2017-11-09 21:53:35 UTC
I created this PR in Meson: https://github.com/mesonbuild/meson/pull/2603

With that change, we can fix this glib issue more nicely:

incldir = include_directories('.')
gnome.gtkdoc(..., include_directories=[incldir])
Comment 4 Xavier Claessens 2017-11-10 01:38:11 UTC
Created attachment 363319 [details] [review]
Patch
Comment 5 Xavier Claessens 2017-12-10 16:34:51 UTC
Meson 0.44.0 got released, can we merge this now?
Comment 6 Philip Withnall 2017-12-11 10:40:45 UTC
I’m leaving GLib/Meson patch review to Nirbheek or Emmanuele.
Comment 7 Emmanuele Bassi (:ebassi) 2017-12-11 11:56:11 UTC
Review of attachment 363319 [details] [review]:

ACK-by: me