Summary: | ASTERISK-14555: app_fax.c is not compiling under OpenBSD | ||
Reporter: | Michiel van Baak (mvanbaak) | Labels: | |
Date Opened: | 2009-07-29 03:29:11 | Date Closed: | 2009-08-04 09:55:55 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Applications/app_fax |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
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 | ||
Comments: | By: Mark Michelson (mmichelson) 2009-07-30 09:22:25 Correct me if I'm wrong, but it seems like the problem here is that the spandsp header is making references to constants which are not defined. In other words, it seems like the problem is due to spandsp and not due to Asterisk. By: Kevin P. Fleming (kpfleming) 2009-08-04 09:46:38 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. By: Digium Subversion (svnbot) 2009-08-04 09:51:56 Repository: asterisk Revision: 210237 U branches/1.4/Makefile ------------------------------------------------------------------------ r210237 | kpfleming | 2009-08-04 09:51:55 -0500 (Tue, 04 Aug 2009) | 10 lines Eliminate spurious compiler warnings from system headers on *BSD platforms. Ensure that system headers located in /usr/local/include are actually treated as system headers by the compiler, and not as local headers which are subject to warnings from the -Wundef compiler option and others. (closes issue ASTERISK-14555) Reported by: mvanbaak ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=210237 By: Digium Subversion (svnbot) 2009-08-04 09:53:17 Repository: asterisk Revision: 210238 _U trunk/ U trunk/Makefile ------------------------------------------------------------------------ r210238 | kpfleming | 2009-08-04 09:53:16 -0500 (Tue, 04 Aug 2009) | 16 lines Merged revisions 210237 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r210237 | kpfleming | 2009-08-04 09:51:39 -0500 (Tue, 04 Aug 2009) | 10 lines Eliminate spurious compiler warnings from system headers on *BSD platforms. Ensure that system headers located in /usr/local/include are actually treated as system headers by the compiler, and not as local headers which are subject to warnings from the -Wundef compiler option and others. (closes issue ASTERISK-14555) Reported by: mvanbaak ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=210238 By: Digium Subversion (svnbot) 2009-08-04 09:54:16 Repository: asterisk Revision: 210239 _U branches/1.6.0/ U branches/1.6.0/Makefile ------------------------------------------------------------------------ r210239 | kpfleming | 2009-08-04 09:54:16 -0500 (Tue, 04 Aug 2009) | 23 lines Merged revisions 210238 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r210238 | kpfleming | 2009-08-04 09:53:00 -0500 (Tue, 04 Aug 2009) | 16 lines Merged revisions 210237 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r210237 | kpfleming | 2009-08-04 09:51:39 -0500 (Tue, 04 Aug 2009) | 10 lines Eliminate spurious compiler warnings from system headers on *BSD platforms. Ensure that system headers located in /usr/local/include are actually treated as system headers by the compiler, and not as local headers which are subject to warnings from the -Wundef compiler option and others. (closes issue ASTERISK-14555) Reported by: mvanbaak ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=210239 By: Digium Subversion (svnbot) 2009-08-04 09:55:01 Repository: asterisk Revision: 210240 _U branches/1.6.1/ U branches/1.6.1/Makefile ------------------------------------------------------------------------ r210240 | kpfleming | 2009-08-04 09:55:01 -0500 (Tue, 04 Aug 2009) | 23 lines Merged revisions 210238 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r210238 | kpfleming | 2009-08-04 09:53:00 -0500 (Tue, 04 Aug 2009) | 16 lines Merged revisions 210237 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r210237 | kpfleming | 2009-08-04 09:51:39 -0500 (Tue, 04 Aug 2009) | 10 lines Eliminate spurious compiler warnings from system headers on *BSD platforms. Ensure that system headers located in /usr/local/include are actually treated as system headers by the compiler, and not as local headers which are subject to warnings from the -Wundef compiler option and others. (closes issue ASTERISK-14555) Reported by: mvanbaak ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=210240 By: Digium Subversion (svnbot) 2009-08-04 09:55:54 Repository: asterisk Revision: 210241 _U branches/1.6.2/ U branches/1.6.2/Makefile ------------------------------------------------------------------------ r210241 | kpfleming | 2009-08-04 09:55:54 -0500 (Tue, 04 Aug 2009) | 23 lines Merged revisions 210238 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r210238 | kpfleming | 2009-08-04 09:53:00 -0500 (Tue, 04 Aug 2009) | 16 lines Merged revisions 210237 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r210237 | kpfleming | 2009-08-04 09:51:39 -0500 (Tue, 04 Aug 2009) | 10 lines Eliminate spurious compiler warnings from system headers on *BSD platforms. Ensure that system headers located in /usr/local/include are actually treated as system headers by the compiler, and not as local headers which are subject to warnings from the -Wundef compiler option and others. (closes issue ASTERISK-14555) Reported by: mvanbaak ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=210241 |