[asterisk-bugs] [JIRA] (DAHLIN-387) DAHDI compilation gives "directive output may be truncated" error

Keith Morgan (JIRA) noreply at issues.asterisk.org
Mon Oct 18 10:23:50 CDT 2021


     [ https://issues.asterisk.org/jira/browse/DAHLIN-387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Keith Morgan updated DAHLIN-387:
--------------------------------

    Assignee: Duncan Patterson  (was: Keith Morgan)

> DAHDI compilation gives "directive output may be truncated" error
> -----------------------------------------------------------------
>
>                 Key: DAHLIN-387
>                 URL: https://issues.asterisk.org/jira/browse/DAHLIN-387
>             Project: DAHDI-Linux
>          Issue Type: Bug
>      Security Level: None
>          Components: General
>    Affects Versions: 3.1.0
>         Environment: Ubuntu 18.04, kernel 4.15.0-142-generic
>            Reporter: David Cunningham
>            Assignee: Duncan Patterson
>            Severity: Major
>
> DAHDI fails to compile on kernel 4.15.0-142-generic, with an error:
> xusb_libusb.c: In function ‘xusb_find_bypath’:
> xusb_libusb.c:500:41: error: ‘/’ directive output may be truncated writing 1 byte into a region of size between 0 and 4093 [-Werror=format-truncation=]
>     snprintf(devpath_tail, PATH_MAX, "%3s/%3s",
> The same problem happens with both DAHDI 3.1.0 and 3.0.0. The gcc compiler version is 7.5.0. The full compilation output is below. Thank you.
>     root at ast1:/usr/src/dahdi-linux-complete-3.1.0+3.1.0# uname -r
>     4.15.0-142-generic
>     root at ast1:/usr/src/dahdi-linux-complete-3.1.0+3.1.0# make install-config
>     make -C linux all
>     make[1]: Entering directory '/usr/src/dahdi-linux-complete-3.1.0+3.1.0/linux'
>     make -C drivers/dahdi/firmware firmware-loaders
>     make[2]: Entering directory '/usr/src/dahdi-linux-complete-3.1.0+3.1.0/linux/drivers/dahdi/firmware'
>     make[2]: Leaving directory '/usr/src/dahdi-linux-complete-3.1.0+3.1.0/linux/drivers/dahdi/firmware'
>     make -C /lib/modules/4.15.0-142-generic/build KBUILD_EXTMOD=/usr/src/dahdi-linux-complete-3.1.0+3.1.0/linux/drivers/dahdi DAHDI_INCLUDE=/usr/src/dahdi-linux-complete-3.1.0+3.1.0/linux/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m
>     make[2]: Entering directory '/usr/src/linux-headers-4.15.0-142-generic'
>       Building modules, stage 2.
>       MODPOST 28 modules
>     WARNING: could not find /usr/src/dahdi-linux-complete-3.1.0+3.1.0/linux/drivers/dahdi/vpmadt032_loader/.vpmadt032_x86_64.o.cmd for /usr/src/dahdi-linux-complete-3.1.0+3.1.0/linux/drivers/dahdi/vpmadt032_loader/vpmadt032_x86_64.o
>     make[2]: Leaving directory '/usr/src/linux-headers-4.15.0-142-generic'
>     make[1]: Leaving directory '/usr/src/dahdi-linux-complete-3.1.0+3.1.0/linux'
>     (cd tools && autoreconf -i && [ -f config.status ] || ./configure --with-dahdi=../linux)
>     make -C tools all
>     make[1]: Entering directory '/usr/src/dahdi-linux-complete-3.1.0+3.1.0/tools'
>     make  all-recursive
>     make[2]: Entering directory '/usr/src/dahdi-linux-complete-3.1.0+3.1.0/tools'
>     Making all in xpp
>     make[3]: Entering directory '/usr/src/dahdi-linux-complete-3.1.0+3.1.0/tools/xpp'
>     Making all in perl_modules
>     make[4]: Entering directory '/usr/src/dahdi-linux-complete-3.1.0+3.1.0/tools/xpp/perl_modules'
>     make[4]: Nothing to be done for 'all'.
>     make[4]: Leaving directory '/usr/src/dahdi-linux-complete-3.1.0+3.1.0/tools/xpp/perl_modules'
>     Making all in oct612x
>     make[4]: Entering directory '/usr/src/dahdi-linux-complete-3.1.0+3.1.0/tools/xpp/oct612x'
>     make[4]: Nothing to be done for 'all'.
>     make[4]: Leaving directory '/usr/src/dahdi-linux-complete-3.1.0+3.1.0/tools/xpp/oct612x'
>     Making all in xtalk
>     make[4]: Entering directory '/usr/src/dahdi-linux-complete-3.1.0+3.1.0/tools/xpp/xtalk'
>       CC       libxtalk_la-xusb_libusb.lo
>     xusb_libusb.c: In function ‘xusb_find_bypath’:
>     xusb_libusb.c:500:41: error: ‘/’ directive output may be truncated writing 1 byte into a region of size between 0 and 4093 [-Werror=format-truncation=]
>         snprintf(devpath_tail, PATH_MAX, "%3s/%3s",
>                                              ^
>     In file included from /usr/include/stdio.h:862:0,
>                      from xusb_libusb.c:23:
>     /usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output between 8 and 8194 bytes into a destination of size 4096
>        return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
>               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>             __bos (__s), __fmt, __va_arg_pack ());
>             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     cc1: all warnings being treated as errors
>     Makefile:658: recipe for target 'libxtalk_la-xusb_libusb.lo' failed
>     make[4]: *** [libxtalk_la-xusb_libusb.lo] Error 1
>     make[4]: Leaving directory '/usr/src/dahdi-linux-complete-3.1.0+3.1.0/tools/xpp/xtalk'
>     Makefile:1043: recipe for target 'all-recursive' failed
>     make[3]: *** [all-recursive] Error 1
>     make[3]: Leaving directory '/usr/src/dahdi-linux-complete-3.1.0+3.1.0/tools/xpp'
>     Makefile:1115: recipe for target 'all-recursive' failed
>     make[2]: *** [all-recursive] Error 1
>     make[2]: Leaving directory '/usr/src/dahdi-linux-complete-3.1.0+3.1.0/tools'
>     Makefile:664: recipe for target 'all' failed
>     make[1]: *** [all] Error 2
>     make[1]: Leaving directory '/usr/src/dahdi-linux-complete-3.1.0+3.1.0/tools'
>     Makefile:9: recipe for target 'all' failed
>     make: *** [all] Error 2



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list