[Home]

Summary:ASTERISK-09897: compile errors and choppy sound with gcc 4.2.1
Reporter:pj (pj)Labels:
Date Opened:2007-07-18 07:05:23Date Closed:2007-10-28 08:33:28
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/BuildSystem
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) compile_warnings_r75585.txt
Description:compiling asterisk wih new gcc 4.2.1 & glibc 2.6 generates lot of errors. probably as consequence this, codecs trancoding make sound very choppy, it means, when I try to connect two phones operating with different codecs, or playback asterisk sounds (in gsm format) to phone with alaw, sound is very choppy. without transcoding eg. alaw-alaw, gsm-gsm and mp3 playback sound is OK). otherwise asterisk is working fine (but I'm using only simple features for call processing).
same asterisk revision compiles cleanly with gcc 4.1.2, no choppy sound when codecs translation is used.


****** ADDITIONAL INFORMATION ******

ael_main.c: In function ‘ast_context_add_ignorepat2’:
ael_main.c:316: warning: passing argument 1 of ‘create_name’ discards qualifiers from pointer target type
ael_main.c: In function ‘ast_context_add_switch2’:
ael_main.c:338: warning: passing argument 1 of ‘create_name’ discards qualifiers from pointer target type
ael_main.c: In function ‘ast_context_add_include2’:
ael_main.c:327: warning: passing argument 1 of ‘create_name’ discards qualifiers from pointer target type
[CC] ast_expr2f.c -> ast_expr2f.o
ast_expr2.fl: In function ‘ast_yyerror’:
ast_expr2.fl:401: warning: passing argument 1 of ‘expr2_token_subst’ discards qualifiers from pointer target type


[CC] chan_agent.c -> chan_agent.o
chan_agent.c: In function ‘__agent_start_monitoring’:
chan_agent.c:393: warning: the address of ‘savecallsin’ will always evaluate as ‘true’
chan_agent.c:396: warning: the address of ‘urlprefix’ will always evaluate as ‘true’
[LD] chan_agent.o -> chan_agent.so


[CC] chan_iax2.c -> chan_iax2.o
chan_iax2.c: In function ‘iax2_prune_realtime’:
chan_iax2.c:2050: warning: passing argument 1 of ‘expire_registry’ discards qualifiers from pointer target type

[CC] chan_sip.c -> chan_sip.o
chan_sip.c: In function ‘sip_register’:
chan_sip.c:4951: warning: the address of ‘username’ will always evaluate as ‘true’
[LD] chan_sip.o -> chan_sip.so

[CC] ael/ael.tab.c -> ael/ael.tab.o
ael.y: In function ‘ael_yyerror’:
ael.y:762: warning: passing argument 1 of ‘ael_token_subst’ discards qualifiers from pointer target type


[CC] pbx_realtime.c -> pbx_realtime.o
pbx_realtime.c: In function ‘realtime_exec’:
pbx_realtime.c:206: warning: the address of ‘appdata’ will always evaluate as ‘true’


[CC] app_voicemail.c -> app_voicemail.o
app_voicemail.c: In function ‘populate_defaults’:
app_voicemail.c:668: warning: the address of ‘callcontext’ will always evaluate as ‘true’
app_voicemail.c:670: warning: the address of ‘dialcontext’ will always evaluate as ‘true’
app_voicemail.c:672: warning: the address of ‘exitcontext’ will always evaluate as ‘true’


[CC] ast_expr2f.c -> ast_expr2f.o
ast_expr2.fl: In function ‘ast_yyerror’:
ast_expr2.fl:401: warning: passing argument 1 of ‘expr2_token_subst’ discards qualifiers from pointer target type
Comments:By: Tilghman Lesher (tilghman) 2007-07-18 07:25:36

I'm not sure what you expect us to do about this.  It clearly sounds as if there's a bug in the latest gcc/glibc code, not in Asterisk.

By: pj (pj) 2007-07-18 07:34:31

if it is really problem with gcc, sorry for my report, I thought, that asterisk code used some incompatible directive, that were obsoleted in new gcc, so sorry again and please close the ticket.

By: Joshua C. Colp (jcolp) 2007-07-18 08:52:30

These are not errors either, they are warnings. The newer GCC is just picking up situations where current code is just doing something silly and doesn't have to. I have corrected a few in trunk so if you update there should be less.

By: pj (pj) 2007-07-18 10:19:28

thanks, some compiler warnings are gone, some still persist, see log attached.
issue with choppy audio when transcoding still persist, do you think, that it can be related also to new gcc & glibc?

By: pj (pj) 2007-07-28 09:04:12

I can confirm now, that issue with choppy sound when codec transcoding is used (gsm x alaw) is related to asterisk and gcc4.2
when recompile asterisk with older gcc it works fine.
Asterisk SVN-trunk-r77631

By: David Quinn Ebert (quinn) 2007-08-18 07:44:51

I've noticed the same issue in our "production" system...Re-compiling with OS-bundled GCC (v3.4.6) seems to relieve the problem.  Should anybody wish to look any further into this, I'll be more than happy to provide any further information needed from our particular setup.

By: Michiel van Baak (mvanbaak) 2007-09-22 17:24:22

Qwell fixed all the gcc 4.2 warnings with the patches to http://bugs.digium.com/view.php?id=10774
Those were committed to both 1.4 and trunk svn.

Can you report wether this fixes the choppy sound problem for you?

By: pj (pj) 2007-09-23 15:57:05

sad to say, choppy sound persist,
also some warnings still present (but probably unrelated to choppy audio issue)
trunk r83619
gcc version 4.2.2 20070909 (mandriva linux)



  [CC] ael/ael.tab.c -> ael/ael.tab.o
ael.y: In function ‘ael_yyerror’:
ael.y:762: warning: passing argument 1 of ‘ael_token_subst’ discards qualifiers from pointer target type
  [CC] ael/pval.c -> ael/pval.o



In file included from editline.c:8:
el.c: In function ‘el_get’:
el.c:284: warning: dereferencing type-punned pointer will break strict-aliasing rules
el.c:288: warning: dereferencing type-punned pointer will break strict-aliasing rules


history.c: In function ‘history_def_add’:
history.c:352: warning: implicit declaration of function ‘strlcpy’
history.c:353: warning: implicit declaration of function ‘strlcat’

By: Matt Riddell (zx81) 2007-09-23 18:19:01

Hi,

Just a quick note.  I was experiencing extremely choppy audio between mISDN and IAX2, and added a smoother to fix it.

I'm also on Mandriva and noticed a strange problem.

When recompiling the kernel, I set ticks to 1000, but if I type:

getconf CLK_TCK

it would print out 100 instead of 1000.

What technologies are you calls going between?

Also, if you do an iax2 debug (with debug enabled in logger.conf) what are the differences between timestamps in the packets?

By: pj (pj) 2007-09-24 01:53:17

I'm using pure IP: IAX-IAX (or sip/skinny-iax) on transcoding asterisk,
when I recompile with older gcc (4.1 or 3.3), it works fine,
my colegue have same problem on archlinux, when upgraded gcc to 4.2,
so, choppy audio issue is unrelated to specific distro or kernel.

By: Tilghman Lesher (tilghman) 2007-10-26 10:05:22

Since gcc 4.2.2 has been released in the meantime, you might try that version to see if these problems are fixed.  In any case, I don't think there's anything more that we can do on this.

Closing.

By: pj (pj) 2007-10-26 15:28:41

OK, you can close or postpone this bugreport, but keep in mind, that issue was not resolved,
I tried with 'gcc version 4.2.2 20070909' (mandriva and archlinux) and asterisk svn trunk r87187.
choppy sound issue can be easy reproduced: try to call Playback(echo-test) with some other codecs than gsm to force asterisk to transcode,
I think, after more distros will also adopt new gcc, this bugreport will be reopened again by another users.