Cant compile dahdi on kali linux (6.0.0-kali5-amd64)

Hey asterisks,

i would like to compile dahdi on kali linux but i got errors , maybe someone can help to build it ?
i guess its a bit tricky because of the kali kernel would be nice to get some help here :slight_smile:

make -C linux all
make[1]: Verzeichnis „/usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux“ wird betreten
make -C drivers/dahdi/firmware firmware-loaders
make[2]: Verzeichnis „/usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/firmware“ wird betreten
make[2]: Verzeichnis „/usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/firmware“ wird verlassen
make -C /lib/modules/6.0.0-kali5-amd64/build M=/usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi DAHDI_INCLUDE=/usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m
make[2]: Verzeichnis „/usr/src/linux-headers-6.0.0-kali5-amd64“ wird betreten
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_adpcm_chan.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_channel.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_stats.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_conf_bridge.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_debug.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_events.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_interrupts.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_memory.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_miscellaneous.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_mixer.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_phasing_tsst.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_playout_buf.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_remote_debug.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_tlv.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_tone_detection.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_tsi_cnct.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_tsst.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/apilib/bt/octapi_bt0.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/apilib/largmath/octapi_largmath.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/apilib/llman/octapi_llman.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/oct612x-user.o
  LD [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/oct612x/oct612x.o
  CC [M]  /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/wct4xxp/base.o
/usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/wct4xxp/base.c: In function ‘t4_allocate_buffers’:
/usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/wct4xxp/base.c:3864:17: error: implicit declaration of function ‘pci_alloc_consistent’ [-Werror=implicit-function-declaration]
 3864 |         alloc = pci_alloc_consistent(wc->dev, numbufs * T4_BASE_SIZE(wc) * 2,
      |                 ^~~~~~~~~~~~~~~~~~~~
/usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/wct4xxp/base.c:3864:15: warning: assignment to ‘void *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 3864 |         alloc = pci_alloc_consistent(wc->dev, numbufs * T4_BASE_SIZE(wc) * 2,
      |               ^
/usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/wct4xxp/base.c: In function ‘t4_increase_latency’:
/usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/wct4xxp/base.c:3943:9: error: implicit declaration of function ‘pci_free_consistent’ [-Werror=implicit-function-declaration]
 3943 |         pci_free_consistent(wc->dev, T4_BASE_SIZE(wc) * oldbufs * 2,
      |         ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[4]: *** [/usr/src/linux-headers-6.0.0-kali5-common/scripts/Makefile.build:254: /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/wct4xxp/base.o] Fehler 1
make[3]: *** [/usr/src/linux-headers-6.0.0-kali5-common/scripts/Makefile.build:470: /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/wct4xxp] Fehler 2
make[2]: *** [/usr/src/linux-headers-6.0.0-kali5-common/Makefile:1876: /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi] Fehler 2
make[2]: Verzeichnis „/usr/src/linux-headers-6.0.0-kali5-amd64“ wird verlassen
make[1]: *** [Makefile:74: modules] Fehler 2
make[1]: Verzeichnis „/usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux“ wird verlassen
make: *** [Makefile:9: all] Fehler 2

@InterLinked do you got a idea ? i saw you had a trick to patch the problem on another system

Yes, try installing using PhreakScript: GitHub - InterLinked1/phreakscript: A utility to automate the installation, maintenance, and debugging of Asterisk/DAHDI, while integrating additional patches to provide the richest telephony experience

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