Re: gnome_show_url() hangs in threaded programs
- From: Pawel Salek <pawsa TheoChem kth se>
- To: James Henstridge <james daa com au>
- Cc: gnome-devel-list gnome org, balsa-list gnome org
- Subject: Re: gnome_show_url() hangs in threaded programs
- Date: Wed, 29 Aug 2001 16:24:06 +0200
On 2001-08-29 16:06 James Henstridge wrote:
> > For example following command line (that includes pthread library!)
> > will produce executable that will hang.
> >
> > # cc atfork-test.c -I/usr/include/glib-1.2 -I/usr/lib/glib/include
> > -D_REENTRANT -lglib -lc -lpthread -lgthread
> >
> > We have spotted this issue in balsa when we used configure-generated
> > $GNOME_LIBS, $GLIB_LIBS, $GTK_LIBS (as generated by autoconf macros)
> > make variables for linking. It produced working code in some
> > configurations, and in other setups, balsa hang on fork.
>
> I don't know why the autoconf macros would be including a -lc in
> there, and the ordering looks very odd for the output of one of the
> standard macros ("glib-config --libs gthread" and "gtk-config --libs
> gthread" both have gthread before pthread for instance).
"For example" is the key phrase above. The actual command line for balsa
that lead to hangs was much more involved and one screen-long in some
configurations (gtkhtml+gdk_pixbuf and what-not). I think I can send you
the complete list if you like (or grab balsa-1.1.7 and find out for
yourself :-). The point is, the library list was not `pkg-config --libs`
but $(GNOME_LIBS) $(GTKHTML_LIBS) $(GLIBS_LIBS) etc. The funny thing, it
hang on some configurations (RH-7.2 beta for example) and worked perfect
on others (RH-7.1)... That's the thing I did not like: the surprise.
>
> Linking with libc before libpthread would almost definitely cause
> problems, as pthread shadows some functions in libc.
IIRC, there was no -lc on the list and -lpthread was last.
> Alternatively, you can use pkg-config :)
Of course, as soon as we port some widgets subclassing gtk-1.2 GtkEntry.
:-> I should finally give gtk-1.3 a try...
/Pawel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]