GNOME Bugzilla – Bug 781148
gst-build does not work on macOS
Last modified: 2018-11-03 11:04:53 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.
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.)
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.
Created attachment 349622 [details] [review] Allow disabling introspection from toplevel gst-build
With that -Ddisable_introspection in gst-build should work.
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
(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
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.
(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 :)
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)
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 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
(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
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):
+ Trace 238405
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 ?
-- 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.