GNOME Bugzilla – Bug 639324
Error trying to run gnome-shell
Last modified: 2011-02-06 11:13:09 UTC
On Ubuntu Natty. Hardware is Acer Aspire One. Compile goes fine, but when I try to launch it I get: Window manager warning: Log level 16: Failed to load shared library 'libgnome-bluetooth-applet.so.0' referenced by the typelib: libgnome-bluetooth-applet.so.0.so: cannot open shared object file: No such file or directory followed by: Window manager warning: Log level 8: g_ascii_strncasecmp: assertion `s2 != NULL' failed
It seems that libgnome-shell is not linking to libgnome-bluetooth-applet, but we need more info to fix it. First, check that ~/gnome-shell/install/lib/gnome-bluetooth/libgnome-bluetooth-applet.la exists. Second, check src/Makefile (in gnome-shell build dir) for BLUETOOTH_LIBS. Should contain the same path from point one. Third, run "readelf -d ~/gnome-shell/install/lib/mutter/plugins/libgnome-shell.so". Should have a needed dep on libgnome-bluetooth-applet.so.0. (Replace lib with lib64 or what is appropriate for your arch/distro)
It seems, ~/gnome-shell/install/lib/gnome-bluetooth/libgnome-bluetooth-applet.la don't exist on my system.
Did you install gnome-bluetooth from git master, in the same prefix as gnome-shell? Try make clean && ./config.status --recheck && make && make install in gnome-bluetooth directory
Got the two first steps working. Running the readelf command gives me the following: http://pastebin.com/Ryu90T8i
Using --as-needed, I suppose. (which means that libgnome-bluetooth-applet is not loaded because it is only used by JS code). As a workaround, try rm src/libgnome-shell.la make LDFLAGS=-Wl,--no-as-needed make install I will submit a patch to fix it for everyone.
Ok, no easy fix available, because good libtool insists in moving my arguments at the end. Instead I should make that library dynamic loadable, which means moving it into somewhere else, or fixing gobject-introspection to have full paths in typelibs.
you could just add a dummy libgnomeshell function that calls into libgnome-bluetooth-applet, so that the linker wouldn't be able to drop the dependency
Created attachment 179195 [details] [review] BluetoothStatus: remove library dependency With the new fix in gobject-introspection, libgnome-bluetooth-applet can be dynamically loaded, so the hack to link to it is not needed anymore.
(In reply to comment #7) > you could just add a dummy libgnomeshell function that calls into > libgnome-bluetooth-applet, so that the linker wouldn't be able to drop the > dependency And what would it call? I don't want to create a new GObject, which is making synchronous dbus calls, just to perpetrate a hack.
(In reply to comment #9) > (In reply to comment #7) > > you could just add a dummy libgnomeshell function that calls into > > libgnome-bluetooth-applet, so that the linker wouldn't be able to drop the > > dependency > > And what would it call? It doesn't matter what it calls, because it will never actually be run. It's just there to stop the linker from being clever.
Created attachment 179306 [details] [review] BluetoothStatus: depend more on libgnome-bluetooth-applet Ensure that a dependency is generated even when using --as-needed, by adding a fake function that calls into the library. Another way to fix this bug, without changes to gobject-introspection (which I still think would be appropriate, though).
Review of attachment 179306 [details] [review]: Looks fine to me.
Attachment 179306 [details] pushed as b6749f4 - BluetoothStatus: depend more on libgnome-bluetooth-applet