[asterisk-bugs] [Asterisk 0013604]: error: ‘PTHREAD_MUTEX_RECURSIVE’ undeclared (first use in this function) on powerpc during compile of 1.6 rc6
Asterisk Bug Tracker
noreply at bugs.digium.com
Sat Oct 4 14:26:01 CDT 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=13604
======================================================================
Reported By: shrift
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 13604
Category: General
Reproducibility: always
Severity: minor
Priority: normal
Status: new
Asterisk Version: 1.6.0-rc6
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.0
SVN Revision (number only!): 145746
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 2008-10-02 10:25 CDT
Last Modified: 2008-10-04 14:26 CDT
======================================================================
Summary: error: ‘PTHREAD_MUTEX_RECURSIVE’ undeclared
(first use in this function) on powerpc during compile of 1.6 rc6
Description:
The gcc compiler on powerpc needs to have "#define _GNU_SOURCE" set in
/usr/include/features.h in order for 1.6 to compile cleanly on powerpc
architecture. otherwise you will receive errors like this:
[CC] app_voicemail.c -> app_voicemail.o
In file included from app_voicemail.c:100:
/usr/local/asterisk/include/asterisk/lock.h: In function
`ast_mutex_init':
/usr/local/asterisk/include/asterisk/lock.h:749: warning: implicit
declaration of function `pthread_mutexattr_settype'
In file included from /usr/local/asterisk/include/asterisk/config.h:30,
from /usr/local/asterisk/include/asterisk/channel.h:147,
from app_voicemail.c:102:
/usr/local/asterisk/include/asterisk/utils.h: In function `_ast_strndup':
/usr/local/asterisk/include/asterisk/utils.h:532: warning: implicit
declaration of function `strndup'
/usr/local/asterisk/include/asterisk/utils.h:532: warning: assignment
makes pointer from integer without a cast
/usr/local/asterisk/include/asterisk/utils.h: In function
`_ast_vasprintf':
/usr/local/asterisk/include/asterisk/utils.h:571: warning: implicit
declaration of function `vasprintf'
app_voicemail.c: At top level:
app_voicemail.c:169: error: `PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP'
undeclared here (not in a function)
app_voicemail.c:169: error: initializer element is not constant
app_voicemail.c:169: error: (near initialization for `vmstates.lock')
app_voicemail.c:567: error: initializer element is not constant
app_voicemail.c:567: error: (near initialization for `users.lock')
app_voicemail.c:568: error: initializer element is not constant
app_voicemail.c:568: error: (near initialization for `zones.lock')
make[1]: *** [app_voicemail.o] Error 1
make: *** [apps] Error 2
I suggest either the compiler be made to check for this setting or a not
be made in the readme. My environment was Debian etc/testing on a powerpc
Mac G4.
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0013605 [patch] Compile error with IMAP_STORAGE...
======================================================================
----------------------------------------------------------------------
(0093169) seanbright (manager) - 2008-10-04 14:26
http://bugs.digium.com/view.php?id=13604#c93169
----------------------------------------------------------------------
Yes, that is preferable.
Issue History
Date Modified Username Field Change
======================================================================
2008-10-04 14:26 seanbright Note Added: 0093169
======================================================================
More information about the asterisk-bugs
mailing list