asterisk / dahdi-linux

This is the official dahdi-linux repository. All issues and PR should be raised here.
GNU General Public License v2.0
45 stars 68 forks source link

Compile issue in alma/rocky 9.4 #50

Open carpenox opened 3 months ago

carpenox commented 3 months ago

here is the error I am getting

/usr/src/dahdi-linux/drivers/dahdi/xpp/xbus-sysfs.c:472:19: error: initialization of ‘int ()(const struct device , struct kobj_uevent_env )’ from incompatible pointer type ‘int ()(struct device , struct kobj_uevent_env )’ [-Werror=incompatible-pointer-types] 472 | .uevent = astribank_uevent, | ^~~~ /usr/src/dahdi-linux/drivers/dahdi/xpp/xbus-sysfs.c:472:19: note: (near initialization for ‘toplevel_bus_type.uevent’) cc1: some warnings being treated as errors make[3]: [scripts/Makefile.build:299: /usr/src/dahdi-linux/drivers/dahdi/xpp/xbus-sysfs.o] Error 1 make[2]: [scripts/Makefile.build:585: /usr/src/dahdi-linux/drivers/dahdi/xpp] Error 2 make[1]: *** [Makefile:1934: /usr/src/dahdi-linux/drivers/dahdi] Error 2

nicolasUL commented 3 months ago

I have the same problem in rocky 9.4 with kernel 5.14.0-427.16.1

carpenox commented 3 months ago

grubby --default-kernel grubby --default-index grubby --info=ALL | egrep -i 'index|title' grubby --set-default /boot/vmlinuz-5.14.0-362.24.2.el9_3.x86_64 grubby --set-default-index=3

this seems to fix it

ilko-t commented 3 months ago

On RHEL 9.4 I've used this to patch it while waiting for official update: https://community.asterisk.org/t/dahdi-on-alma-9-4/102370

nicolasUL commented 2 months ago

On RHEL 9.4 I've used this to patch it while waiting for official update: https://community.asterisk.org/t/dahdi-on-alma-9-4/102370

Yes this patch works.

Here are the changes in detail in Rocky 9.4 :

in linux/drivers/dahdi/xpp/xbus-sysfs.c line 72 : static int span_uevent(const struct device dev, struct kobj_uevent_env kenv) line 423 : static int astribank_uevent(const struct device dev, struct kobj_uevent_env kenv)

in /linux/drivers/dahdi/dahdi-sysfs-chan.c line 487 : remove THIS_MODULE, => dahdi_class = class_create("dahdi");

in /tools/dahdi_cfg.c line 145 : char attribute[1036];