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 773867 - g-i: git master fails to build using JHbuild and meson
g-i: git master fails to build using JHbuild and meson
Status: RESOLVED NOTGNOME
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-11-03 01:20 UTC by Mohammed Sadiq
Modified: 2016-11-11 11:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mohammed Sadiq 2016-11-03 01:20:39 UTC
gstreamer failes to build from git master using JHBuild.

Relevant part from build log:

[101/442] 'Generating Gst-1.0.gir with a custom command.'
FAILED: gst/Gst-1.0.gir 
'g-ir-scanner' '../../../../jhbuild/checkout/gstreamer/gst/gst.c' '../../../../jhbuild/checkout/gstreamer/gst/gstobject.c' '../../../../jhbuild/checkout/gstreamer/gst/gstallocator.c' '../../../../jhbuild/checkout/gstreamer/gst/gstbin.c' '../../../../jhbuild/checkout/gstreamer/gst/gstbuffer.c' '../../../../jhbuild/checkout/gstreamer/gst/gstbufferlist.c' '../../../../jhbuild/checkout/gstreamer/gst/gstbufferpool.c' '../../../../jhbuild/checkout/gstreamer/gst/gstbus.c' '../../../../jhbuild/checkout/gstreamer/gst/gstcaps.c' '../../../../jhbuild/checkout/gstreamer/gst/gstcapsfeatures.c' '../../../../jhbuild/checkout/gstreamer/gst/gstchildproxy.c' '../../../../jhbuild/checkout/gstreamer/gst/gstclock.c' '../../../../jhbuild/checkout/gstreamer/gst/gstclock-linreg.c' '../../../../jhbuild/checkout/gstreamer/gst/gstcontext.c' '../../../../jhbuild/checkout/gstreamer/gst/gstcontrolbinding.c' '../../../../jhbuild/checkout/gstreamer/gst/gstcontrolsource.c' '../../../../jhbuild/checkout/gstreamer/gst/gstdatetime.c' '../../../../jhbuild/checkout/gstreamer/gst/gstdebugutils.c' '../../../../jhbuild/checkout/gstreamer/gst/gstdevice.c' '../../../../jhbuild/checkout/gstreamer/gst/gstdeviceprovider.c' '../../../../jhbuild/checkout/gstreamer/gst/gstdeviceproviderfactory.c' '../../../../jhbuild/checkout/gstreamer/gst/gstdynamictypefactory.c' '../../../../jhbuild/checkout/gstreamer/gst/gstelement.c' '../../../../jhbuild/checkout/gstreamer/gst/gstelementfactory.c' '../../../../jhbuild/checkout/gstreamer/gst/gsterror.c' '../../../../jhbuild/checkout/gstreamer/gst/gstevent.c' '../../../../jhbuild/checkout/gstreamer/gst/gstformat.c' '../../../../jhbuild/checkout/gstreamer/gst/gstghostpad.c' '../../../../jhbuild/checkout/gstreamer/gst/gstdevicemonitor.c' '../../../../jhbuild/checkout/gstreamer/gst/gstinfo.c' '../../../../jhbuild/checkout/gstreamer/gst/gstiterator.c' '../../../../jhbuild/checkout/gstreamer/gst/gstatomicqueue.c' '../../../../jhbuild/checkout/gstreamer/gst/gstmessage.c' '../../../../jhbuild/checkout/gstreamer/gst/gstmeta.c' '../../../../jhbuild/checkout/gstreamer/gst/gstmemory.c' '../../../../jhbuild/checkout/gstreamer/gst/gstminiobject.c' '../../../../jhbuild/checkout/gstreamer/gst/gstpad.c' '../../../../jhbuild/checkout/gstreamer/gst/gstpadtemplate.c' '../../../../jhbuild/checkout/gstreamer/gst/gstparamspecs.c' '../../../../jhbuild/checkout/gstreamer/gst/gstpipeline.c' '../../../../jhbuild/checkout/gstreamer/gst/gstplugin.c' '../../../../jhbuild/checkout/gstreamer/gst/gstpluginfeature.c' '../../../../jhbuild/checkout/gstreamer/gst/gstpluginloader.c' '../../../../jhbuild/checkout/gstreamer/gst/gstpoll.c' '../../../../jhbuild/checkout/gstreamer/gst/gstpreset.c' '../../../../jhbuild/checkout/gstreamer/gst/gstprotection.c' '../../../../jhbuild/checkout/gstreamer/gst/gstquark.c' '../../../../jhbuild/checkout/gstreamer/gst/gstquery.c' '../../../../jhbuild/checkout/gstreamer/gst/gstregistry.c' '../../../../jhbuild/checkout/gstreamer/gst/gstregistrychunks.c' '../../../../jhbuild/checkout/gstreamer/gst/gstsample.c' '../../../../jhbuild/checkout/gstreamer/gst/gstsegment.c' '../../../../jhbuild/checkout/gstreamer/gst/gststreamcollection.c' '../../../../jhbuild/checkout/gstreamer/gst/gststreams.c' '../../../../jhbuild/checkout/gstreamer/gst/gststructure.c' '../../../../jhbuild/checkout/gstreamer/gst/gstsystemclock.c' '../../../../jhbuild/checkout/gstreamer/gst/gsttaglist.c' '../../../../jhbuild/checkout/gstreamer/gst/gsttagsetter.c' '../../../../jhbuild/checkout/gstreamer/gst/gsttask.c' '../../../../jhbuild/checkout/gstreamer/gst/gsttaskpool.c' '../../../../jhbuild/checkout/gstreamer/gst/gsttoc.c' '../../../../jhbuild/checkout/gstreamer/gst/gsttocsetter.c' '../../../../jhbuild/checkout/gstreamer/gst/gsttracer.c' '../../../../jhbuild/checkout/gstreamer/gst/gsttracerfactory.c' '../../../../jhbuild/checkout/gstreamer/gst/gsttracerrecord.c' '../../../../jhbuild/checkout/gstreamer/gst/gsttracerutils.c' '../../../../jhbuild/checkout/gstreamer/gst/gsttypefind.c' '../../../../jhbuild/checkout/gstreamer/gst/gsttypefindfactory.c' '../../../../jhbuild/checkout/gstreamer/gst/gsturi.c' '../../../../jhbuild/checkout/gstreamer/gst/gstutils.c' '../../../../jhbuild/checkout/gstreamer/gst/gstvalue.c' '../../../../jhbuild/checkout/gstreamer/gst/gstparse.c' '../../../../jhbuild/checkout/gstreamer/gst/gst.h' '../../../../jhbuild/checkout/gstreamer/gst/glib-compat.h' '../../../../jhbuild/checkout/gstreamer/gst/gstobject.h' '../../../../jhbuild/checkout/gstreamer/gst/gstallocator.h' '../../../../jhbuild/checkout/gstreamer/gst/gstbin.h' '../../../../jhbuild/checkout/gstreamer/gst/gstbuffer.h' '../../../../jhbuild/checkout/gstreamer/gst/gstbufferlist.h' '../../../../jhbuild/checkout/gstreamer/gst/gstbufferpool.h' '../../../../jhbuild/checkout/gstreamer/gst/gstbus.h' '../../../../jhbuild/checkout/gstreamer/gst/gstcaps.h' '../../../../jhbuild/checkout/gstreamer/gst/gstcapsfeatures.h' '../../../../jhbuild/checkout/gstreamer/gst/gstchildproxy.h' '../../../../jhbuild/checkout/gstreamer/gst/gstclock.h' '../../../../jhbuild/checkout/gstreamer/gst/gstcompat.h' '../../../../jhbuild/checkout/gstreamer/gst/gstcontext.h' '../../../../jhbuild/checkout/gstreamer/gst/gstcontrolbinding.h' '../../../../jhbuild/checkout/gstreamer/gst/gstcontrolsource.h' '../../../../jhbuild/checkout/gstreamer/gst/gstdatetime.h' '../../../../jhbuild/checkout/gstreamer/gst/gstdebugutils.h' '../../../../jhbuild/checkout/gstreamer/gst/gstelement.h' '../../../../jhbuild/checkout/gstreamer/gst/gstelementmetadata.h' '../../../../jhbuild/checkout/gstreamer/gst/gstdevice.h' '../../../../jhbuild/checkout/gstreamer/gst/gstdeviceprovider.h' '../../../../jhbuild/checkout/gstreamer/gst/gstdeviceproviderfactory.h' '../../../../jhbuild/checkout/gstreamer/gst/gstdynamictypefactory.h' '../../../../jhbuild/checkout/gstreamer/gst/gstelementfactory.h' '../../../../jhbuild/checkout/gstreamer/gst/gsterror.h' '../../../../jhbuild/checkout/gstreamer/gst/gstevent.h' '../../../../jhbuild/checkout/gstreamer/gst/gstformat.h' '../../../../jhbuild/checkout/gstreamer/gst/gstghostpad.h' '../../../../jhbuild/checkout/gstreamer/gst/gstdevicemonitor.h' '../../../../jhbuild/checkout/gstreamer/gst/gstinfo.h' '../../../../jhbuild/checkout/gstreamer/gst/gstiterator.h' '../../../../jhbuild/checkout/gstreamer/gst/gstatomicqueue.h' '../../../../jhbuild/checkout/gstreamer/gst/gstmacros.h' '../../../../jhbuild/checkout/gstreamer/gst/gstmessage.h' '../../../../jhbuild/checkout/gstreamer/gst/gstmeta.h' '../../../../jhbuild/checkout/gstreamer/gst/gstmemory.h' '../../../../jhbuild/checkout/gstreamer/gst/gstminiobject.h' '../../../../jhbuild/checkout/gstreamer/gst/gstpad.h' '../../../../jhbuild/checkout/gstreamer/gst/gstpadtemplate.h' '../../../../jhbuild/checkout/gstreamer/gst/gstparamspecs.h' '../../../../jhbuild/checkout/gstreamer/gst/gstpipeline.h' '../../../../jhbuild/checkout/gstreamer/gst/gstplugin.h' '../../../../jhbuild/checkout/gstreamer/gst/gstpluginfeature.h' '../../../../jhbuild/checkout/gstreamer/gst/gstpoll.h' '../../../../jhbuild/checkout/gstreamer/gst/gstpreset.h' '../../../../jhbuild/checkout/gstreamer/gst/gstprotection.h' '../../../../jhbuild/checkout/gstreamer/gst/gstquery.h' '../../../../jhbuild/checkout/gstreamer/gst/gstsample.h' '../../../../jhbuild/checkout/gstreamer/gst/gstsegment.h' '../../../../jhbuild/checkout/gstreamer/gst/gststreamcollection.h' '../../../../jhbuild/checkout/gstreamer/gst/gststreams.h' '../../../../jhbuild/checkout/gstreamer/gst/gststructure.h' '../../../../jhbuild/checkout/gstreamer/gst/gstsystemclock.h' '../../../../jhbuild/checkout/gstreamer/gst/gsttaglist.h' '../../../../jhbuild/checkout/gstreamer/gst/gsttagsetter.h' '../../../../jhbuild/checkout/gstreamer/gst/gsttask.h' '../../../../jhbuild/checkout/gstreamer/gst/gsttaskpool.h' '../../../../jhbuild/checkout/gstreamer/gst/gsttoc.h' '../../../../jhbuild/checkout/gstreamer/gst/gsttocsetter.h' '../../../../jhbuild/checkout/gstreamer/gst/gsttracer.h' '../../../../jhbuild/checkout/gstreamer/gst/gsttracerfactory.h' '../../../../jhbuild/checkout/gstreamer/gst/gsttracerrecord.h' '../../../../jhbuild/checkout/gstreamer/gst/gsttypefind.h' '../../../../jhbuild/checkout/gstreamer/gst/gsttypefindfactory.h' '../../../../jhbuild/checkout/gstreamer/gst/gsturi.h' '../../../../jhbuild/checkout/gstreamer/gst/gstutils.h' '../../../../jhbuild/checkout/gstreamer/gst/gstvalue.h' '../../../../jhbuild/checkout/gstreamer/gst/gstregistry.h' '../../../../jhbuild/checkout/gstreamer/gst/gstparse.h' '../../../../jhbuild/checkout/gstreamer/gst/math-compat.h' '-I/home/sadiq/jhbuild/install/include/gobject-introspection-1.0' '-I/home/sadiq/jhbuild/install/include/glib-2.0' '-I/home/sadiq/jhbuild/install/lib/glib-2.0/include' '-pthread' '--no-libtool' '--namespace=Gst' '--nsversion=1.0' '--warn-all' '--output' 'gst/Gst-1.0.gir' '--add-init-section=extern void gst_init(gint*,gchar**); gst_init(NULL,NULL);' '--c-include=gst/gst.h' '-I/home/sadiq/jhbuild/checkout/gstreamer/gst' '-I/home/sadiq/.cache/jhbuild/build/gstreamer/.' '-I/home/sadiq/jhbuild/checkout/gstreamer/.' '-I/home/sadiq/.cache/jhbuild/build/gstreamer/gst/parse' '-I/home/sadiq/jhbuild/checkout/gstreamer/gst/parse' '--include=GLib-2.0' '--include=GObject-2.0' '--include=GModule-2.0' '--symbol-prefix=gst' '--identifier-prefix=Gst' '--pkg-export=gstreamer-1.0' '.' '-I/home/sadiq/jhbuild/install/include/glib-2.0' '-I/home/sadiq/jhbuild/install/lib/glib-2.0/include' '-pthread' 'parse' '-lgmodule-2.0' '-lm' '-lglib-2.0' '-lgobject-2.0' '-L/home/sadiq/jhbuild/install/lib' '-pthread' '-L/home/sadiq/.cache/jhbuild/build/gstreamer/gst' '--library' 'gstreamer-1.0'
tmp-introspectfs0gc9gf/home/sadiq/.cache/jhbuild/build/gstreamer/tmp-introspectfs0gc9gf/Gst-1.0.o:(.data.rel+0x1b8): undefined reference to `gst_dynamic_type_factory_get_type'
collect2: error: ld returned 1 exit status
Traceback (most recent call last):
  • File "/usr/lib/python3.5/distutils/unixccompiler.py", line 207 in link
    self.spawn(linker + ld_args)
  • File "/usr/lib/python3.5/distutils/ccompiler.py", line 909 in spawn
    spawn(cmd, dry_run=self.dry_run)
  • File "/usr/lib/python3.5/distutils/spawn.py", line 36 in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  • File "/usr/lib/python3.5/distutils/spawn.py", line 159 in _spawn_posix
    % (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'x86_64-linux-gnu-gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/sadiq/jhbuild/install/lib/gobject-introspection/giscanner/dumper.py", line 277, in _link
    args)
  File "/home/sadiq/jhbuild/install/lib/gobject-introspection/giscanner/ccompiler.py", line 257, in link
    extra_postargs=extra_postargs)
  File "/usr/lib/python3.5/distutils/unixccompiler.py", line 209, in link
    raise LinkError(msg)
distutils.errors.LinkError: command 'x86_64-linux-gnu-gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/sadiq/jhbuild/install/bin/g-ir-scanner", line 66, in <module>
    sys.exit(scanner_main(sys.argv))
  File "/home/sadiq/jhbuild/install/lib/gobject-introspection/giscanner/scannermain.py", line 544, in scanner_main
    shlibs = create_binary(transformer, options, args)
  File "/home/sadiq/jhbuild/install/lib/gobject-introspection/giscanner/scannermain.py", line 419, in create_binary
    gdump_parser.get_error_quark_functions())
  File "/home/sadiq/jhbuild/install/lib/gobject-introspection/giscanner/dumper.py", line 328, in compile_introspection_binary
    return dc.run()
  File "/home/sadiq/jhbuild/install/lib/gobject-introspection/giscanner/dumper.py", line 174, in run
    self._link(bin_path, introspection_obj)
  File "/home/sadiq/jhbuild/install/lib/gobject-introspection/giscanner/dumper.py", line 296, in _link
    raise LinkError(e)
distutils.errors.LinkError: command 'x86_64-linux-gnu-gcc' failed with exit status 1
ninja: build stopped: subcommand failed.
Comment 1 Matthew Waters (ystreet00) 2016-11-03 05:27:52 UTC
I just had this as well.

This seems to be because the GI infrastructure is looking in the prefix before the build directory:

3910:[pid 12469] open("./libgstreamer-1.0.so", O_RDONLY) = -1 ENOENT (No such file or directory)
3911:[pid 12469] open("./libgstreamer-1.0.a", O_RDONLY) = -1 ENOENT (No such file or directory)
3912:[pid 12469] open("/home/matt/Projects/jhbuild/native/usr/lib/libgstreamer-1.0.so", O_RDONLY) = 17
3913:[pid 12469] open("/home/matt/Projects/jhbuild/native/usr/lib/libgstreamer-1.0.so", O_RDONLY) = 18

after removing /home/matt/Projects/jhbuild/native/usr/lib/libgstreamer-1.0.so

3912:[pid 22549] open("./libgstreamer-1.0.so", O_RDONLY) = -1 ENOENT (No such file or directory)
3913:[pid 22549] open("./libgstreamer-1.0.a", O_RDONLY) = -1 ENOENT (No such file or directory)
3914:[pid 22549] open("/home/matt/Projects/jhbuild/native/usr/lib/libgstreamer-1.0.so", O_RDONLY) = -1 ENOENT (No such file or directory)
3915:[pid 22549] open("/home/matt/Projects/jhbuild/native/usr/lib/libgstreamer-1.0.a", O_RDONLY) = -1 ENOENT (No such file or directory)
3916:[pid 22549] open("/home/matt/Projects/jhbuild/native/usr/lib/libgstreamer-1.0.so", O_RDONLY) = -1 ENOENT (No such file or directory)
3917:[pid 22549] open("/home/matt/Projects/jhbuild/native/usr/lib/libgstreamer-1.0.a", O_RDONLY) = -1 ENOENT (No such file or directory)
3918:[pid 22549] open("/home/matt/.cache/jhbuild/build/gstreamer/gst/libgstreamer-1.0.so", O_RDONLY) = 17
3919:[pid 22549] open("/home/matt/.cache/jhbuild/build/gstreamer/gst/libgstreamer-1.0.so", O_RDONLY) = 18

and the build succeeds
Comment 2 Tim-Philipp Müller 2016-11-03 09:04:44 UTC
Is this our fault then? Because in the command line we have:

'-L/home/sadiq/jhbuild/install/lib' ...' '-L/home/sadiq/.cache/jhbuild/build

Maybe we should pass a -L. first or so?

By what mechanism does it work with the autotools/g-ir-scanner build? Will libtool set LD_LIBRARY_PATH to the current build dir or how does it work?

https://cgit.freedesktop.org/gstreamer/gstreamer/tree/gst/Makefile.am#n280 for reference.

And does it need fixing in gstreamer or in the meson gnome module?
Comment 3 Matthew Waters (ystreet00) 2016-11-03 14:41:10 UTC
The problem is in meson's gnome module as it adds the builddir last instead of before all the other dependencies.

Pull request is here: https://github.com/mesonbuild/meson/pull/989
Comment 4 Tim-Philipp Müller 2016-11-11 11:33:38 UTC
Let's close this then, since it needs fixing in Meson.

The fix (and others) should hopefully land before the weekend and then we can require the new meson version in GStreamer.

Thanks for the bug report.