[asterisk-bugs] [Asterisk 0013260]: [Solaris] Build fails with new files added in asterisk 1.2.28.1 and above

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Aug 8 11:16:54 CDT 2008


The following issue has been UPDATED. 
====================================================================== 
http://bugs.digium.com/view.php?id=13260 
====================================================================== 
Reported By:                asgaroth
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13260
Category:                   Core/General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           1.2.X 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-08-08 07:37 CDT
Last Modified:              2008-08-08 11:16 CDT
====================================================================== 
Summary:                    [Solaris] Build fails with new files added in
asterisk 1.2.28.1 and above
Description: 
When trying to build any asterisk version greater than or equal to 1.2.28.1
the compile fails with the following error:

gcc  -pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -g3  -Iinclude -I../include -Iinclude/solaris-compat
-I/usr/sfw/include -I/usr/xpg4/include -D_REENTRANT -D_GNU_SOURCE  -O6 
-Wcast-align -DSOLARIS         -fomit-frame-pointer    -c -o astobj2.o
astobj2.c
In file included from astobj2.c:26:
include/asterisk/astobj2.h:333: warning: type defaults to `int' in
declaration of `uint'
include/asterisk/astobj2.h:333: error: syntax error before "n_buckets"
include/asterisk/astobj2.h:334: warning: function declaration isn't a
prototype
include/asterisk/astobj2.h:530: error: syntax error before "uint"
include/asterisk/astobj2.h:530: warning: no semicolon at end of struct or
union
include/asterisk/astobj2.h:534: error: syntax error before "version"
include/asterisk/astobj2.h:534: warning: type defaults to `int' in
declaration of `version'
include/asterisk/astobj2.h:534: warning: data definition has no type or
storage class
astobj2.c:299: warning: no previous prototype for 'ao2_container_alloc'
astobj2.c:525: error: return type is an incomplete type
astobj2.c:525: error: conflicting types for 'ao2_iterator_init'
include/asterisk/astobj2.h:537: error: previous declaration of
'ao2_iterator_init' was here
astobj2.c:525: error: conflicting types for 'ao2_iterator_init'
include/asterisk/astobj2.h:537: error: previous declaration of
'ao2_iterator_init' was here
astobj2.c: In function `ao2_iterator_init':
astobj2.c:526: error: variable `a' has initializer but incomplete type
astobj2.c:527: error: unknown field `c' specified in initializer
astobj2.c:527: warning: excess elements in struct initializer
astobj2.c:527: warning: (near initialization for `a')
astobj2.c:528: error: unknown field `flags' specified in initializer
astobj2.c:529: warning: excess elements in struct initializer
astobj2.c:529: warning: (near initialization for `a')
astobj2.c:526: error: storage size of 'a' isn't known
astobj2.c:531: warning: `return' with a value, in function returning void
astobj2.c:526: warning: unused variable `a'
astobj2.c: In function `ao2_iterator_next':
astobj2.c:543: error: dereferencing pointer to incomplete type
astobj2.c:546: error: dereferencing pointer to incomplete type
astobj2.c:547: error: dereferencing pointer to incomplete type
astobj2.c:552: error: dereferencing pointer to incomplete type
astobj2.c:552: error: dereferencing pointer to incomplete type
astobj2.c:552: error: dereferencing pointer to incomplete type
astobj2.c:556: error: dereferencing pointer to incomplete type
astobj2.c:557: error: dereferencing pointer to incomplete type
astobj2.c:558: error: dereferencing pointer to incomplete type
astobj2.c:561: error: dereferencing pointer to incomplete type
astobj2.c:569: error: dereferencing pointer to incomplete type
astobj2.c:569: error: dereferencing pointer to incomplete type
astobj2.c:569: error: dereferencing pointer to incomplete type
astobj2.c:569: warning: left-hand operand of comma expression has no
effect
astobj2.c:571: error: dereferencing pointer to incomplete type
astobj2.c:571: error: dereferencing pointer to incomplete type
astobj2.c:572: error: dereferencing pointer to incomplete type
astobj2.c:579: error: dereferencing pointer to incomplete type
astobj2.c:580: error: dereferencing pointer to incomplete type
astobj2.c:581: error: dereferencing pointer to incomplete type
astobj2.c:581: error: dereferencing pointer to incomplete type
astobj2.c:587: error: dereferencing pointer to incomplete type
astobj2.c:588: error: dereferencing pointer to incomplete type
astobj2.c: At top level:
astobj2.c:716: warning: no previous prototype for 'astobj2_init'
astobj2.c: In function `ao2_iterator_next':
astobj2.c:569: warning: statement with no effect
make: *** [astobj2.o] Error 1

This appears to have cropped in whith the following change:

2008-05-05 17:53 +0000 [r115296]  Russell Bryant <russell at digium.com>

	* Makefile, include/asterisk/astobj2.h (added), astobj2.c (added),
	  include/asterisk/dlinkedlists.h (added), channels/chan_iax2.c:
	  Merge changes from team/russell/iax2_find_callno_1.2 These
	  changes address a critical performance issue introduced in the
	  latest release. The fix for the latest security issue included a
	  change that made Asterisk randomly choose call numbers to make
	  them more difficult to guess by attackers. However, due to some
	  inefficient (this is by far, an understatement) code, when
	  Asterisk chose high call numbers, chan_iax2 became unusable after
	  just a small number of calls. On a small embedded platform, it
	  would not be able to handle a single call. On my Intel Core 2 Duo
	  @ 2.33 GHz, I couldn't run more than about 16 IAX2 channels.
	  Ouch. These changes address some performance issues of the
	  find_callno() function that have bothered me for a very long
	  time. On every incoming media frame, it iterated through every
	  possible call number trying to find a matching active call. This
	  involved a mutex lock and unlock for each call number checked.
	  So, if the random call number chosen was 20000, then every media
	  frame would cause 20000 locks and unlocks. Previously, this
	  problem was not as obvious since Asterisk always chose the lowest
	  call number it could. A second container for IAX2 pvt structs has
	  been added. It is an astobj2 hash table. When we know the remote
	  side's call number, the pvt goes into the hash table with a hash
	  value of the remote side's call number. Then, lookups for
	  incoming media frames are a very fast hash lookup instead of an
	  absolutely insane array traversal. In a quick test, I was able to
	  get more than 3600% more IAX2 channels on my machine with these
	  changes.

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-08-08 11:16 Corydon76      Summary                  Build fails with new
files added in asterisk 1.2.28.1 and above => [Solaris] Build fails with new
files added in asterisk 1.2.28.1 and above
======================================================================




More information about the asterisk-bugs mailing list