Can anyone explain me what is wrong with libpthread-stub.so? As I understand, sem_wait() works as intended according to the source code: static int __sem_wait_stub(sem_t *_sem) { unsigned int *sem = (unsigned int *) _sem; if (!*sem) { /* Not available, simulate a blocking sem_wait */ pause(); errno = EINTR; return -1; } *sem--; return 0; } If the semaphore is available, sem_wait decrements the semaphore value and returns to the caller. If the semaphore is unavailable, sem_wait suspends execution of the calling thread by call of pause(). Obviously in our case semaphor is unavailable (null), thus it blocks. 2012/11/22 Stefan Stefanov <selectany at gmail.com>: >>http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/11000 > Exactly the same problem as mine. > > 1. Build of pulseaudio failed without libpthread-stubs.so with "no > such file ..." > 2. I noticed that in crux linux, sem_wait() resides in > libpthread_stubs.so, and it is found through call to libpthread.so, > but in my arch linux box there are no libpthread_stubs.so at all. So, > I think that sem_wait() (in my arch linux box) resides in > libpthread.so. > > Is it possible to upgrate libpthread.so? Which package I must upgrade? > I cannot just delete libpthread-stubs.so. > > Finally, I see something strange when run ./configure of > libpthread-stubs-0.2 source code (which is currently in use of my > distro). > Here is output snippet after running ./configure: > .... > .... > checking for pthread_cond_wait... yes > checking for pthread_cond_signal... yes > checking for pthread_cond_broadcast... yes > checking for pthread_equal... yes > checking for sem_init... no > checking for sem_destroy... no > checking for sem_wait... no -> HERE!!! > checking for sem_trywait... no > .... > ... > > > 2012/11/22 Tanu Kaskinen <tanuk at iki.fi>: >> On Thu, 2012-11-22 at 15:15 +0200, Stefan Stefanov wrote: >>> #2 0xb7b1f665 in sem_wait () from /usr/lib/libpthread-stubs.so.0 >> >> I think libpthread-stubs.so.0 isn't a very good implementation for >> sem_wait()... >> >> I don't have any straightforward advice for what to do, but maybe you'll >> find this thread useful: >> http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/11000 >> >> -- >> Tanu >>