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 639324 - Error trying to run gnome-shell
Error trying to run gnome-shell
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: building
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on: 640446
Blocks:
 
 
Reported: 2011-01-12 15:41 UTC by Andreas Nilsson
Modified: 2011-02-06 11:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
BluetoothStatus: remove library dependency (826 bytes, patch)
2011-01-24 17:41 UTC, Giovanni Campagna
none Details | Review
BluetoothStatus: depend more on libgnome-bluetooth-applet (1.16 KB, patch)
2011-01-25 18:41 UTC, Giovanni Campagna
committed Details | Review

Description Andreas Nilsson 2011-01-12 15:41:33 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
Comment 1 Giovanni Campagna 2011-01-12 16:00:43 UTC
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)
Comment 2 Andreas Nilsson 2011-01-12 16:09:16 UTC
It seems, ~/gnome-shell/install/lib/gnome-bluetooth/libgnome-bluetooth-applet.la don't exist on my system.
Comment 3 Giovanni Campagna 2011-01-12 17:26:13 UTC
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
Comment 4 Andreas Nilsson 2011-01-13 02:14:23 UTC
Got the two first steps working.
Running the readelf command gives me the following:
http://pastebin.com/Ryu90T8i
Comment 5 Giovanni Campagna 2011-01-13 14:10:43 UTC
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.
Comment 6 Giovanni Campagna 2011-01-13 14:19:31 UTC
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.
Comment 7 Dan Winship 2011-01-24 17:37:03 UTC
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
Comment 8 Giovanni Campagna 2011-01-24 17:41:08 UTC
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.
Comment 9 Giovanni Campagna 2011-01-24 17:43:06 UTC
(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.
Comment 10 Dan Winship 2011-01-24 18:19:25 UTC
(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.
Comment 11 Giovanni Campagna 2011-01-25 18:41:23 UTC
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).
Comment 12 Colin Walters 2011-01-27 15:26:08 UTC
Review of attachment 179306 [details] [review]:

Looks fine to me.
Comment 13 Giovanni Campagna 2011-02-06 11:13:05 UTC
Attachment 179306 [details] pushed as b6749f4 - BluetoothStatus: depend more on libgnome-bluetooth-applet