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 784133 - meson: Fix some issues when using wip/meson branch as a subproject in meson
meson: Fix some issues when using wip/meson branch as a subproject in meson
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: build
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2017-06-23 16:40 UTC by Thibault Saunier
Modified: 2017-10-16 12:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdbus-codegen: Make header inclusion simply relative (1.39 KB, patch)
2017-06-23 16:41 UTC, Thibault Saunier
none Details | Review
meson: Defining MAJOR_IN_ as done by AC_HEADER_MAJOR (1.22 KB, patch)
2017-06-23 16:41 UTC, Thibault Saunier
committed Details | Review
meson: Fix building as a subproject (1.01 KB, patch)
2017-06-23 16:41 UTC, Thibault Saunier
committed Details | Review
meson: Fix the build defining HAVE_RTLD_X (1.36 KB, patch)
2017-06-23 16:41 UTC, Thibault Saunier
committed Details | Review

Description Thibault Saunier 2017-06-23 16:40:56 UTC
See commit messages.
Comment 1 Thibault Saunier 2017-06-23 16:41:05 UTC
Created attachment 354326 [details] [review]
gdbus-codegen: Make header inclusion simply relative

Otherwise in "complex" cases, for example using glib as a subproject
in meson the output dir is relative to the toplevel build directory
(meaning subprojects/glib/gio/...) and the include paths won't fit.

The header file and C file being always generated in the same output
directory, the simplest solution is to just do a relative import using
the header filename.
Comment 2 Thibault Saunier 2017-06-23 16:41:10 UTC
Created attachment 354327 [details] [review]
meson: Defining MAJOR_IN_ as done by AC_HEADER_MAJOR
Comment 3 Thibault Saunier 2017-06-23 16:41:16 UTC
Created attachment 354328 [details] [review]
meson: Fix building as a subproject

meson.source_root() returns the toplevel source directory
of the toplevel project, thus the paths were wrong when using
it. Simply using files() gets us the right path
Comment 4 Thibault Saunier 2017-06-23 16:41:21 UTC
Created attachment 354329 [details] [review]
meson: Fix the build defining HAVE_RTLD_X

Otherwise RTLD_XXX get redefined.
Comment 5 Tim-Philipp Müller 2017-06-23 16:55:31 UTC
I think someone else needs to look at the gdbus-codegen.py patch, and how/if it affects other builds.
Comment 6 Thibault Saunier 2017-06-23 16:58:37 UTC
Comment on attachment 354328 [details] [review]
meson: Fix building as a subproject

>From 66594b04d8745720923511988aa66acca2485ebb Mon Sep 17 00:00:00 2001
>From: Thibault Saunier <thibault.saunier@osg.samsung.com>
>Date: Fri, 23 Jun 2017 12:00:13 -0400
>Subject: [PATCH] meson: Fix building as a subproject
>
>meson.source_root() returns the toplevel source directory
>of the toplevel project, thus the paths were wrong when using
>it. Simply using files() gets us the right path
>
>https://bugzilla.gnome.org/show_bug.cgi?id=784133
>---
> gio/meson.build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/gio/meson.build b/gio/meson.build
>index 603b0b3af..31153bb1f 100644
>--- a/gio/meson.build
>+++ b/gio/meson.build
>@@ -732,7 +732,7 @@ if libelf.found()
> endif
> 
> gconstructor_as_data_h = custom_target('gconstructor_as_data.h',
>-    input : ['data-to-c.py', meson.source_root() + '/glib/gconstructor.h'],
>+    input : ['data-to-c.py', files('../glib/gconstructor.h')],
>     output : ['gconstructor_as_data.h'],
>     command : [python, '@INPUT0@', '@INPUT1@', 'gconstructor_code', '@OUTPUT@'])
> 
>-- 
>2.13.1
Comment 7 Thibault Saunier 2017-07-04 13:37:47 UTC
(In reply to Tim-Philipp Müller from comment #5)
> I think someone else needs to look at the gdbus-codegen.py patch, and how/if
> it affects other builds.

Who could review that one?
Comment 8 Thibault Saunier 2017-10-16 12:11:06 UTC
This is not needed anymore.