Can't compile DAHDI under kernel 5.9.x

I have a problem with DAHDI under FEDORA 5.9.8-100.fc32.x86_64.
Everything is fine until :

CC [M] /usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.o
/usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.c:10292:3: error: ‘const struct file_operations’ has no member named ‘ioctl’
10292 | .ioctl = dahdi_ioctl,
| ^~~~~
/usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.c:10292:13: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
10292 | .ioctl = dahdi_ioctl,
| ^~~~~~~~~~~
/usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.c:10292:13: note: (near initialization for ‘dahdi_fops’)
/usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.c:10292:13: error: initialization of ‘int (*)(struct file , loff_t, loff_t, int)’ {aka ‘int ()(struct file , long long int, long long int, int)’} from incompatible pointer type ‘int ()(struct inode *, struct file , unsigned int, long unsigned int)’ [-Werror=incompatible-pointer-types]
/usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.c:10292:13: note: (near initialization for ‘dahdi_fops.fsync’)
/usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.c:10308:3: error: ‘const struct file_operations’ has no member named ‘ioctl’
10308 | .ioctl = dahdi_timer_ioctl,
| ^~~~~
/usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.c:10308:13: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
10308 | .ioctl = dahdi_timer_ioctl,
| ^~~~~~~~~~~~~~~~~
/usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.c:10308:13: note: (near initialization for ‘dahdi_timer_fops’)
/usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.c:10308:13: error: initialization of ‘int (
)(struct file , loff_t, loff_t, int)’ {aka ‘int ()(struct file , long long int, long long int, int)’} from incompatible pointer type ‘int ()(struct inode *, struct file , unsigned int, long unsigned int)’ [-Werror=incompatible-pointer-types]
/usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.c:10308:13: note: (near initialization for ‘dahdi_timer_fops.fsync’)
/usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.c:10399:3: error: ‘const struct file_operations’ has no member named ‘ioctl’
10399 | .ioctl = nodev_ioctl,
| ^~~~~
/usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.c:10399:13: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
10399 | .ioctl = nodev_ioctl,
| ^~~~~~~~~~~
/usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.c:10399:13: note: (near initialization for ‘nodev_fops’)
/usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.c:10399:13: error: initialization of ‘loff_t (
)(struct file , loff_t, int)’ {aka ‘long long int ()(struct file , long long int, int)’} from incompatible pointer type ‘int ()(struct inode *, struct file , unsigned int, long unsigned int)’ [-Werror=incompatible-pointer-types]
/usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.c:10399:13: note: (near initialization for ‘nodev_fops.llseek’)
/usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.c:10416:3: error: ‘const struct file_operations’ has no member named ‘ioctl’
10416 | .ioctl = dahdi_ioctl,
| ^~~~~
/usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.c:10416:13: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
10416 | .ioctl = dahdi_ioctl,
| ^~~~~~~~~~~
/usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.c:10416:13: note: (near initialization for ‘dahdi_chan_fops’)
/usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.c:10416:13: error: initialization of ‘int (
)(struct file , loff_t, loff_t, int)’ {aka ‘int ()(struct file , long long int, long long int, int)’} from incompatible pointer type ‘int ()(struct inode *, struct file *, unsigned int, long unsigned int)’ [-Werror=incompatible-pointer-types]
/usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.c:10416:13: note: (near initialization for ‘dahdi_chan_fops.fsync’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:283: /usr/src/phones/dahdi-linux.old/drivers/dahdi/dahdi-base.o] Error 1
make[1]: *** [Makefile:1784: /usr/src/phones/dahdi-linux.old/drivers/dahdi] Error 2
make[1]: Leaving directory ‘/usr/src/kernels/5.9.8-100.fc32.x86_64’

I already corrected hostprogs-y -> hostprogs and always to always-y (both obsoletes).
drivers/dahdi/Kbuild:155 hostprogs-y -> hostprogs
drivers/dahdi/xpp/Kbuild:60 hostprogs-y -> hostprogs
drivers/dahdi/xpp/Kbuild:61 always -> always-y

But, for the others problems I don’t know from where they belong.

Any help? Thanks.

I’ve pushed some changes to the ‘next’ branch that will allow DAHDI to compile up through 5.10-rc4

They are at http://git.asterisk.org/gitweb/?p=dahdi/linux.git;a=shortlog;h=refs/heads/next.

You can download then from the asterisk git server like:

git clone -b next git://git.asterisk.org/dahdi/linux.git dahdi-linux

or from my Github repository:

git clone -b next https://github.com/sruffell/dahdi-linux

Just FYI, the next branch is awaiting testing by Sangoma for a release.

Thank you, everything is fine now. But, AEX410 is still missing. :slight_smile:
I did a clone from next yesterday and it didn’t work.
Would you be kind enough to explain what was wrong please? -> jln@stben.net.
Again thank you for your work.
Jean-Louis

Digium (before the Sangoma acquisition) removed support for cards that are no longer supported in commit a66e88e666.

For now, you should be able to restore support like:

git diff a66e88e666..a66e88e666^ -- drivers/dahdi/wctdm24xxp/ | git apply

I don’t have a problem to add that card it’s just annoying.
And AEX410 works great I think.
It’s crazy because the structure for this card is still included :
drivers/dahdi/wctdm24xxp/base.c:192

Ahh, yeah. :slight_smile: I’m not sure how much trouble it was causing Digium/Sangoma to leave support for the unsupported cards in the driver and at least compile test them.

Although I’m beginning to fear DAHDI is completely abandoned…

I think they can stop supporting a product and still leaving the drivers.
It’s against EU rule to remove the driver.
I still don’t know where was the definition of that structure that caused
the compilation problem.

OK you just ditch it!

How did they expect to interface their cards still on sale?

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