[Asterisk-Users] spandsp compile error: PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' undeclared here

Darryl Ross spam at afoyi.com
Thu Apr 29 10:32:01 MST 2004


Hey All,

I'm having a bit of a problem trying to get spandsp working on my 
asterisk machine. The machine is a Redhat 9.0 install with the latest 
version of libtiff and libtiff-devel (according to freshrpms.net).

I manaaged to download, compile and successfully install the actual 
spandsp package with no errors. The problem comes when I try to compile 
the rxfax and txfax asterisk applications. The compile fails with the 
following error message:

---------------------------

make[1]: Entering directory `/usr/src/asterisk/apps'
gcc -O2 -g  -Iinclude -I../include -c -o  app_rxfax.o app_rxfax.c
app_rxfax.c:45: `PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' undeclared here 
(not in a function)
make[1]: *** [app_rxfax.o] Error 1
make[1]: Leaving directory `/usr/src/asterisk/apps'
make: *** [subdirs] Error 1

---------------------------

I've tried searching Google for that error, and I get a few things back 
that are not asterisk related, so it looks like the problem might lie 
elsewhere.

I've also read through the source code, tracing the header files and 
such, and as far as I can work out it should be working. Mind you, I 
haven't done any C coding for about 6 years so I'm a little rusty.

Line 45 of app_rcfax.c is "LOCAL_USER_DECL;", which is defined in 
/usr/include/asterisk/module.h. It includes AST_MUTEX_INITIALIZER, which 
is defined in /usr/include/asterisk/lock.h. The definition there 
includes PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP which is defined as a 
constant in /usr/include/pthread.h.

It would seem for some reason that it's not being expanded properly by 
the preparser. Does anyone have any ideas how to fix it? As mentioned 
above, this is on a RH9 machine.

TIA
Darryl



More information about the asterisk-users mailing list