[asterisk-bugs] [Asterisk 0015606]: app_fax.c is not compiling under OpenBSD

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Aug 4 09:46:38 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15606 
====================================================================== 
Reported By:                mvanbaak
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   15606
Category:                   Applications/app_fax
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     feedback
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 209058 
Request Review:              
====================================================================== 
Date Submitted:             2009-07-29 03:29 CDT
Last Modified:              2009-08-04 09:46 CDT
====================================================================== 
Summary:                    app_fax.c is not compiling under OpenBSD
Description: 
cc -o app_fax.i -E app_fax.c -MD -MT app_fax.i -MF .app_fax.i.d -MP
-pthread -I/home/mvanbaak/dev/personal/asterisk/trunk/include
-I/usr/local/include/libxml2 -I/usr/local/include -pipe -Wall
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -Werror
-Wunused  -D_FORTIFY_SOURCE=2 -Wundef  -Wmissing-format-attribute
-Wformat=2 -I/usr/local/include  -pthread -ftrampolines  -fPIC
-DAST_MODULE=\"app_fax\"   
In file included from /usr/local/include/spandsp.h:61,
                 from app_fax.c:31:
/usr/local/include/spandsp/biquad.h:51:5: "FIRST_ORDER_NOISE_SHAPING" is
not defined
/usr/local/include/spandsp/biquad.h:53:7: "SECOND_ORDER_NOISE_SHAPING" is
not defined
/usr/local/include/spandsp/biquad.h:80:5: "FIRST_ORDER_NOISE_SHAPING" is
not defined
/usr/local/include/spandsp/biquad.h:82:7: "SECOND_ORDER_NOISE_SHAPING" is
not defined
/usr/local/include/spandsp/biquad.h:99:5: "FIRST_ORDER_NOISE_SHAPING" is
not defined
/usr/local/include/spandsp/biquad.h:102:7: "SECOND_ORDER_NOISE_SHAPING" is
not defined
gmake[1]: *** [app_fax.i] Error 1

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

---------------------------------------------------------------------- 
 (0108590) kpfleming (administrator) - 2009-08-04 09:46
 https://issues.asterisk.org/view.php?id=15606#c108590 
---------------------------------------------------------------------- 
Well... sort of. Here's the issue: the Asterisk makefiles include
'-Wundef', to get the compiler to warn us about any '#if' constructs that
reference undefined identifiers (if that case is possible, the expression
should use '#ifdef' instead). The spandsp 'biquad.h' header file has this
sort of problem.

Now, to make things worse, the compiler has an optimization that keeps
this error from triggering for any header file it deems to be a 'system
header file', meaning it came from one of the built-in include file paths.
This is done because the programmer compiling something with gcc really
doesn't care whether his system headers have this problem, he's just
watching for his own code to have this problem.

In the Asterisk makefiles, we automatically add /usr/local/include to the
search path for header files on *BSD, because most packages installed from
the ports collection put their headers in that location... but we don't
tell the compiler that is a 'system' header location, so the -Wundef
warnings still get triggered. I'll get that fixed up. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-08-04 09:46 kpfleming      Note Added: 0108590                          
======================================================================




More information about the asterisk-bugs mailing list