Posted: Tue Jun 08, 2004 9:43 pm Post subject: [Asterisk-bsd] FreeBSD & -current
New to Asterisk. Just curious as to whether -current is expected to
compile on FreeBSD or not. I get the following error after a fresh cvs
checkout:
In file included from localtime.c:27:
../include/asterisk/lock.h: In function `ast_mutex_init':
../include/asterisk/lock.h:183: `PTHREAD_MUTEX_RECURSIVE_NP' undeclared
(first use in this function)
../include/asterisk/lock.h:183: (Each undeclared identifier is reported
only once
../include/asterisk/lock.h:183: for each function it appears in.)
localtime.c: At top level:
localtime.c:187: `PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' undeclared
here (not in a function)
localtime.c:188: `PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' undeclared
here (not in a function)
localtime.c:189: `PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' undeclared
here (not in a function)
localtime.c:190: `PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' undeclared
here (not in a function)
localtime.c: In function `gmtsub':
localtime.c:1088: warning: assignment discards qualifiers from pointer
target type
gmake[1]: *** [localtime.o] Error 1
gmake[1]: Leaving directory `/home/rmger/src/asterisk/stdtime'
gmake: *** [stdtime/libtime.a] Error 2
Adding "#define _GNU_SOURCE" before the includes at the top of lock.h
does not fix the problem in this case (as it apparently does with
similar problems in rxfax & txfax).
More specifically, it appears to be this chunk from lock.h:
--
/* From now on, Asterisk REQUIRES Recursive (not error checking) mutexes
and will not run without them. */
that specifically references PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
(which doesn't exist anywhere in my /usr/include/*) whereas back in the
lock.h in version 0.9.0 (the version used in the FreeBSD port), if it
hadn't previously been defined, AST_MUTEX_INITIALIZER falls back to
using PTHREAD_MUTEX_INITIALIZER (which does exist in my
/usr/include/pthread.h).
I'm running FreeBSD 4.8-STABLE on this specific machine (although the
definition in question doesn't exist in my pthread.h on a new 5.2.1
installation) and I'm not a big C coder. Just making some observations
that someone might be able to help shed some light on.
Posted: Tue Jun 08, 2004 10:13 pm Post subject: [Asterisk-bsd] FreeBSD & -current
Howdy,
-HEAD isn't going to work right now because FreeBSD, MacOSX, et al.don't
have support for recursive mutexes. The stable branch should beokay to
use, as it does not make use of recursive mutexes.Give a look at the bug
report here:
New to Asterisk. Just curious as to whether -current is expected to
compile on FreeBSD or not. I get the following error after a fresh cvs
checkout:
In file included from localtime.c:27:
../include/asterisk/lock.h: In function `ast_mutex_init':
../include/asterisk/lock.h:183: `PTHREAD_MUTEX_RECURSIVE_NP' undeclared
(first use in this function)
../include/asterisk/lock.h:183: (Each undeclared identifier is reported
only once
../include/asterisk/lock.h:183: for each function it appears in.)
localtime.c: At top level:
localtime.c:187: `PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' undeclared
here (not in a function)
localtime.c:188: `PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' undeclared
here (not in a function)
localtime.c:189: `PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' undeclared
here (not in a function)
localtime.c:190: `PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' undeclared
here (not in a function)
localtime.c: In function `gmtsub':
localtime.c:1088: warning: assignment discards qualifiers from pointer
target type
gmake[1]: *** [localtime.o] Error 1
gmake[1]: Leaving directory `/home/rmger/src/asterisk/stdtime'
gmake: *** [stdtime/libtime.a] Error 2
Adding "#define _GNU_SOURCE" before the includes at the top of lock.h
does not fix the problem in this case (as it apparently does with
similar problems in rxfax & txfax).
More specifically, it appears to be this chunk from lock.h:
--
/* From now on, Asterisk REQUIRES Recursive (not error checking) mutexes
and will not run without them. */
that specifically references PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
(which doesn't exist anywhere in my /usr/include/*) whereas back in the
lock.h in version 0.9.0 (the version used in the FreeBSD port), if it
hadn't previously been defined, AST_MUTEX_INITIALIZER falls back to
using PTHREAD_MUTEX_INITIALIZER (which does exist in my
/usr/include/pthread.h).
I'm running FreeBSD 4.8-STABLE on this specific machine (although the
definition in question doesn't exist in my pthread.h on a new 5.2.1
installation) and I'm not a big C coder. Just making some observations
that someone might be able to help shed some light on.
Posted: Wed Jun 09, 2004 6:08 am Post subject: [Asterisk-bsd] FreeBSD & -current
Malcolm Davenport wrote:
Quote:
Howdy,
-HEAD isn't going to work right now because FreeBSD, MacOSX, et al.don't
have support for recursive mutexes. The stable branch should beokay to
use, as it does not make use of recursive mutexes.Give a look at the bug
report here:
...mark just added support for FreeBSD recursive mutexes to cvs head...
Posted: Wed Jun 09, 2004 1:59 pm Post subject: [Asterisk-bsd] FreeBSD & -current
Three cheers for Rich!
On Wed, 2004-06-09 at 01:08, Olle E. Johansson wrote:
Quote:
Malcolm Davenport wrote:
> Howdy,
>
> -HEAD isn't going to work right now because FreeBSD, MacOSX, et al.don't
> have support for recursive mutexes. The stable branch should beokay to
> use, as it does not make use of recursive mutexes.Give a look at the bug
> report here:
>
...mark just added support for FreeBSD recursive mutexes to cvs head...
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum