This is the mail archive of the cygwin-xfree@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Cygwin Pthread support (was Re: Compilation of GTK+ GLib in cygwin-xfree)


If you are using cygwin, you need to realize that pthread functionality
is NOT COMPLETE and has BUGS (or at least I have not seen anything which
implies otherwise.)

If GTK and/or GLib are pthread dependant, you will most likely have a
lot of problems.

You could try the pthread project at sourceware but I don't know if it
has been ported to cygwin.  Chris??

John Fortin


Andreas Eibach wrote:
> 
> > Well you've pushed me - I'm going to try it again this evening - with
> > everything described IN DETAIL.
> > IIRC, glib also complained about a  particular thing. I'll report you back
> > soon.
> >
> > Andreas
> 
> So, here I am again.
> 
> PART ONE.
> Let me quote this first:
> (this is from ./configure of glib, we're not speaking about gtk+ yet because
> gtk+ requires a correctly-built glib to compile at all!)
> 
> configure: warning: the 'g_get_(user_name|real_name|home_dir|tmp_dir)'
>                 functions will not be MT-safe during their first call
> because
>                 there is no working 'getpwuid_r' on your system.
> configure: warning: the 'g_date_set_time' function will not be MT-safe
>                 because there is no 'localtime_r' on your system.
> 
> PART TWO.
> This is my error output when I try to build the gthread source tree,
> ignoring the warning above (only this one interests me at the moment,
> because this is the only one that outputs errors)
> 
> In file included from gthread.c:42:
> gthread-posix.c: In function `g_cond_new_posix_impl':
> gthread-posix.c:94: `pthread_cond_t' undeclared (first use in this function)
> gthread-posix.c:94: (Each undeclared identifier is reported only once
> gthread-posix.c:94: for each function it appears in.)
> gthread-posix.c:94: parse error before `)'
> gthread-posix.c:95: warning: implicit declaration of function
> `pthread_cond_init'
> gthread-posix.c:95: parse error before `)'
> gthread-posix.c: In function `g_cond_timed_wait_posix_impl':
> gthread-posix.c:113: storage size of `end_time' isn't known
> gthread-posix.c:128: warning: implicit declaration of function
> `pthread_cond_timedwait'
> gthread-posix.c:128: `pthread_cond_t' undeclared (first use in this
> function)
> gthread-posix.c:128: parse error before `)'
> gthread-posix.c:113: warning: unused variable `end_time'
> gthread-posix.c:112: warning: `result' might be used uninitialized in this
> function
> gthread-posix.c: In function `g_cond_free_posix_impl':
> gthread-posix.c:144: warning: implicit declaration of function
> `pthread_cond_destroy'
> gthread-posix.c:144: `pthread_cond_t' undeclared (first use in this
> function)
> gthread-posix.c:144: parse error before `)'
> gthread-posix.c: In function `g_private_new_posix_impl':
> gthread-posix.c:153: too many arguments to function `pthread_key_create'
> gthread-posix.c: In function `g_private_set_posix_impl':
> gthread-posix.c:166: incompatible type for argument 1 of
> `pthread_setspecific'
> gthread-posix.c: In function `g_private_get_posix_impl':
> gthread-posix.c:175: incompatible type for argument 1 of
> `pthread_getspecific'
> gthread-posix.c: At top level:
> gthread-posix.c:193: `pthread_cond_signal' undeclared here (not in a
> function)
> gthread-posix.c:193: initializer element is not constant
> gthread-posix.c:193: (near initialization for
> `g_thread_functions_for_glib_use_default.cond_signal')
> gthread-posix.c:194: `pthread_cond_broadcast' undeclared here (not in a
> function)
> gthread-posix.c:194: initializer element is not constant
> gthread-posix.c:194: (near initialization for
> `g_thread_functions_for_glib_use_default.cond_broadcast')
> gthread-posix.c:195: `pthread_cond_wait' undeclared here (not in a function)
> gthread-posix.c:195: initializer element is not constant
> gthread-posix.c:195: (near initialization for
> `g_thread_functions_for_glib_use_default.cond_wait')
> make: *** [gthread.lo] Error 1
> 
> Since it was complaining about pthread_cond_t, I looked around where this
> definition could be found: eventually i found it in Xthreads.h!
> So I copied Xthreads.h to the current directory manually and added
> 
> #include "Xthreads.h"
> 
> line to gthread-posix.c.
> 
> Unfortunately, it doesn't work yet.
> And it's obvious: it must have something to do with MT thread safeness.
> 
> Andreas

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]