[asterisk-bugs] [JIRA] (ASTERISK-27156) Asterisk won't compile on Fedora 26 with devmode enabled.
Asterisk Team (JIRA)
noreply at issues.asterisk.org
Tue Jul 25 15:49:58 CDT 2017
[ https://issues.asterisk.org/jira/browse/ASTERISK-27156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=237828#comment-237828 ]
Asterisk Team commented on ASTERISK-27156:
------------------------------------------
Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.
A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.
Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].
> Asterisk won't compile on Fedora 26 with devmode enabled.
> ---------------------------------------------------------
>
> Key: ASTERISK-27156
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-27156
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Core/BuildSystem
> Affects Versions: 13.17.0, 14.6.0, GIT
> Reporter: Corey Farrell
> Severity: Minor
>
> It looks like gcc 7 includes a {{format-truncation}} warning which becomes an error in devmode. The error occurs in many files, the following is from main/asterisk.c:
> {noformat}
> gcc -o /dev/null -c asterisk.i -pthread -I/home/cfarrell/code/asterisk/master/include -I/usr/include/libxml2 -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -Werror -Wunused -Wdeclaration-after-statement -Wtrampolines -Wundef -Wmissing-format-attribute -Wformat=2 -O0 -march=native -I. -Ieditline -DAST_MODULE=\"core\" -DAST_IN_CORE -O3
> asterisk.c: In function ‘ast_readconfig’:
> asterisk.c:3511:65: error: ‘/monitor’ directive output may be truncated writing 8 bytes into a region of size between 1 and 4096 [-Werror=format-truncation=]
> snprintf(cfg_paths.monitor_dir, sizeof(cfg_paths.monitor_dir), "%s/monitor", cfg_paths.spool_dir);
> ^~~~~~~~~~~~
> asterisk.c:3511:2: note: ‘snprintf’ output between 9 and 4104 bytes into a destination of size 4096
> snprintf(cfg_paths.monitor_dir, sizeof(cfg_paths.monitor_dir), "%s/monitor", cfg_paths.spool_dir);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> asterisk.c:3512:69: error: ‘/recording’ directive output may be truncated writing 10 bytes into a region of size between 1 and 4096 [-Werror=format-truncation=]
> snprintf(cfg_paths.recording_dir, sizeof(cfg_paths.recording_dir), "%s/recording", cfg_paths.spool_dir);
> ^~~~~~~~~~~~~~
> asterisk.c:3512:2: note: ‘snprintf’ output between 11 and 4106 bytes into a destination of size 4096
> snprintf(cfg_paths.recording_dir, sizeof(cfg_paths.recording_dir), "%s/recording", cfg_paths.spool_dir);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[1]: *** [/home/cfarrell/code/asterisk/master/Makefile.rules:135: asterisk.o] Error 1
> make[1]: Leaving directory '/home/cfarrell/code/asterisk/master/main'
> make: *** [Makefile:367: main] Error 2
> {noformat}
> I receive this error with all modes of {{DONT_OPTIMIZE}} and {{DOUBLE_COMPILE}}.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list