Skip to content

On Ubuntu 26.04, compiling dahdi-linux from its master branch fails #107

@rodolfojcj

Description

@rodolfojcj

Attempting to compile dahdi-linux from its master branch (Git commit d1c842a) on Ubuntu 26.04 fails.

The resulting error output is like this:

2026-04-06 15:15:40 (494 KB/s) - ‘dahdi-fwload-vpmadt032-1.25.0.tar.gz’ saved [149360/149360]

make[1]: Leaving directory '/usr/src/dahdi-linux-master/drivers/dahdi/firmware'
make -C /lib/modules/7.0.0-10-generic/build M=/usr/src/dahdi-linux-master/drivers/dahdi DAHDI_INCLUDE=/usr/src/dahdi-linux-master/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m
make[1]: Entering directory '/usr/src/linux-headers-7.0.0-10-generic'
make[2]: Entering directory '/usr/src/dahdi-linux-master/drivers/dahdi'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc (Ubuntu 15.2.0-15ubuntu2) 15.2.0
  You are using:           gcc (Ubuntu 15.2.0-16ubuntu1) 15.2.0
warning: pahole version differs from the one used to build the kernel
  The kernel was built with: 131
  You are using:             0
  CC [M]  dahdi-base.o
  CC [M]  dahdi-sysfs.o
dahdi-sysfs.c:45:127: error: missing binary operator before token ‘(’
   45 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0) ||(defined(RHEL_RELEASE_CODE) && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 8)))
      |                                                                                                                               ^
dahdi-sysfs.c:287:27: error: initialization of ‘int (*)(struct device *, const struct device_driver *)’ from incompatible pointer type ‘int (*)(struct device *, struct device_driver *)’ [-Wincompatible-pointer-types]
  287 |         .match          = span_match,
      |                           ^~~~~~~~~~
dahdi-sysfs.c:287:27: note: (near initialization for ‘spans_bus_type.match’)
dahdi-sysfs.c:48:12: note: ‘span_match’ declared here
   48 | static int span_match(struct device *dev, struct device_driver *driver)
      |            ^~~~~~~~~~
make[4]: *** [/usr/src/linux-headers-7.0.0-10-generic/scripts/Makefile.build:289: dahdi-sysfs.o] Error 1
make[3]: *** [/usr/src/linux-headers-7.0.0-10-generic/Makefile:2110: .] Error 2
make[2]: *** [/usr/src/linux-headers-7.0.0-10-generic/Makefile:248: __sub-make] Error 2
make[2]: Leaving directory '/usr/src/dahdi-linux-master/drivers/dahdi'
make[1]: *** [Makefile:248: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-7.0.0-10-generic'
make: *** [Makefile:74: modules] Error 2

Running Linux kernel is 7.0.0-10-generic #10-Ubuntu SMP PREEMPT_DYNAMIC Thu Mar 19 10:24:42 UTC 2026 x86_64 GNU/Linux.

gcc version is (Ubuntu 15.2.0-16ubuntu1) 15.2.0.

Ubuntu version is 26.04 (Resolute Raccoon).

Could you please take a look and try to find a fix for that?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions