Re: [gtk-list] Problem with Pthreads and GTK+



On Sat, 22 May 1999, scott_and_meagan wrote:

> Hi,
> 
> I am having problems running GTK+-1.2.2 programs when compiled with the
> gthread libraries and cflags.
> I often get
> 
> Gdk-ERROR **: an x io error occurred
> aborting...
> IOT trap/Abort
> 
> when the programs is run, but sometimes it takes a few button presses to
> 
> get it to fail with the same message.
> I am using libc-5.4.44 and linuxthreads-0.71 on a Slackware 3.5 Linux
> distribution.
> 
> The same programs run fine when the gthread options are not included. I
> have not included code that will cause this problem but the
> gtk+-1.2.2/examples/helloworld/helloworld.c program will fail when
> compiled with
> 
> $(CC) `gtk-config --cflags gthread`  helloworld.c -o helloworld
> `gtk-config --libs gthread`
> 
> Somebody please help!
> 
> Scott Thomson
> 

Hi,

some weeks ago I had the same problem running on a libc5 based Suse 5.x.
As I remember the problem is that the X11 libraries are not thread aware
(i.e. the variable errno becomes a macro when compiling multithreaded
programs).The problem is described in more detail somewhere in the
linuxthreads source package (with two possible solutions: a) get a real
operating system, that is a libc 6 based distribution.  b) recompile the
X11 libraries with some patches...the linuxthreads manual mentions where
to find these).

- Ralf



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]