Problem building source code

Hi, I’m a newbie attempting to compile drivers for my wireless reciever on Manjaro. I tried installing some packages to help me build installs, but I don’t think I did it right. I was wondering if I’m missing any packages that are keeping me from building this code. Thanks!

[brendon@epic ~]$ cd

/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/
[brendon@epic rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777]$ sudo make
[sudo] password for brendon: 
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.13.4-1-MANJARO/build M=/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777  modules
make[1]: Entering directory '/usr/lib/modules/5.13.4-1-MANJARO/build'
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_cmd.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_security.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_debug.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_io.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_ioctl_query.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_ioctl_set.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_ieee80211.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_mlme.o
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_mlme.c: In function ‘rtw_drv_scan_by_self’:
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_mlme.c:3455:17: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
 3455 |                 else
      |                 ^~~~
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_mlme.c:3458:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’
 3458 |                         goto exit;
      |                         ^~~~
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_mlme_ext.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_mi.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_wlan_util.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_vht.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_pwrctrl.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_rf.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_chplan.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_recv.o
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_recv.c: In function ‘validate_mp_recv_frame’:
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_recv.c:3575:25: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
 3575 |                         for (i = 0; i < precv_frame->u.hdr.len; i = i + 8)
      |                         ^~~
In file included from /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/include/drv_types.h:60,
                 from /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_recv.c:17:
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/include/rtw_debug.h:165:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
  165 |         do {\
      |         ^~
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_recv.c:3578:33: note: in expansion of macro ‘RTW_INFO’
 3578 |                                 RTW_INFO("#############################\n");
      |                                 ^~~~~~~~
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_sta_mgt.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_ap.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/mesh/rtw_mesh.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/mesh/rtw_mesh_pathtbl.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/mesh/rtw_mesh_hwmp.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_xmit.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_p2p.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_rson.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_tdls.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_br_ext.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_iol.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_sreset.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_btcoex_wifionly.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_btcoex.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_beamforming.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_odm.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_rm.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_rm_fsm.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/rtw_rm_util.o
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/efuse/rtw_efuse.o
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/efuse/rtw_efuse.c: In function ‘rtw_efuse_analyze’:
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/efuse/rtw_efuse.c:905:17: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  905 |                 if (i % 16 == 0)
      |                 ^~
In file included from /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/include/drv_types.h:60,
                 from /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/efuse/rtw_efuse.c:17:
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/include/rtw_debug.h:261:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  261 |         do {\
      |         ^~
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/core/efuse/rtw_efuse.c:907:25: note: in expansion of macro ‘_RTW_PRINT_SEL’
  907 |                         _RTW_PRINT_SEL(RTW_DBGDUMP, "%02X%s"
      |                         ^~~~~~~~~~~~~~
  CC [M]  /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/os_dep/osdep_service.o
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/os_dep/osdep_service.c: In function ‘isFileReadable’:
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/os_dep/osdep_service.c:2231:25: error: implicit declaration of function ‘get_fs’; did you mean ‘get_sa’? [-Werror=implicit-function-declaration]
 2231 |                 oldfs = get_fs();
      |                         ^~~~~~
      |                         get_sa
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/os_dep/osdep_service.c:2231:25: error: incompatible types when assigning to type ‘mm_segment_t’ from type ‘int’
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/os_dep/osdep_service.c:2233:17: error: implicit declaration of function ‘set_fs’; did you mean ‘sget_fc’? [-Werror=implicit-function-declaration]
 2233 |                 set_fs(KERNEL_DS);
      |                 ^~~~~~
      |                 sget_fc
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/os_dep/osdep_service.c:2233:24: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’?
 2233 |                 set_fs(KERNEL_DS);
      |                        ^~~~~~~~~
      |                        KERNFS_NS
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/os_dep/osdep_service.c:2233:24: note: each undeclared identifier is reported only once for each function it appears in
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/os_dep/osdep_service.c: In function ‘retriveFromFile’:
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/os_dep/osdep_service.c:2273:33: error: incompatible types when assigning to type ‘mm_segment_t’ from type ‘int’
 2273 |                         oldfs = get_fs();
      |                                 ^~~~~~
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/os_dep/osdep_service.c:2275:32: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’?
 2275 |                         set_fs(KERNEL_DS);
      |                                ^~~~~~~~~
      |                                KERNFS_NS
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/os_dep/osdep_service.c: In function ‘storeToFile’:
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/os_dep/osdep_service.c:2312:33: error: incompatible types when assigning to type ‘mm_segment_t’ from type ‘int’
 2312 |                         oldfs = get_fs();
      |                                 ^~~~~~
/home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/os_dep/osdep_service.c:2314:32: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’?
 2314 |                         set_fs(KERNEL_DS);
      |                                ^~~~~~~~~
      |                                KERNFS_NS
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:273: /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777/os_dep/osdep_service.o] Error 1
make[1]: *** [Makefile:1852: /home/brendon/Downloads/rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.13.4-1-MANJARO/build'
make: *** [Makefile:2373: modules] Error 2
[brendon@epic rtl88x2BU_WiFi_linux_v5.8.7.4_37264.20200922_COEX20191120-7777]$

Hi,
There is an AUR package for it, no need to compile from source AUR (en) - rtl88x2bu-dkms-git
First you need the linux headers for your running kernels. The next command will install them:

sudo pacman -S $(pacman -Qsq "^linux" | grep "^linux[0-9]*[-rt]*$" | awk '{print $1"-headers"}' ORS=' ')

next you build and install the package
pamac build rtl88x2bu-dkms-git

3 Likes

Please follow @anon89812132 's excellent advice, and then read this:

:crossed_fingers:

Thank you very much, I followed your instructions and it worked. I appreciate your help immensely

1 Like

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