[Date Prev][Date Next] [Chronological] [Thread] [Top]

Build on OSX failed - (pthreads) (ITS#1152)



Am Mittwoch, 16. Mai 2001 um 19:53 schrieb Kurt D. Zeilenga:

I posting this to the forum - I hope this is ok (normally I do not 
forward personal mail to a public forum)

> or provide additional details (such as which test should pass and why 
> it's not -- see config.log)
> so that a developer can make a stab at fixing it...

After some investigation I discovered the folling:

(please correct any mistake - I know my knowlegde is very basic and 
darwin seems to be not so good documented at all, addtionally I'am new 
to POSIX pthreads.)

a) The library which must be used for linking is the default library 
(tried that with a small app)
b) The threads are created in the JOINABLE state per default
c) A thread which is in the exit state cannot be detached (only joinable 
can)

So the current configure script must fail ("test for linking with the 
default libraries") because the test spawn a thread (this is ok) then 
the main routine sleeps a second. In the meantime the thread dies 
because there are no statements to execute and the thread will be 
terminated (implicit call to pthread_exit(). The thread is now in the 
exit state).

By changing the execution order (putting the sleep AFTER the detach 
call) the test will function because  pthread_detach will see an living 
thread which is JOINABLE and can be detached (I did that and the test is 
running with exit code 0, without the change, the test will exit with 
rc=22 and configure will fail)

Any comments available? May be from a serious darwin developer? (I only 
have the sources of darwin 1.0, maybe that changed to 1.2 - this is the 
current version of MacOS X Retail).

> fix it yourself and provide us with a description of the
> problem and a patch.

Well... I do not think, that a fix (even if I ever could apply one) 
would be a great help...

--

Sincerly,
    Clemens

May