tomaspinho / rtl8821ce

Other
1.6k stars 408 forks source link

Compilation error for arch linux latest kernel `Error! Bad return status for module build on kernel: 6.7.1-arch1-1 (x86_64)` #344

Closed nikelborm closed 10 months ago

nikelborm commented 10 months ago

I don't know what other info may be useful to you, so please ask questions Also here are build logs of the error happened for rtl8821ce

DKMS make.log for rtl8821ce-1.0.5.r166.gb5b8a5c for kernel 6.7.1-arch1-1 (x86_64)
Wed Jan 24 19:50:17 MSK 2024
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/6.7.1-arch1-1/build M=/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build  modules
make[1]: Entering directory '/usr/lib/modules/6.7.1-arch1-1/build'
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_cmd.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_security.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_debug.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_io.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_ioctl_query.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_ioctl_set.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_ieee80211.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_mlme.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_mlme_ext.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_mi.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_wlan_util.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_vht.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_pwrctrl.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_rf.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_chplan.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_recv.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_sta_mgt.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_ap.o
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_mlme.c: In function ‘rtw_drv_scan_by_self’:
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_mlme.c:3161:17: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
 3161 |                 else
      |                 ^~~~
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_mlme.c:3164:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’
 3164 |                         goto exit;
      |                         ^~~~
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_rf.c: In function ‘dump_txpwr_lmt’:
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_rf.c:765:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  765 |         if (IS_HARDWARE_TYPE_JAGUAR_AND_JAGUAR2(adapter))
      |         ^~
In file included from /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/include/drv_types.h:60,
                 from /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_rf.c:17:
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/include/rtw_debug.h:220:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  220 |         do {\
      |         ^~
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_rf.c:767:17: note: in expansion of macro ‘RTW_PRINT_SEL’
  767 |                 RTW_PRINT_SEL(sel, "txpwr_lmt_5g_20_40_ref:0x%02x\n", rfctl->txpwr_lmt_5g_20_40_ref);
      |                 ^~~~~~~~~~~~~
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/mesh/rtw_mesh.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/mesh/rtw_mesh_pathtbl.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/mesh/rtw_mesh_hwmp.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_xmit.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_p2p.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_rson.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_tdls.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_br_ext.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_iol.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_sreset.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_btcoex_wifionly.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_btcoex.o
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_sta_mgt.c: In function ‘rtw_mfree_stainfo’:
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_sta_mgt.c:379:25: warning: the comparison will always evaluate as ‘true’ for the address of ‘lock’ will never be NULL [-Waddress]
  379 |         if (&psta->lock != NULL)
      |                         ^~
In file included from /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/include/drv_types.h:108,
                 from /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_sta_mgt.c:17:
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/include/sta_info.h:263:17: note: ‘lock’ declared here
  263 |         _lock   lock;
      |                 ^~~~
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_beamforming.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_odm.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_rm.o
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_ap.c: In function ‘rtw_ap_update_chbw_by_ifbmp’:
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_ap.c:4392:42: warning: the comparison will always evaluate as ‘true’ for the address of ‘padapters’ will never be NULL [-Waddress]
 4392 |                 if (!(ifbmp & BIT(i)) || !dvobj->padapters)
      |                                          ^
In file included from /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_ap.c:17:
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/include/drv_types.h:1041:19: note: ‘padapters’ declared here
 1041 |         _adapter *padapters[CONFIG_IFACE_NUMBER];/*IFACE_ID_MAX*/
      |                   ^~~~~~~~~
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_ap.c:4412:42: warning: the comparison will always evaluate as ‘true’ for the address of ‘padapters’ will never be NULL [-Waddress]
 4412 |                 if (!(ifbmp & BIT(i)) || !dvobj->padapters)
      |                                          ^
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/include/drv_types.h:1041:19: note: ‘padapters’ declared here
 1041 |         _adapter *padapters[CONFIG_IFACE_NUMBER];/*IFACE_ID_MAX*/
      |                   ^~~~~~~~~
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/rtw_rm_fsm.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/efuse/rtw_efuse.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/osdep_service.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/os_intfs.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/pci_intf.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/pci_ops_linux.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/ioctl_linux.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/xmit_linux.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/mlme_linux.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/recv_linux.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/ioctl_cfg80211.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/rtw_cfgvendor.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/wifi_regd.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/rtw_android.o
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/efuse/rtw_efuse.c: In function ‘rtw_efuse_analyze’:
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/efuse/rtw_efuse.c:781:17: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  781 |                 if (i % 16 == 0)
      |                 ^~
In file included from /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/include/drv_types.h:60,
                 from /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/efuse/rtw_efuse.c:17:
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/include/rtw_debug.h:231:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  231 |         do {\
      |         ^~
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/core/efuse/rtw_efuse.c:783:25: note: in expansion of macro ‘_RTW_PRINT_SEL’
  783 |                         _RTW_PRINT_SEL(RTW_DBGDUMP, "%02X%s"
      |                         ^~~~~~~~~~~~~~
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/rtw_proc.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/rtw_rhashtable.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/ioctl_mp.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/hal/hal_intf.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/hal/hal_com.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/hal/hal_com_phycfg.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/hal/hal_phy.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/hal/hal_dm.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/hal/hal_dm_acs.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/hal/hal_btcoex_wifionly.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/hal/hal_btcoex.o
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/ioctl_cfg80211.c: In function ‘cfg80211_rtw_scan’:
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/ioctl_cfg80211.c:2911:33: warning: the comparison will always evaluate as ‘true’ for the address of ‘ssid’ will never be NULL [-Waddress]
 2911 |                 if (ssids->ssid != NULL
      |                                 ^~
In file included from /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/include/osdep_service_linux.h:93,
                 from /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/include/osdep_service.h:50,
                 from /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/include/drv_types.h:27,
                 from /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/ioctl_cfg80211.c:17:
./include/net/cfg80211.h:2538:12: note: ‘ssid’ declared here
 2538 |         u8 ssid[IEEE80211_MAX_SSID_LEN];
      |            ^~~~
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/ioctl_cfg80211.c: At top level:
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/ioctl_cfg80211.c:9626:26: error: initialization of ‘int (*)(struct wiphy *, struct net_device *, struct cfg80211_ap_update *)’ from incompatible pointer type ‘int (*)(struct wiphy *, struct net_device *, struct cfg80211_beacon_data *)’ [-Werror=incompatible-pointer-types]
 9626 |         .change_beacon = cfg80211_rtw_change_beacon,
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/ioctl_cfg80211.c:9626:26: note: (near initialization for ‘rtw_cfg80211_ops.change_beacon’)
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/hal/hal_mp.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/hal/hal_mcc.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/hal/hal_hci/hal_pci.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/hal/led/hal_led.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/hal/led/hal_pci_led.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/hal/rtl8821c/rtl8821c_halinit.o
  CC [M]  /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/hal/rtl8821c/rtl8821c_mac.o
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/ioctl_cfg80211.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/usr/lib/modules/6.7.1-arch1-1/build/Makefile:1911: /var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build] Error 2
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.7.1-arch1-1/build'
make: *** [Makefile:2244: modules] Error 2
nikelborm commented 10 months ago

This issue may be related: https://github.com/aircrack-ng/rtl8814au/issues/105 On the same kernel it has the same error

/var/lib/dkms/rtl8821ce/1.0.5.r166.gb5b8a5c/build/os_dep/linux/ioctl_cfg80211.c:9626:26: error: initialization of ‘int (*)(struct wiphy *, struct net_device *, struct cfg80211_ap_update *)’ from incompatible pointer type ‘int (*)(struct wiphy *, struct net_device *, struct cfg80211_beacon_data *)’ [-Werror=incompatible-pointer-types]
 9626 |         .change_beacon = cfg80211_rtw_change_beacon,
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
dubhater commented 10 months ago

Do you have the latest code? A pull request was merged a few days ago: https://github.com/tomaspinho/rtl8821ce/pull/339

dubhater commented 10 months ago

Looks like you have b5b8a5c, so not the latest code.

nikelborm commented 10 months ago

Seems like i have stale AUR version installed https://aur.archlinux.org/packages/rtl8821ce-dkms-git Thank you @dubhater