From: Jan Hudec <bulb@ucw.cz>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Gerd Knorr <kraxel@bytesex.org>,
User-mode Linux Kernel Development
<user-mode-linux-devel@lists.sourceforge.net>
Subject: Re: [uml-devel] Re: pthreads?
Date: Thu, 2 Oct 2003 16:42:37 +0200 [thread overview]
Message-ID: <20031002144237.GB5285@vagabond> (raw)
In-Reply-To: <Pine.GSO.4.21.0310021605040.8567-100000@vervain.sonytel.be>
On Thu, Oct 02, 2003 at 16:28:45 +0200, Geert Uytterhoeven wrote:
> On Thu, 2 Oct 2003, Jan Hudec wrote:
>
> > On Thu, Oct 02, 2003 at 12:03:10 +0200, Geert Uytterhoeven wrote:
> > > Hence _your_ simple application doesn't need libpthread.
> >
> > Hence NEITHER OF GTK, GDK, GLIB, GMODULE, GOBJECT, PANGO, ATK, X11 NEED
> > libpthread!
> >
> > > | gcc -Wl,-T,arch/um/uml.lds.s -static -Wl,--wrap,malloc -Wl,--wrap,free -Wl, --wrap,calloc -o linux arch/um/main.o vmlinux -L/usr/lib -lutil -L/usr/X11R6/li b -lgtk -lgdk -lX11 -lXi -lXext -lglib -lgmodule -ldl -lm -lgthread
> >
> > However if you link with gthread, you need pthread.
> > So: a) Please don't blame it on X11.
>
> What about this:
>
> | /usr/X11R6/lib/libX11.a(XlibInt.o)(.text+0x74c): In function `_XEventsQueued':
> | : undefined reference to `pthread_equal'
> | /usr/X11R6/lib/libX11.a(XlibInt.o)(.text+0x766): In function `_XEventsQueued':
> | : undefined reference to `pthread_equal'
> | /usr/X11R6/lib/libX11.a(XlibInt.o)(.text+0x781): In function `_XEventsQueued':
> | : undefined reference to `pthread_equal'
> | /usr/X11R6/lib/libX11.a(XlibInt.o)(.text+0x79a): In function `_XEventsQueued':
> | : undefined reference to `pthread_equal'
> | /usr/X11R6/lib/libX11.a(XlibInt.o)(.text+0x7b7): In function `_XEventsQueued':
> | : undefined reference to `pthread_equal'
> | /usr/X11R6/lib/libX11.a(XlibInt.o)(.text+0xafc): more undefined references to `pthread_equal' follow
>
> Some investigation shows that libX11 needs pthread_equal() when linked
> statically, while it doesn't need it when linked dynamically.
Ugh. That sounds strange, that a library needs something only if linked
staticaly. However, it really looks like static libX11 causing trouble.
> > b) Don't link against gthread unless you need them.
> > b.1) If you only call Gtk stuff in one thread, you don't need them.
> > b.2) If you call Gtk stuff from more than one thread, you can still
> > provide gthread library with custom locking and get rid of
> > pthread.
>
> I tried that, providing my own implementation for pthread_equal().
> However, it hangs during gtk_init(). Since this doesn't happen within my
> stand-alone GTK test app, it must be some interaction between UML and GTK...
It would be interesting to know where it actualy hangs.
-------------------------------------------------------------------------------
Jan 'Bulb' Hudec <bulb@ucw.cz>
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2003-10-02 14:43 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-11 15:54 [uml-devel] pthreads? Geert Uytterhoeven
2003-09-11 17:55 ` Jeff Dike
2003-09-12 8:52 ` [uml-devel] pthreads? Gerd Knorr
2003-09-12 9:07 ` Geert Uytterhoeven
2003-09-12 11:08 ` Gerd Knorr
2003-09-12 11:18 ` Geert Uytterhoeven
2003-09-12 12:15 ` Gerd Knorr
2003-09-12 12:17 ` Geert Uytterhoeven
2003-09-12 11:18 ` Henrik Nordstrom
2003-09-12 16:28 ` Jeff Dike
2003-09-12 22:25 ` Henrik Nordstrom
2003-09-13 18:53 ` Jeff Dike
2003-09-13 21:01 ` Henrik Nordstrom
2003-09-13 15:24 ` Geert Uytterhoeven
2003-09-13 18:54 ` Jeff Dike
2003-09-15 6:57 ` Geert Uytterhoeven
2003-09-15 9:19 ` Henrik Nordstrom
2003-09-15 9:28 ` Geert Uytterhoeven
2003-09-15 10:51 ` Henrik Nordstrom
2003-09-16 18:44 ` BlaisorBlade
2003-10-02 9:20 ` Jan Hudec
2003-10-02 9:08 ` Jan Hudec
2003-10-02 9:24 ` Geert Uytterhoeven
2003-10-02 9:31 ` Jan Hudec
[not found] ` <Pine.GSO.4.21.0310021146500.8567-100000@vervain.sonytel.be>
2003-10-02 13:52 ` Jan Hudec
2003-10-02 14:28 ` Geert Uytterhoeven
2003-10-02 14:42 ` Jan Hudec [this message]
2003-10-07 15:51 ` The Story Continues (was: Re: [uml-devel] Re: pthreads?) Geert Uytterhoeven
2003-10-11 1:48 ` Jeff Dike
2003-10-11 8:39 ` Geert Uytterhoeven
2003-10-12 9:53 ` Geert Uytterhoeven
2003-10-06 13:29 ` [uml-devel] Re: pthreads? BlaisorBlade
-- strict thread matches above, loose matches on Subject: below --
2003-09-12 12:30 stian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031002144237.GB5285@vagabond \
--to=bulb@ucw.cz \
--cc=geert@linux-m68k.org \
--cc=kraxel@bytesex.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox