Problem building WANPIPE Drivers

Good day,

I’m in the process of building a new Asterisk 18-LTS system on Ubuntu 22 (Jammy Jellyfish). I found and installed preconfigured packages for DAHDI and LIBPRI, but I’m using the Sangoma A104d quad T1 card so I need the WANPIPE drivers as well.

This is where I ran into problems. The WANPIPE install starts OK, and gets most of the way through, then I get this:

make[1]: Entering directory ‘/usr/src/linux-headers-5.15.0-41-generic’
CC [M] /usr/local/src/wanpipe-7.0.34/kdrvtmp/wanmain.o
CC [M] /usr/local/src/wanpipe-7.0.34/kdrvtmp/wanproc.o
CC [M] /usr/local/src/wanpipe-7.0.34/kdrvtmp/waniface.o
CC [M] /usr/local/src/wanpipe-7.0.34/kdrvtmp/wandev.o
LD [M] /usr/local/src/wanpipe-7.0.34/kdrvtmp/wanrouter.o
MODPOST /usr/local/src/wanpipe-7.0.34/kdrvtmp/Module.symvers
WARNING: modpost: “wp_logger_input” [/usr/local/src/wanpipe-7.0.34/kdrvtmp/wanrouter.ko] undefined!
WARNING: modpost: “sdla_hw_probe” [/usr/local/src/wanpipe-7.0.34/kdrvtmp/wanrouter.ko] undefined!
WARNING: modpost: “sdla_get_hw_probe” [/usr/local/src/wanpipe-7.0.34/kdrvtmp/wanrouter.ko] undefined!
WARNING: modpost: “sdla_get_hw_usb_adptr_cnt” [/usr/local/src/wanpipe-7.0.34/kdrvtmp/wanrouter.ko] undefined!
WARNING: modpost: “sdladrv_callback” [/usr/local/src/wanpipe-7.0.34/kdrvtmp/wanrouter.ko] undefined!
WARNING: modpost: “wp_logger_level_default” [/usr/local/src/wanpipe-7.0.34/kdrvtmp/wanrouter.ko] undefined!
WARNING: modpost: “wanpipe_cdev_cfg_ctrl_create” [/usr/local/src/wanpipe-7.0.34/kdrvtmp/wanrouter.ko] undefined!
WARNING: modpost: “wanpipe_cdev_free” [/usr/local/src/wanpipe-7.0.34/kdrvtmp/wanrouter.ko] undefined!
WARNING: modpost: “sdla_get_hwinfo” [/usr/local/src/wanpipe-7.0.34/kdrvtmp/wanrouter.ko] undefined!
WARNING: modpost: “sdla_get_hw_adptr_cnt” [/usr/local/src/wanpipe-7.0.34/kdrvtmp/wanrouter.ko] undefined!
WARNING: modpost: suppressed 1 unresolved symbol warnings because there were too many)
CC [M] /usr/local/src/wanpipe-7.0.34/kdrvtmp/wanrouter.mod.o
LD [M] /usr/local/src/wanpipe-7.0.34/kdrvtmp/wanrouter.ko
BTF [M] /usr/local/src/wanpipe-7.0.34/kdrvtmp/wanrouter.ko
Skipping BTF generation for /usr/local/src/wanpipe-7.0.34/kdrvtmp/wanrouter.ko due to unavailability of vmlinux
make[1]: Leaving directory ‘/usr/src/linux-headers-5.15.0-41-generic’
make -C /lib/modules/5.15.0-41-generic/build SUBDIRS=/usr/local/src/wanpipe-7.0.34/kdrvtmp CC=gcc KBUILD_VERBOSE=0 modules
make[1]: Entering directory ‘/usr/src/linux-headers-5.15.0-41-generic’
CC [M] /usr/local/src/wanpipe-7.0.34/kdrvtmp/af_wanpipe_src.o
/usr/local/src/wanpipe-7.0.34/kdrvtmp/af_wanpipe_src.c: In function ‘wanpipe_accept’:
/usr/local/src/wanpipe-7.0.34/kdrvtmp/af_wanpipe_src.c:603:18: error: ‘struct task_struct’ has no member named ‘state’; did you mean ‘__state’?
603 | current->state = TASK_INTERRUPTIBLE;
| ^~~~~
| __state
/usr/local/src/wanpipe-7.0.34/kdrvtmp/af_wanpipe_src.c:622:18: error: ‘struct task_struct’ has no member named ‘state’; did you mean ‘__state’?
622 | current->state = TASK_RUNNING;
| ^~~~~
| __state
make[2]: *** [scripts/Makefile.build:285: /usr/local/src/wanpipe-7.0.34/kdrvtmp/af_wanpipe_src.o] Error 1
make[1]: *** [Makefile:1875: /usr/local/src/wanpipe-7.0.34/kdrvtmp] Error 2
make[1]: Leaving directory ‘/usr/src/linux-headers-5.15.0-41-generic’
make: *** [Makefile:33: all] Error 2

I’m no programmer, just a guy trying to get a new install to work. Anyone got an idea on this one?

Thanks.

Hi,
in file patches\kdrivers\src\wanrouter\af_wanpipe_src.c replace current->state with current->__state on line 603 and 622. Run script again.

Yes, I’ve seen it with WRITE_ONCE as well but not sure what impact that has.

Here is a more complete fix for newer kernels (>= 5.14) contributed by a community member: phreakscript/af_wanpipe.diff at master · InterLinked1/phreakscript · GitHub

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