FomalhautWeisszwerg / rtl8822bu

RTL8822BU Wireless Driver for Linux >= 4.12
GNU General Public License v2.0
34 stars 12 forks source link

Building fails with "error: ‘struct net_device’ has no member named ‘destructor’" #3

Closed FomalhautWeisszwerg closed 7 years ago

FomalhautWeisszwerg commented 7 years ago

Found on [1cdec98].

OS

$ uname -a
Linux debian-server 4.13.0-1-amd64 #1 SMP Debian 4.13.10-1 (2017-10-30) x86_64 GNU/Linux

Compiler

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 7.2.0-12' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.2.1 20171025 (Debian 7.2.0-12)

Log

$ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.13.0-1-amd64/build M=/home/working/rtl8822bu modules
make[1]: Entering directory '/usr/src/linux-headers-4.13.0-1-amd64'
  CC [M]  /home/working/rtl8822bu/os_dep/linux/ioctl_cfg80211.o
/home/working/rtl8822bu/os_dep/linux/ioctl_cfg80211.c: In function ‘rtw_cfg80211_indicate_connect’:
/home/working/rtl8822bu/os_dep/linux/ioctl_cfg80211.c:755:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
   struct cfg80211_roam_info roam_info;
   ^~~~~~
/home/working/rtl8822bu/os_dep/linux/ioctl_cfg80211.c: In function ‘rtw_cfg80211_add_monitor_if’:
/home/working/rtl8822bu/os_dep/linux/ioctl_cfg80211.c:3617:10: error: ‘struct net_device’ has no member named ‘destructo ’; did you mean ‘priv_destructor’?
  mon_ndev->destructor = rtw_ndev_destructor;
          ^~
/home/working/rtl8822bu/os_dep/linux/ioctl_cfg80211.c: In function ‘rtw_cfg80211_preinit_wiphy’:
/home/working/rtl8822bu/os_dep/linux/ioctl_cfg80211.c:6116:18: error: ‘WIPHY_FLAG_SUPPORTS_SCHED_SCAN’ undeclared (first use in this function)
  wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/working/rtl8822bu/os_dep/linux/ioctl_cfg80211.c:6116:18: note: each undeclared identifier is reported only once for each function it appears in
/home/working/rtl8822bu/os_dep/linux/ioctl_cfg80211.c: At top level:
/home/working/rtl8822bu/os_dep/linux/ioctl_cfg80211.c:6149:25: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .change_virtual_intf = cfg80211_rtw_change_iface,
                         ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/working/rtl8822bu/os_dep/linux/ioctl_cfg80211.c:6149:25: note: (near initialization for ‘rtw_cfg80211_ops.change_virtual_intf’)
/home/working/rtl8822bu/os_dep/linux/ioctl_cfg80211.c:6172:22: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .add_virtual_intf = cfg80211_rtw_add_virtual_intf,
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/working/rtl8822bu/os_dep/linux/ioctl_cfg80211.c:6172:22: note: (near initialization for ‘rtw_cfg80211_ops.add_virtual_intf’)
cc1: some warnings being treated as errors
/usr/src/linux-headers-4.13.0-1-common/scripts/Makefile.build:307: recipe for target '/home/working/rtl8822bu/os_dep/linux/ioctl_cfg80211.o' failed
make[4]: *** [/home/working/rtl8822bu/os_dep/linux/ioctl_cfg80211.o] Error 1
/usr/src/linux-headers-4.13.0-1-common/Makefile:1529: recipe for target '_module_/home/working/rtl8822bu' failed
make[3]: *** [_module_/home/working/rtl8822bu] Error 2
Makefile:145: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.13.0-1-amd64'
Makefile:1318: recipe for target 'modules' failed
make: *** [modules] Error 2
FomalhautWeisszwerg commented 7 years ago

net_device.destructor was changed by commit [cf124db566e6b036b8bcbe8decbed740bdfac8c6] in Linux kernel. See https://github.com/torvalds/linux/commit/cf124db566e6b036b8bcbe8decbed740bdfac8c6

FomalhautWeisszwerg commented 7 years ago

Fixed at [49821e5beee8e424ac00ae8c5a9725554ca7287e] but the other problems remain.