Comment 8 for bug 1757008

Revision history for this message
Pomco (ppomco) wrote : Re: bcmwl-kernel-source: bcmwl kernel module failed to build [error: implicit declaration of function ‘init_timer’]

Hi.

I'm redirected here from bug #1770029

When upgrading kernel to 4.15.0-24-generic I also had problem with my broadcom network card : lost wifi

So I try to reinstall broadcom-sta-dkms :

:~$ sudo apt-get install broadcom-sta-dkms
[...]
Préparation du dépaquetage de .../broadcom-sta-dkms_6.30.223.271-3~16.04.2_all.deb ...
Dépaquetage de broadcom-sta-dkms (6.30.223.271-3~16.04.2) ...
Paramétrage de broadcom-sta-dkms (6.30.223.271-3~16.04.2) ...
Loading new broadcom-sta-6.30.223.271 DKMS files...
Building only for 4.15.0-24-generic
Building initial module for 4.15.0-24-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/broadcom-sta-dkms.0.crash'
Error! Bad return status for module build on kernel: 4.15.0-24-generic (x86_64)
Consult /var/lib/dkms/broadcom-sta/6.30.223.271/build/make.log for more information.

And then I take a look to the make.log file :

~$ cat /var/lib/dkms/broadcom-sta/6.30.223.271/build/make.log
DKMS make.log for broadcom-sta-6.30.223.271 for kernel 4.15.0-24-generic (x86_64)
mardi 3 juillet 2018, 11:16:00 (UTC+0200)
/bin/sh: 1: [: Illegal number:
/bin/sh: 1: [: Illegal number:
Wireless Extension is the only possible API for this kernel version
Using Wireless Extension API
KBUILD_NOPEDANTIC=1 make -C /lib/modules/4.15.0-24-generic/build M=`pwd`
make[1] : on entre dans le répertoire « /usr/src/linux-headers-4.15.0-24-generic »
CFG80211 API is prefered for this kernel version
Using CFG80211 API
Kernel architecture is X86_64
  CC [M] /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.o
/var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.c: In function ‘osl_os_get_image_block’:
/var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.c:1083:26: warning: passing argument 2 of ‘kernel_read’ makes pointer from integer without a cast [-Wint-conversion]
  rdlen = kernel_read(fp, fp->f_pos, buf, len);
                          ^
In file included from ./include/linux/huge_mm.h:7:0,
                 from ./include/linux/mm.h:463,
                 from /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/include/linuxver.h:65,
                 from /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.c:25:
./include/linux/fs.h:2858:16: note: expected ‘void *’ but argument is of type ‘loff_t {aka long long int}’
 extern ssize_t kernel_read(struct file *, void *, size_t, loff_t *);
                ^
/var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.c:1083:37: warning: passing argument 3 of ‘kernel_read’ makes integer from pointer without a cast [-Wint-conversion]
  rdlen = kernel_read(fp, fp->f_pos, buf, len);
                                     ^
In file included from ./include/linux/huge_mm.h:7:0,
                 from ./include/linux/mm.h:463,
                 from /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/include/linuxver.h:65,
                 from /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.c:25:
./include/linux/fs.h:2858:16: note: expected ‘size_t {aka long unsigned int}’ but argument is of type ‘char *’
 extern ssize_t kernel_read(struct file *, void *, size_t, loff_t *);
                ^
/var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.c:1083:42: warning: passing argument 4 of ‘kernel_read’ makes pointer from integer without a cast [-Wint-conversion]
  rdlen = kernel_read(fp, fp->f_pos, buf, len);
                                          ^
In file included from ./include/linux/huge_mm.h:7:0,
                 from ./include/linux/mm.h:463,
                 from /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/include/linuxver.h:65,
                 from /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.c:25:
./include/linux/fs.h:2858:16: note: expected ‘loff_t * {aka long long int *}’ but argument is of type ‘int’
 extern ssize_t kernel_read(struct file *, void *, size_t, loff_t *);
                ^
symbolmap: la: invalid section
  CC [M] /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/wl/sys/wl_linux.o
/var/lib/dkms/broadcom-sta/6.30.223.271/build/src/wl/sys/wl_linux.c: In function ‘wl_init_timer’:
/var/lib/dkms/broadcom-sta/6.30.223.271/build/src/wl/sys/wl_linux.c:2352:2: error: implicit declaration of function ‘init_timer’ [-Werror=implicit-function-declaration]
  init_timer(&t->timer);
  ^
/var/lib/dkms/broadcom-sta/6.30.223.271/build/src/wl/sys/wl_linux.c:2353:10: error: ‘struct timer_list’ has no member named ‘data’
  t->timer.data = (ulong) t;
          ^
/var/lib/dkms/broadcom-sta/6.30.223.271/build/src/wl/sys/wl_linux.c:2354:20: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
  t->timer.function = wl_timer;
                    ^
cc1: some warnings being treated as errors
scripts/Makefile.build:332 : la recette pour la cible « /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/wl/sys/wl_linux.o » a échouée
make[2]: *** [/var/lib/dkms/broadcom-sta/6.30.223.271/build/src/wl/sys/wl_linux.o] Erreur 1
Makefile:1552 : la recette pour la cible « _module_/var/lib/dkms/broadcom-sta/6.30.223.271/build » a échouée
make[1]: *** [_module_/var/lib/dkms/broadcom-sta/6.30.223.271/build] Erreur 2
make[1] : on quitte le répertoire « /usr/src/linux-headers-4.15.0-24-generic »
Makefile:177 : la recette pour la cible « all » a échouée
make: *** [all] Erreur 2

I hope it can help