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 767456 - Fix plugins not finding their data in jhbuild
Fix plugins not finding their data in jhbuild
Status: RESOLVED OBSOLETE
Product: rhythmbox
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-06-09 15:09 UTC by Bastien Nocera
Modified: 2018-05-24 18:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
shell: Fix crash when menu doesn't exist (1.20 KB, patch)
2016-06-09 15:09 UTC, Bastien Nocera
committed Details | Review
build: Fix plugins not finding their data in jhbuild (1.53 KB, patch)
2016-06-09 15:09 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2016-06-09 15:09:49 UTC
.
Comment 1 Bastien Nocera 2016-06-09 15:09:53 UTC
Created attachment 329477 [details] [review]
shell: Fix crash when menu doesn't exist

 #0  0x00007fffef7db4a5 in g_menu_model_get_n_items (model=0x0) at gmenumodel.c:493
 #1  0x00007ffff7aa07b1 in rb_application_link_shared_menus (app=0x628840, menu=0x0) at /jhbuild/rhythmbox/shell/rb-application.c:778
 #2  0x00007fffca9c6444 in rb_iradio_source_new (shell=0x8df1b0, plugin=0x1172a50) at /jhbuild/rhythmbox/plugins/iradio/rb-iradio-source.c:458
 #3  0x00007fffca9c523a in impl_activate (plugin=0x1172a50) at /jhbuild/rhythmbox/plugins/iradio/rb-iradio-plugin.c:89
Comment 2 Bastien Nocera 2016-06-09 15:09:59 UTC
Created attachment 329478 [details] [review]
build: Fix plugins not finding their data in jhbuild

Now that jhbuild launches configure from a different builddir, `pwd`
isn't the root of the source tree, but the builddir. Using `dirname $0`
instead means that ROOT_UNINSTALLED_DIR will be the source tree instead
of the builddir.
Comment 3 Jonathan Matthew 2016-06-10 22:46:25 UTC
there are more problems with srcdir != builddir uninstalled builds besides those, mostly related to plugin loading.
Comment 4 Bastien Nocera 2016-06-12 17:28:28 UTC
That was enough to make it not crash on startup on my system, when built using the latest jhbuild.

There's probably more to unravel, but it will crash on startup when built from jhbuild otherwise.
Comment 5 Jonathan Matthew 2016-06-13 22:23:49 UTC
Review of attachment 329477 [details] [review]:

pushed as commit 396e6b5
Comment 6 Jonathan Matthew 2016-06-13 22:25:48 UTC
Review of attachment 329478 [details] [review]:

SHARE_UNINSTALLED_BUILDDIR and METADATA_UNINSTALLED_DIR are supposed to refer to the build directory as they're used to locate built executables, so I left those alone, but otherwise pushed as commit 8738f0d
Comment 7 Jonathan Matthew 2016-06-13 22:26:46 UTC
commits b167734 and 0cdc753 fix a few more pieces, but python plugins still don't work at all.  I'm not sure how to fix that.
Comment 8 gnome.vrb 2016-12-23 11:58:05 UTC
In jhbuild,

For ipod plugin: ( shared lib ) 

Thread 1 "rhythmbox" hit Breakpoint 1, peas_plugin_loader_load (loader=0x55ff2a7b8470, info=0x55ff2ab6fe40) at /home/dev/jhbuild/checkout/libpeas/libpeas/peas-plugin-loader.c:90

gdb) p *info
$3 = {
  refcount = 1, 
  loader_data = 0x0, 
  filename = 0x55ff2ab6c430 "/home/dev/.cache/jhbuild/build/rhythmbox/data/../plugins/ipod/ipod.plugin", 
  module_dir = 0x55ff2ab6b9e0 "/home/dev/.cache/jhbuild/build/rhythmbox/data/../plugins/ipod", 
  data_dir = 0x55ff2ab6b930 "/home/dev/jhbuild/checkout/rhythmbox/data/../plugins/ipod", 
..
}

For soundcloud plugin: ( python based )

(gdb) p *info
$1 = {
  refcount = 1, 
  loader_data = 0x0, 
  filename = 0x55ff2ab6ea50 "/home/dev/.cache/jhbuild/build/rhythmbox/data/../plugins/soundcloud/soundcloud.plugin", 
  module_dir = 0x55ff2ab6fd00 "/home/dev/.cache/jhbuild/build/rhythmbox/data/../plugins/soundcloud", 
  data_dir = 0x55ff2ab710d0 "/home/dev/jhbuild/checkout/rhythmbox/data/../plugins/soundcloud", 
...
}

In both cases, "module_dir" points to build dir, which has the .so file under ".libs/" dir. Trying to remove the .so file resulted in the following libpeas warning.

(rhythmbox:10357): libpeas-WARNING **: Failed to load module 'ipod': /home/dev/.cache/jhbuild/build/rhythmbox/data/../plugins/ipod/.libs/libipod.so: cannot open shared object file: No such file or directory

But, for python plugins, there is nothing to build, so there is just 2 files (Makefile / soundcloud.plugin) in build dir. libpeas loads .plugin and expects .py from the samedir, but cannot find them. Hence, the import failure.
Comment 9 gnome.vrb 2016-12-23 12:01:24 UTC
I am not sure, what was the intention behind "USE_UNINSTALLED_DIRS". 

1. In the direct git build scenario, this is disabled, and the plugins are loaded from LIBDIR.

2. In jhbuild case, USE_UNINSTALLED_DIRS is used, but it doesn't seem to work for python ( and possibly lua ) plugins.
Comment 10 gnome.vrb 2016-12-24 07:57:03 UTC
(In reply to vrishab from comment #9)

> 2. In jhbuild case, USE_UNINSTALLED_DIRS is used, but it doesn't seem to
> work for python ( and possibly lua ) plugins.

lua -> vala
Comment 11 GNOME Infrastructure Team 2018-05-24 18:54:08 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME'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.gnome.org/GNOME/rhythmbox/issues/1460.