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 580419 - Remove deprecated libgnome dependency
Remove deprecated libgnome dependency
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: general
2.26.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
evolution[cleanup]
: 506509 541111 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-04-27 11:04 UTC by André Klapper
Modified: 2009-08-24 19:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed eds patch (5.99 KB, patch)
2009-04-30 12:46 UTC, Milan Crha
none Details | Review

Description André Klapper 2009-04-27 11:04:31 UTC
http://live.gnome.org/LibgnomeMustDie
This library will be removed for GNOME 3.


$:andre\> grep -r "<libgnome" .
./src/server.c:                       #include <libgnome/gnome-init.h>
./servers/exchange/lib/test-utils.c:  #include <libgnome/gnome-util.h>

./configure.in: m4_define([libgnome_minimum_version], [2.0.0]) # XXX Just a Guess
./configure.in: libgnome-2.0 >= libgnome_minimum_version
./configure.in: E_FACTORY_DEPS="libgnome-2.0 $mozilla_nspr"


I'm also surprised about this check:
./configure.in: AC_MSG_CHECKING(for libgnomeui server directory)
./configure.in: GNOMEUI_SERVERDIR="`$PKG_CONFIG --variable=libgnomeui_serverdir libgnomeui-2.0`"
e-d-s does not have a single include for libgnomeui but maybe I simply don't get it.
Comment 1 Milan Crha 2009-04-27 13:55:34 UTC
(In reply to comment #0)
> http://live.gnome.org/LibgnomeMustDie
> This library will be removed for GNOME 3.
> 
> 
> $:andre\> grep -r "<libgnome" .
> ./src/server.c:                       #include <libgnome/gnome-init.h>
> ./servers/exchange/lib/test-utils.c:  #include <libgnome/gnome-util.h>
> 
> ./configure.in: m4_define([libgnome_minimum_version], [2.0.0]) # XXX Just a
> Guess
> ./configure.in: libgnome-2.0 >= libgnome_minimum_version
> ./configure.in: E_FACTORY_DEPS="libgnome-2.0 $mozilla_nspr"

What's the correct replacement for gnome_program_init with all the features it offers?

> I'm also surprised about this check:
> ./configure.in: AC_MSG_CHECKING(for libgnomeui server directory)
> ./configure.in: GNOMEUI_SERVERDIR="`$PKG_CONFIG --variable=libgnomeui_serverdir
> libgnomeui-2.0`"
> e-d-s does not have a single include for libgnomeui but maybe I simply don't
> get it.

Two lines below:
AC_DEFINE_UNQUOTED(GNOMEUI_SERVERDIR, "$GNOMEUI_SERVERDIR", [Path where we can find gnome_segv2])
Comment 2 André Klapper 2009-04-27 14:03:33 UTC
(In reply to comment #1)
> What's the correct replacement for gnome_program_init with all the features it
> offers?

See http://live.gnome.org/LibgnomeMustDie ?
If something's missing, add it. Or ask in public.

> AC_DEFINE_UNQUOTED(GNOMEUI_SERVERDIR, "$GNOMEUI_SERVERDIR", [Path where we can
> find gnome_segv2])

Ah. Darn. Is that gnome_segv2 stuff functional at all?!
Comment 3 Milan Crha 2009-04-27 14:31:15 UTC
If I could understand it from the page, I wouldn't ask, really. I also considered this as a public place.

It seems to me that the gnome_segv2 doesn't work, as on my F10 box the eds is able to silently die, no bug-buddy, nothing, whereas evolution usually shows back trace and everything, when saying its bye-bye on something unexpected by devs.
Comment 4 Matthew Barnes 2009-04-27 14:44:32 UTC
(In reply to comment #2)
> What's the correct replacement for gnome_program_init with all the features it
> offers?

gtk_init() or gtk_init_with_args()

> Ah. Darn. Is that gnome_segv2 stuff functional at all?!

No.  See bug #541111.
Comment 5 André Klapper 2009-04-27 14:46:57 UTC
(In reply to comment #4)
> gtk_init() or gtk_init_with_args()

Willing to add this to the wikipage?
Comment 6 Matthew Barnes 2009-04-27 15:00:47 UTC
Done.
Comment 7 Milan Crha 2009-04-30 12:46:19 UTC
Created attachment 133652 [details] [review]
proposed eds patch

for evolution-data-server;

not as that big changes, but I'm not sure, thus rather asking a review.

Matt, thanks for the pointers. One think I do not understand is that it requires gtk+ now, which is kinda strange for the server itself, as that runs in the background. But it works, as far as i can tell. The test_... file seems to not be used.

With respect to bug-buddy, it's not shown when evolution itself starts eds, but when I run eds on the console, then bug-buddy catches it, though claims it doesn't know eds, thus offers only save of the report. We can try to solve it within Matt's above bug, though this change solves it anyway. I'm not sure what to do next.
Comment 8 Matthew Barnes 2009-05-01 03:11:28 UTC
Yeah, the server should not be linking to GTK+.  I think you can just drop the gtk_init().  bonobo_init_full() will process the command-line arguments.

I think Bug Buddy doesn't know about E-D-S because there's no .desktop file for it.  I guess we could write one and set Hidden=true so it doesn't show up in the Applications menu.  Not sure if that's the right move.

Thing is, libgnomebreakpad.so is a GTK+ module, so Bug Buddy might just be entirely out of reach of the E-D-S server now.

Marking the patch as needs work, but I think you just need to drop the GTK+ linkage in the server.
Comment 9 André Klapper 2009-05-03 19:43:23 UTC
Just to be official Fer just updated http://live.gnome.org/LibgnomeMustDie :
"gnome_segv program replaced by the libgnomebreakpad.so GTK_MODULE included in bug-buddy."
Comment 10 Milan Crha 2009-05-04 14:12:49 UTC
Bad. It seems the server should depend on gtk+, as it depended on libgnomeui, because otherwise no luck with bug-buddy even when run eds from the console. It seems the bug-buddy is very tight to gtk+. But, apart of this, the server cannot be run out of the X, which is not what we want, as I understand it.

I'm a bit lost (again). Does this really mean that no bug-buddy for eds?
Comment 11 Cosimo Cecchi 2009-05-04 16:47:20 UTC
The libgnomebreakpad.so is a GTK+ module, meaning that it will be loaded every time gtk_init() (or g_option_context_parse(), if you added the GTK+ GOptionGroup to the context) is called.
That module requires X and some GDK functions to release X locks that might be there and moreover plain GLib does not offer a way to load modules like GTK+ does.

There's a way around it: you can copy-paste the relevant signal handler code from bug-buddy/gnome-breakpad/gnome-breakpad.cc, remove the GTK+ (and the google-breakpad) parts and ship it within the server. That piece of code has no other external dependencies and if you drop the google-breakpad/GTK+/init pieces, it shouldn't be much more than 200 lines of code.
Comment 12 Matthew Barnes 2009-05-04 16:52:00 UTC
I'm not sure showing a Bug Buddy window for a backend process crashing is the right thing to do anyway.  The real question is how to make E-D-S clients better detect and handle the situation.  Obviously some thought was given to this in the past because the hooks are there, but it's either bit rotted or never worked very well to begin with.

CC'ing ross since this is more his territory.
Comment 13 Cosimo Cecchi 2009-05-04 18:39:56 UTC
(In reply to comment #12)
> I'm not sure showing a Bug Buddy window for a backend process crashing is the
> right thing to do anyway.  The real question is how to make E-D-S clients
> better detect and handle the situation.

Yeah, I definitely agree with you.
Comment 14 André Klapper 2009-05-07 17:59:41 UTC
won't eds depend on gtk anyway by fixing bug 581288 (libglade -> gtkbuilder)?
Comment 15 Milan Crha 2009-05-07 18:12:15 UTC
From my point of view, just commit patch which will not use gtk+ in server.c and done. No idea how better one can handle sigsegv and not depends on gtk+ stuff (neither copying 200 lines of code from somewhere). So this way and done.

The other parts of eds will still require gtk, as the libedataserverui.
Comment 16 Matthew Barnes 2009-05-07 19:42:04 UTC
libedataserverui is the -only- part that should require GTK+.
Comment 17 Milan Crha 2009-05-19 14:24:25 UTC
any objections against comment #15?
Comment 18 Ross Burton 2009-05-19 14:45:09 UTC
Personally I have no problem with seeing the entire failed attempt at crash detection removed from evolution-data-server.  eds-dbus removes it too. :)
Comment 19 Matthew Barnes 2009-05-19 15:24:05 UTC
(In reply to comment #17)
> any objections against comment #15?

No objections.  I agree with Ross, just ditch the crash detection.

Go ahead and commit the rest of the patch.

Comment 20 Milan Crha 2009-05-19 15:45:33 UTC
Created commit 7f5d404 in master.

Just removed all related parts from server.c file.
Comment 21 Milan Crha 2009-05-20 09:35:52 UTC
*** Bug 541111 has been marked as a duplicate of this bug. ***
Comment 22 Matthew Barnes 2009-08-24 19:45:03 UTC
*** Bug 506509 has been marked as a duplicate of this bug. ***