DAHDI Compile Failed In Xusb_libusb.c

Home » Asterisk Users » DAHDI Compile Failed In Xusb_libusb.c
Asterisk Users No Comments

Hello,

We have just upgraded a server to Ubuntu 18.04, running kernel
4.15.0-142-generic. Compiling DAHDI 3.0.0 fails with the error below, and
3.1.0 gives the same error. The gcc compiler is version 7.5.0. Would anyone know what the solution is, or should we open a bug report? Thanks in advance for any help!

root@ast1:/usr/src/dahdi-linux-complete-3.0.0+3.0.0# make install-config make -C linux all make[1]: Entering directory
‘/usr/src/dahdi-linux-complete-3.0.0+3.0.0/linux’
make -C drivers/dahdi/firmware firmware-loaders make[2]: Entering directory
‘/usr/src/dahdi-linux-complete-3.0.0+3.0.0/linux/drivers/dahdi/firmware’
make[2]: Leaving directory
‘/usr/src/dahdi-linux-complete-3.0.0+3.0.0/linux/drivers/dahdi/firmware’
make -C /lib/modules/4.15.0-142-generic/build SUBDIRS=/usr/src/dahdi-linux-complete-3.0.0+3.0.0/linux/drivers/dahdi DAHDI_INCLUDE=/usr/src/dahdi-linux-complete-3.0.0+3.0.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.0.0+3.0.0/linux/drivers/dahdi/vpmadt032_loader/.vpmadt032_x86_64.o.cmd for
/usr/src/dahdi-linux-complete-3.0.0+3.0.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.0.0+3.0.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.0.0+3.0.0/tools’
make all-recursive make[2]: Entering directory
‘/usr/src/dahdi-linux-complete-3.0.0+3.0.0/tools’
Making all in xpp make[3]: Entering directory
‘/usr/src/dahdi-linux-complete-3.0.0+3.0.0/tools/xpp’
Making all in perl_modules make[4]: Entering directory
‘/usr/src/dahdi-linux-complete-3.0.0+3.0.0/tools/xpp/perl_modules’
make[4]: Nothing to be done for ‘all’. make[4]: Leaving directory
‘/usr/src/dahdi-linux-complete-3.0.0+3.0.0/tools/xpp/perl_modules’
Making all in oct612x make[4]: Entering directory
‘/usr/src/dahdi-linux-complete-3.0.0+3.0.0/tools/xpp/oct612x’
make[4]: Nothing to be done for ‘all’. make[4]: Leaving directory
‘/usr/src/dahdi-linux-complete-3.0.0+3.0.0/tools/xpp/oct612x’
Making all in xtalk make[4]: Entering directory
‘/usr/src/dahdi-linux-complete-3.0.0+3.0.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.0.0+3.0.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.0.0+3.0.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.0.0+3.0.0/tools’
Makefile:664: recipe for target ‘all’ failed make[1]: *** [all] Error 2
make[1]: Leaving directory ‘/usr/src/dahdi-linux-complete-3.0.0+3.0.0/tools’
Makefile:9: recipe for target ‘all’ failed make: *** [all] Error 2