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 781148 - gst-build does not work on macOS
gst-build does not work on macOS
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-build
git master
Other Mac OS
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-04-10 17:56 UTC by Olivier Crête
Modified: 2018-11-03 11:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allow disabling introspection from toplevel gst-build (1.67 KB, patch)
2017-04-10 20:57 UTC, Thibault Saunier
committed Details | Review

Description Olivier Crête 2017-04-10 17:56:59 UTC
When I try to run "meson build" on osx in gst-build, I get:

Program g-ir-scanner found: YES (/usr/local/bin/g-ir-scanner)
Program g-ir-compiler found: YES (/usr/local/bin/g-ir-compiler)

Meson encountered an error in file subprojects/gstreamer/gst/meson.build, line 235, column 4:
gobject-introspection dependency was not found, gir cannot be generated.
Comment 1 Tim-Philipp Müller 2017-04-10 19:00:25 UTC
The error is in reference to the gobject-introspection-1.0 pkg-config dependency not having been found.

Try

 $ meson -Ddisable_introspection=true

and perhaps file a bug against meson on github to improve the error message.

(There's another issue open in meson to add autodetection for this in a nice way, I have so far refused to implement it on our side because I think it belongs in meson.)
Comment 2 Olivier Crête 2017-04-10 20:25:21 UTC
Except that the dep is there:
$ pkg-config --modversion gobject-introspection-1.0
1.52.0


running meson -Ddisable_introspection=true does not work from gst-build. Seems like meson does not pass the configs around? although it seems to work if I it only in the gstreamer module.
Comment 3 Thibault Saunier 2017-04-10 20:57:54 UTC
Created attachment 349622 [details] [review]
Allow disabling introspection from toplevel gst-build
Comment 4 Thibault Saunier 2017-04-10 20:58:54 UTC
With that -Ddisable_introspection in gst-build should work.
Comment 5 Olivier Crête 2017-04-10 21:13:48 UTC
Review of attachment 349622 [details] [review]:

Shouldn't you do the same for all of the other options in the various gstreamer projects? Thinks like disabling gtkdoc, building static or library, etc. Feels like there is a missing feature in the meson meta-build system
Comment 6 Thibault Saunier 2017-04-10 21:21:44 UTC
(In reply to Olivier Crête from comment #5)
> Review of attachment 349622 [details] [review] [review]:
> 
> Shouldn't you do the same for all of the other options in the various
> gstreamer projects? Thinks like disabling gtkdoc, building static or
> library, etc. Feels like there is a missing feature in the meson meta-build
> system

You can pass -Dgst-plugins-base:disable_gtkdoc, I am simply simplifying the thing for the disable_introspection because it is used in almost all submodules.

We could have that handled in a nice way through the yet to be merged component[0] concept indeed.

[0]: https://github.com/mesonbuild/meson/pull/1330
Comment 7 Olivier Crête 2017-04-10 21:27:12 UTC
This -Dgst-plugins-base:disable_gtkdoc is totally impossible to discover before you manage to run meson once..

The bison check is also not sufficient in the meson code, it needs to check for version 2.4, the version 2.3 (that comes with macOS) is not recent enough.
Comment 8 Thibault Saunier 2017-04-10 21:32:09 UTC
(In reply to Olivier Crête from comment #7)
> This -Dgst-plugins-base:disable_gtkdoc is totally impossible to discover
> before you manage to run meson once..

Well, you won't be able to discover any option before running meson first in any case, a bit anoying, not sure how we could fix.

> The bison check is also not sufficient in the meson code, it needs to check
> for version 2.4, the version 2.3 (that comes with macOS) is not recent
> enough.

That is another bug, but maybe :)
Comment 9 Olivier Crête 2017-04-10 21:36:20 UTC
The significantly better test in autotools tells me that:

configure:22829: checking for gobject-introspection
configure:22860: $PKG_CONFIG --exists --print-errors "gobject-introspection-1.0 >= 1.31.1"
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libffi', required by 'gobject-introspection-1.0', not found


It seems like a bug in the gobject-introspection-1.0 pkgconfig on macOS, as libffi is part of the platform there (and therefore has no .pc file)
Comment 10 Olivier Crête 2017-04-10 22:01:29 UTC
Next problem is that meson doesn't set GST_EXTRA_MODULE_SUFFIX to .dylib, so GStreamer doesn't find it's plugins. You need to copy the behaviour of common/m4/gst-platform.m4
Comment 11 Thibault Saunier 2017-04-11 15:05:56 UTC
Comment on attachment 349622 [details] [review]
Allow disabling introspection from toplevel gst-build

Attachment 349622 [details] pushed as c071855 - Allow disabling introspection from toplevel gst-build
Comment 12 Justin Kim 2018-02-19 06:53:08 UTC
(In reply to Olivier Crête from comment #10)
> Next problem is that meson doesn't set GST_EXTRA_MODULE_SUFFIX to .dylib, so
> GStreamer doesn't find it's plugins. You need to copy the behaviour of
> common/m4/gst-platform.m4

`grep` just tell me that gstreamer and gst-plugins-bad use 'GST_EXTRA_MODULE_SUFFIX'.
Hopefully, those fixes help to fix this bug.

 - gstreamer: https://bugzilla.gnome.org/show_bug.cgi?id=793584
 - gst-plugins-bad: https://bugzilla.gnome.org/show_bug.cgi?id=793585
Comment 13 Justin Kim 2018-02-19 06:57:49 UTC
Another problem with gat-build on macosx is a type mismatched error in glib.

In file included from /usr/local/Cellar/glib/2.54.3/include/glib-2.0/glib/galloca.h:32:
/usr/local/Cellar/glib/2.54.3/include/glib-2.0/glib/gtypes.h:423:3: error: '_GStaticAssertCompileTimeAssertion_0' declared as an array with a negative size
  G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64));
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/glib/2.54.3/include/glib-2.0/glib/gmacros.h:232:103: note: expanded from macro 'G_STATIC_ASSERT'
#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
                                                                                                      ^~~~~~~~~~~~~~~
1 error generated.
Traceback (most recent call last):
  • File "/usr/local/bin/g-ir-scanner", line 66 in <module>
    sys.exit(scanner_main(sys.argv))


For me, it works around by using 'ARCHFLAGS="-arch x86_64"'

 $ ARCHFLAGS="-arch x86_64" ninja -C build


should this flag be in meson.build ?
Comment 14 GStreamer system administrator 2018-11-03 11:04:53 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-build/issues/5.