Dahdi-linux-complete-3.4.0 make error

Hello there,

I try to install dahdi-linux-complete-3.4.0 in Debian Trixie with kernel version 6.12.43 and I’m getting the following error:

root@debianbackup:/usr/src/dahdi-linux-complete-3.4.0+3.4.0# make all
make -C linux all
make[1]: Entering directory ‘/usr/src/dahdi-linux-complete-3.4.0+3.4.0/linux’
make -C drivers/dahdi/firmware firmware-loaders
make[2]: Entering directory ‘/usr/src/dahdi-linux-complete-3.4.0+3.4.0/linux/drivers/dahdi/firmware’
make[2]: Leaving directory ‘/usr/src/dahdi-linux-complete-3.4.0+3.4.0/linux/drivers/dahdi/firmware’
make -C /lib/modules/6.12.43+deb13-amd64/build M=/usr/src/dahdi-linux-complete-3.4.0+3.4.0/linux/drivers/dahdi DAHDI_INCLUDE=/usr/src/dahdi-linux-complete-3.4.0+3.4.0/linux/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m
make[2]: Entering directory ‘/usr/src/linux-headers-6.12.43+deb13-amd64’
CC [M] /usr/src/dahdi-linux-complete-3.4.0+3.4.0/linux/drivers/dahdi/dahdi-base.o
CC [M] /usr/src/dahdi-linux-complete-3.4.0+3.4.0/linux/drivers/dahdi/dahdi-sysfs.o
/usr/src/dahdi-linux-complete-3.4.0+3.4.0/linux/drivers/dahdi/dahdi-sysfs.c:275:27: error: initialization of ‘int (*)(struct device *, const struct device_driver )’ from incompatible pointer type ‘int ()(struct device *, struct device_driver *)’ [-Wincompatible-pointer-types]
275 | .match = span_match,
| ^~~~~~~~~~
/usr/src/dahdi-linux-complete-3.4.0+3.4.0/linux/drivers/dahdi/dahdi-sysfs.c:275:27: note: (near initialization for ‘spans_bus_type.match’)
make[4]: *** [/usr/src/linux-headers-6.12.43+deb13-common/scripts/Makefile.build:234: /usr/src/dahdi-linux-complete-3.4.0+3.4.0/linux/drivers/dahdi/dahdi-sysfs.o] Error 1
make[3]: *** [/usr/src/linux-headers-6.12.43+deb13-common/Makefile:1970: /usr/src/dahdi-linux-complete-3.4.0+3.4.0/linux/drivers/dahdi] Error 2
make[2]: *** [/usr/src/linux-headers-6.12.43+deb13-common/Makefile:236: __sub-make] Error 2
make[2]: Leaving directory ‘/usr/src/linux-headers-6.12.43+deb13-amd64’
make[1]: *** [Makefile:74: modules] Error 2
make[1]: Leaving directory ‘/usr/src/dahdi-linux-complete-3.4.0+3.4.0/linux’
make: *** [Makefile:9: all] Error 2

root@debianbackup:/usr/src/dahdi-linux-complete-3.4.0+3.4.0# uname -a
Linux debianbackup 6.12.43+deb13-amd64
#1 SMP PREEMPT_DYNAMIC Debian 6.12.43-1 (2025-08-27) x86_64 GNU/Linux
root@debianbackup:/usr/src/dahdi-linux-complete-3.4.0+3.4.0#

Any help?

It total depands on which company PRI card you are using and model number. you can find everything on documentation of that model number for example if you are using sangoma 2-port PRI card then you download documentation for 2-port sangoma card, there you can see configuration part of that model. and install libpri before install dahdi and enable dahdi module in asterisk.

Thanks for your reply.

I use two TDM400P cards already working in Debian bookworm with dahdi 2.11.1:

root@Chania-Comms:~# service dahdi status
● dahdi.service - LSB: DAHDI kernel modules
Loaded: loaded (/etc/init.d/dahdi; generated)
Active: active (exited) since Tue 2025-09-09 10:39:55 EEST; 1 day 4h ago
Docs: man:systemd-sysv-generator(8)
Process: 939 ExecStart=/etc/init.d/dahdi start (code=exited, status=0/SUCCESS)
CPU: 259ms

Sep 09 10:39:54 Chania-Comms systemd[1]: Starting dahdi.service - LSB: DAHDI kernel modules…
Sep 09 10:39:54 Chania-Comms dahdi[939]: Loading DAHDI hardware modules:
Sep 09 10:39:54 Chania-Comms dahdi[939]: wctdm: done
Sep 09 10:39:54 Chania-Comms dahdi[1203]: using ‘/etc/dahdi/assigned-spans.conf’
Sep 09 10:39:55 Chania-Comms dahdi[939]: Running dahdi_cfg: done.
Sep 09 10:39:55 Chania-Comms systemd[1]: Started dahdi.service - LSB: DAHDI kernel modules.
root@Chania-Comms:~# apt list --installed |grep dahdi

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

dahdi-dkms/oldstable,now 1:2.11.1.0.20170917~dfsg-8.4 all [installed,automatic]
dahdi-linux/oldstable,now 1:2.11.1.0.20170917~dfsg-8.4 all [installed]
dahdi/oldstable,now 1:3.1.0-2 amd64 [installed]
root@Chania-Comms:~# lsdahdi

Span 1: WCTDM/4 “Wildcard TDM400P REV E/F Board 5” (MASTER)

1 FXO FXSKS (In use) (EC: MG2 - INACTIVE)
2 FXO FXSKS (In use) (EC: MG2 - INACTIVE)
3 FXS FXOKS (In use) (EC: MG2 - INACTIVE)
4 FXO FXSKS (In use) (EC: MG2 - INACTIVE) RED

Span 2: WCTDM/4 “Wildcard TDM400P REV E/F Board 5”

5 FXO FXSKS (In use) (EC: MG2 - INACTIVE) RED
6 FXO FXSKS (In use) (EC: MG2 - INACTIVE) RED
7 FXS FXOKS (In use) (EC: MG2 - INACTIVE)
8 FXO FXSKS (In use) (EC: MG2 - INACTIVE)
root@Chania-Comms:~#

In the new system (Debian trixie) I can see the TDM400P cards in pci bus(lspci output):

02:0c.0 Network controller: Tiger Jet Network Inc. / ICP DAS Tiger3XX Modem/ISDN interface
03:0b.0 Communication controller: Tiger Jet Network Inc. / ICP DAS Tiger3XX Modem/ISDN interface

But when I try to compile the dahdi-linux-current(3.4.0) I’m getting the mentioned error.

The driver is the wctdm which is included in dahdi-linux 3.4.0 (from README):

DAHDI Telephony Interface Driver

Asterisk Development Team asteriskteam@digium.com
$Revision$, $Date$

DAHDI stands for Digium Asterisk Hardware Device Interface.

This package contains the kernel modules for DAHDI. For the required
userspace tools see the package dahdi-tools.

Supported Hardware

Digital Cards

- wcte43x:
  * Digium TE435: PCI express quad-port T1/E1/J1
  * Digium TE436: PCI quad-port T1/E1/J1
  * Digium TE235: PCI express dual-port T1/E1/J1
  * Digium TE236: PCI dual-port T1/E1/J1
- wcte13xp:
  * Digium TE131: PCI express single-port T1/E1/J1
  * Digium TE133: PCI express single-port T1/E1/J1 with echocan
  * Digium TE132: PCI single-port T1/E1/J1
  * Digium TE134: PCI single-port T1/E1/J1 with echocan
- wct4xxp:
  * Digium TE205P/TE207P/TE210P/TE212P: PCI dual-port T1/E1/J1
  * Digium TE405P/TE407P/TE410P/TE412P: PCI quad-port T1/E1/J1
  * Digium TE220: PCI-Express dual-port T1/E1/J1
  * Digium TE420: PCI-Express quad-port T1/E1/J1
  * Digium TE820: PCI-Express eight-port T1/E1/J1
- wcte12xp:
  * Digium TE120P: PCI single-port T1/E1/J1
  * Digium TE121: PCI-Express single-port T1/E1/J1
  * Digium TE122: PCI single-port T1/E1/J1
- wcte11xp:
  * Digium TE110P: PCI single-port T1/E1/J1
- wct1xxp:
  * Digium T100P: PCI single-port T1
  * Digium E100P: PCI single-port E1
- wcb4xxp:
  * Digium B410: PCI quad-port BRI
  * Digium B233: PCI-Express dual-port BRI with echo can
  * Digium B234: PCI dual-port dual-port BRI with echo can
  * Digium B433: PCI-Express quad-port BRI with echo can
  * Digium B434: PCI quad-port BRI with echo can


Analog Cards
~~~~~~~~~~~~
- wcaxx:
  * Digium A8A: PCI up to 8 mixed FXS/FXO ports
  * Digium A8B: PCI express up to 8 mixed FXS/FXO ports
  * Digium A4A: PCI up to 4 mixed FXS/FXO ports
  * Digium A4B: PCI express up to 4 mixed FXS/FXO ports 
- wctdm24xxp:
  * Digium TDM2400P/AEX2400: up to 24 analog ports
  * Digium Hx8 Series: Up to 8 analog or BRI ports
- wctdm:
  * Digium TDM400P: up to 4 analog ports
- xpp: Xorcom Astribank: a USB connected unit of up to 32 ports
  (including the digital BRI and E1/T1 modules)
- wcfxo: X100P, similar and clones. A simple single-port FXO card
"
So what is wrong? 
How can I proceed?

1.check for asterisk version should compatibility with dahdi version you are using.
2. in asterisk-cli check if asterisk for this card by using “pri show spans”
3. install libpri before installing dahdi
4. if asterisk shows command not found regarding dahdi then enable it and re-compile it.
which OS, asterisk version you are using?

Hello again,

It is a new installation in a trixie Debian 13 server. I have first to install dahdi and afterward to install Asterisk certified-20.7. The problem is that I get the mentioning error when I try to compile the dahdi-linux. So there is not any relation with Asterisk software etc. From my point of view, It is problem in dahdi-linux source code, which is not matched with debian/kernel libraries/headers.

Thanks again!

have you tried compiling form source as the complete is old 2 years and you are using a new release .

cd /usr/local/src/
git clone https://github.com/asterisk/dahdi-linux
cd dahdi-linux
make
make install
cd ..
cd /usr/local/src
git clone https://github.com/asterisk/dahdi-tools
cd dahdi-tools
autoreconf -i
./configure
make
make install
make config
/etc/init.d/dahdi restart

If you are using certified versions, you should be getting support under your commercial support contract. Otherwise you should be installing the latest normal releases.

1 Like

I would say the warning was harmless, as the code doesn’t access the parameter that has changed, so doesn’t care whether it is declared const, or not, but the spot fix is to replace line 45 with:

Building the master version, as someone has suggested, will include this, but will make version control more difficult.

There are two other files where this may be a problem.

The full commit details for this are at:

and the corresponding bug report is

Many thanks,

Compilation returns no errors!

Now, when I do configure in dahdi-tools I’m getting:

/usr/local/src/dahdi-tools# make config
make: Nothing to be done for ‘config’.

and in order to install the init scripts I execute:

root@debianbackup:/usr/local/src/dahdi-tools# make install-config
mkdir -p /etc/dahdi
mkdir -p /etc/modprobe.d
install -m644 xpp/genconf_parameters /etc/dahdi/genconf_parameters
install -m644 init.conf.sample /etc/dahdi/init.conf
install -m644 blacklist.sample /etc/modprobe.d/dahdi-blacklist.conf
install -m644 modprobe.conf.sample /etc/modprobe.d/dahdi.conf
make -f ./Makefile.legacy top_srcdir=. srcdir=. config
make[1]: Entering directory ‘/usr/local/src/dahdi-tools’
install -D dahdi.init /etc/init.d/dahdi
/usr/sbin/update-rc.d dahdi defaults 15 30
DAHDI has been configured.

List of detected DAHDI devices:

pci:0000:02:0c.0 wctdm- e159:0001 Wildcard TDM400P REV E/F
pci:0000:03:0b.0 wctdm- e159:0001 Wildcard TDM400P REV E/F

run ‘dahdi_genconf modules’ to load support for only
the DAHDI hardware installed in this system. By
default support for all DAHDI hardware is loaded at
DAHDI start.
make[1]: Leaving directory ‘/usr/local/src/dahdi-tools’

I have the service dahdi up but with error in driver wctdm:

root@debianbackup:/usr/local/src/dahdi-tools# service dahdi status
● dahdi.service - LSB: DAHDI kernel modules
Loaded: loaded (/etc/init.d/dahdi; generated)
Active: active (exited) since Thu 2025-09-11 12:54:02 EDT; 6s ago
Invocation: 03a1cd4550b449af8cc1b23740b7436b
Docs: man:systemd-sysv-generator(8)
Process: 957 ExecStart=/etc/init.d/dahdi start (code=exited, status=0/SUCCESS)
Mem peak: 4.3M
CPU: 331ms

Sep 11 12:54:02 debianbackup systemd[1]: Starting dahdi.service - LSB: DAHDI kernel modules…
Sep 11 12:54:02 debianbackup dahdi[957]: Loading DAHDI hardware modules:
Sep 11 12:54:02 debianbackup dahdi[957]: wctdm: error
Sep 11 12:54:02 debianbackup dahdi[965]: /usr/share/dahdi/waitfor_xpds: 106: astribank_is_starting: not found
Sep 11 12:54:02 debianbackup dahdi[980]: using ‘/etc/dahdi/assigned-spans.conf’
Sep 11 12:54:02 debianbackup dahdi[957]: Running dahdi_cfg: done.
Sep 11 12:54:02 debianbackup systemd[1]: Started dahdi.service - LSB: DAHDI kernel modules.

Cannot see the spans:

root@debianbackup:/usr/local/src/dahdi-tools# lsdahdi
root@debianbackup:/usr/local/src/dahdi-tools#

/etc/dahdi/assigned-spans.conf is empty:

#Autogenerated by /usr/sbin/dahdi_span_assignments on Thu Sep 11 11:15:12 AM EDT 2025

#Map devices + local spans to span + base channel number

Thanks again for the help.

Any idea?

in debian it could be it works different! do not have expierence .

use maybe the newer systemd will work better

It’s going to be a “Kernel” issue most likely

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