DAHDI compilation fails on Ubuntu server 22.04

During the build of DAHDI 3.2.0 the make process fails with the following output:

make[2]: Leaving directory '/usr/src/linux-headers-5.15.0-89-generic'
make[1]: Leaving directory '/home/srodgers/src/asterisk-complete/dahdi-linux-complete-3.2.0+3.2.0/linux'
(cd tools && autoreconf -i && [ -f config.status ] || ./configure --with-dahdi=../linux)
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'auxdir'.
libtoolize: copying file 'auxdir/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:66: warning: The macro `AC_CONFIG_HEADER' is obsolete.
configure.ac:66: You should run autoupdate.
./lib/autoconf/status.m4:719: AC_CONFIG_HEADER is expanded from...
configure.ac:66: the top level
configure.ac:69: warning: The macro `AC_GNU_SOURCE' is obsolete.
configure.ac:69: You should run autoupdate.
./lib/autoconf/specific.m4:312: AC_GNU_SOURCE is expanded from...
configure.ac:69: the top level
configure.ac:82: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:82: You should run autoupdate.
m4/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:82: the top level
configure.ac:177: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:177: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
acinclude.m4:30: AST_EXT_LIB_SETUP is expanded from...
configure.ac:177: the top level
configure.ac:178: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:178: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
acinclude.m4:30: AST_EXT_LIB_SETUP is expanded from...
configure.ac:178: the top level
configure.ac:179: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:179: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
acinclude.m4:30: AST_EXT_LIB_SETUP is expanded from...
configure.ac:179: the top level
configure.ac:180: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:180: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
acinclude.m4:30: AST_EXT_LIB_SETUP is expanded from...
configure.ac:180: the top level
configure.ac:18: error: possibly undefined macro: AC_SUBST
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:174: error: possibly undefined macro: AC_CHECK_LIB
configure.ac:219: error: possibly undefined macro: AC_DEFINE
configure.ac:223: error: possibly undefined macro: AC_MSG_NOTICE
autoreconf: error: /usr/bin/autoconf failed with exit status: 1
configure: error: cannot find required auxiliary files: config.guess config.sub compile missing install-sh
make: *** [Makefile:10: all] Error 1
srodgers@asterisk:~/src/asterisk-complete/dahdi-linux-complete-3.2.0+3.2.0$ uname -a
Linux asterisk 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
srodgers@asterisk:~/src/asterisk-complete/dahdi-linux-complete-3.2.0+3.2.0$ 

It looks like the DAHDI build process depends on some very old autoconf tools, but I’m not sure. Does anyone have any ideas on how to resolve this error on Ubuntu Server 22.04?

-----If ./bootstrap.sh generates the error “Generating the configure script …
configure.ac:82: error: possibly undefined macro: AC_PROG_LIBTOOL” means that you need to install the libtool package
and run the ./bootstrap.sh command again

yum -y install libtool
dnf install dahdi-tools-devel.x86_64

./configure

In turn, the ./configure command may display “configure: error: cannot find install-sh, install.sh, or shtool in auxdir “.”/auxdir”.
In this case, additionally execute the following commands and run ./configure again

libtoolize
aclocal
automake --add-missing
autoconf

—After successfully executing ./bootstrap.sh and ./configure, we can proceed to compile the package.—

./bootstrap.sh
./configure

make clean
make && make install
make install-config
cp system.conf.sample /etc/dahdi/system.conf

modprobe wcb4xxp
dahdi_genconf -v
dahdi_cfg -vvvvvvvvv

----If everything went without errors, we can now use a whole set of commands, such as: dahdi_cfg, dahdi_genconf, dahdi_hardware, dahdi_maint,
dahdi_monitor, dahdi_registration, dahdi_scan, dahdi_span_assignments, dahdi_span_types, dahdi_speed, dahdi_test,—
dahdi_tools and dahdi_waitfor_span

—However we, as intended, will starting by automatically generate the configuration, only for our card.—

dahdi_genconf modules

Thanks for the response. After doing all of that, everything was ok up to the point of running ./configure. Configure is failing with:

checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
./configure: line 14124: syntax error near unexpected token `LIBUSBX,'
./configure: line 14124: `  PKG_CHECK_MODULES(LIBUSBX, libusb-1.0,'

I have libusb and libusb-dev installed.

Install these below:

libtoolize
aclocal
automake --add-missing
autoconf

—After successfully executing ./bootstrap.sh and ./configure, we can proceed to compile the package.—

./bootstrap.sh
./configure

Those are already installed. Running them results in the following:

srodgers@asterisk:~/src/asterisk-complete/dahdi-tools$ libtoolize
srodgers@asterisk:~/src/asterisk-complete/dahdi-tools$ aclocal
srodgers@asterisk:~/src/asterisk-complete/dahdi-tools$ automake --add-missing
srodgers@asterisk:~/src/asterisk-complete/dahdi-tools$ autoconf
srodgers@asterisk:~/src/asterisk-complete/dahdi-tools$ ./bootstrap.sh
Generating the configure script ...
srodgers@asterisk:~/src/asterisk-complete/dahdi-tools$

They run without error.

After the above are run, then running ./configure results in the following output:

srodgers@asterisk:~/src/asterisk-complete/dahdi-tools$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for ld... ld
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gawk... (cached) gawk
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... ld
checking if the linker (ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... ld -m elf_x86_64
checking if the linker (ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for GNU make... make
sed: can't read conftest.c: No such file or directory
checking for grep... (cached) /usr/bin/grep
checking for sh... /bin/bash
checking for ln... /usr/bin/ln
checking for wget... /usr/bin/wget
checking for perl... /usr/bin/perl
checking for perl libdir... /usr/local/share/perl/5.30.0
checking for -Wdeclaration-after-statement support... yes
checking sys/soundcard.h usability... yes
checking sys/soundcard.h presence... yes
checking for sys/soundcard.h... yes
checking linux/soundcard.h usability... yes
checking linux/soundcard.h presence... yes
checking for linux/soundcard.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for unistd.h... (cached) yes
checking for inline... inline
checking for size_t... yes
checking for ssize_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint8_t... yes
checking for cos in -lm... yes
checking for pthread_create in -lpthread... yes
checking for DAHDI_CODE in dahdi/user.h... yes
checking for DAHDI_CONFIG_NTTE in dahdi/user.h... yes
checking for newtBell in -lnewt... no
checking for usb_init in -lusb... yes
checking usb.h usability... yes
checking usb.h presence... yes
checking for usb.h... yes
checking for pcap_compile in -lpcap... no
checking whether DAHDI_TXMIRROR is declared... no
checking for semtimedop... yes
checking for alarm... yes
checking for bzero... yes
checking for gettimeofday... yes
checking for memset... yes
checking for pow... yes
checking for regcomp... yes
checking for select... yes
checking for socket... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strrchr... yes
checking for strstr... yes
checking for strtol... yes
checking for strtoul... yes
checking for error_at_line... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
./configure: line 14124: syntax error near unexpected token `LIBUSBX,'
./configure: line 14124: `  PKG_CHECK_MODULES(LIBUSBX, libusb-1.0,'
srodgers@asterisk:~/src/asterisk-complete/dahdi-tools$ 

So configure still fails after running the programs mentioned. Why is there a syntax error near token LIBUSBX? If I recall LIBUSBX is no longer needed and was superseded with libusb.

So what allowed configure to run successfully was to do the following:

  1. Install libglib2.0-dev
  2. Run autoconf -vis
1 Like

Thanks for posting back what made it finally work for you.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.