brektrou / rtl8821CU

Realtek RTL8811CU/RTL8821CU USB Wi-Fi adapter driver for Linux
GNU General Public License v2.0
1.59k stars 460 forks source link

DKMS install error on Kali Linux #53

Closed njaksch closed 4 years ago

njaksch commented 4 years ago
kali@kali:~$ git clone https://github.com/brektrou/rtl8821CU
Cloning into 'rtl8821CU'...
remote: Enumerating objects: 63, done.
remote: Counting objects: 100% (63/63), done.
remote: Compressing objects: 100% (62/62), done.
remote: Total 1403 (delta 23), reused 9 (delta 1), pack-reused 1340
Receiving objects: 100% (1403/1403), 5.57 MiB | 5.07 MiB/s, done.
Resolving deltas: 100% (796/796), done.
kali@kali:~$ cd rtl8821CU/
kali@kali:~/rtl8821CU$ sudo ./dkms-install.sh 
About to run dkms install steps...

Creating symlink /var/lib/dkms/rtl8821CU/5.4.1/source ->
                 /usr/src/rtl8821CU-5.4.1

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
'make' KVER=5.5.0-kali1-amd64....(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.5.0-kali1-amd64 (x86_64)
Consult /var/lib/dkms/rtl8821CU/5.4.1/build/make.log for more information.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
'make' KVER=5.5.0-kali1-amd64....(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.5.0-kali1-amd64 (x86_64)
Consult /var/lib/dkms/rtl8821CU/5.4.1/build/make.log for more information.
Finished running dkms install steps.

EDIT: dkms status:

kali@kali:~/rtl8821CU$ sudo dkms status
rtl8821CU, 5.4.1: added                                                                                                                                                                                                                    
virtualbox-guest, 6.1.6, 5.4.0-kali4-amd64, x86_64: installed
virtualbox-guest, 6.1.6, 5.5.0-kali1-amd64, x86_64: installed

make output:

kali@kali:~/rtl8821CU$ make
/bin/sh: 1: bc: not found
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.5.0-kali1-amd64/build M=/home/kali/rtl8821CU  modules
make[1]: Entering directory '/usr/src/linux-headers-5.5.0-kali1-amd64'
/bin/sh: 1: bc: not found
  CC [M]  /home/kali/rtl8821CU/core/rtw_debug.o
In file included from /home/kali/rtl8821CU/include/drv_types.h:30,
                 from /home/kali/rtl8821CU/core/rtw_debug.c:17:
/home/kali/rtl8821CU/include/wifi.h:1032: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
 1032 | #define IEEE80211_MAX_AMPDU_BUF 0x40
      | 
In file included from /home/kali/rtl8821CU/include/osdep_service_linux.h:83,
                 from /home/kali/rtl8821CU/include/osdep_service.h:50,
                 from /home/kali/rtl8821CU/include/drv_types.h:27,
                 from /home/kali/rtl8821CU/core/rtw_debug.c:17:
/usr/src/linux-headers-5.5.0-kali1-common/include/linux/ieee80211.h:1451: note: this is the location of the previous definition
 1451 | #define IEEE80211_MAX_AMPDU_BUF  0x100
      | 
/home/kali/rtl8821CU/core/rtw_debug.c: In function ‘dump_drv_version’:
/home/kali/rtl8821CU/core/rtw_debug.c:45:62: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
   45 |  RTW_PRINT_SEL(sel, "build time: %s %s\n", __DATE__, __TIME__);
      |                                                              ^
In file included from /home/kali/rtl8821CU/include/drv_types.h:60,
                 from /home/kali/rtl8821CU/core/rtw_debug.c:17:
/home/kali/rtl8821CU/core/rtw_debug.c:45:44: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
   45 |  RTW_PRINT_SEL(sel, "build time: %s %s\n", __DATE__, __TIME__);
      |                                            ^~~~~~~~
/home/kali/rtl8821CU/include/rtw_debug.h:114:34: note: in definition of macro ‘RTW_PRINT’
  114 |    _dbgdump(DRIVER_PREFIX fmt, ##arg);\
      |                                  ^~~
/home/kali/rtl8821CU/core/rtw_debug.c:45:2: note: in expansion of macro ‘RTW_PRINT_SEL’
   45 |  RTW_PRINT_SEL(sel, "build time: %s %s\n", __DATE__, __TIME__);
      |  ^~~~~~~~~~~~~
/home/kali/rtl8821CU/core/rtw_debug.c:45:54: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
   45 |  RTW_PRINT_SEL(sel, "build time: %s %s\n", __DATE__, __TIME__);
      |                                                      ^~~~~~~~
/home/kali/rtl8821CU/include/rtw_debug.h:114:34: note: in definition of macro ‘RTW_PRINT’
  114 |    _dbgdump(DRIVER_PREFIX fmt, ##arg);\
      |                                  ^~~
/home/kali/rtl8821CU/core/rtw_debug.c:45:2: note: in expansion of macro ‘RTW_PRINT_SEL’
   45 |  RTW_PRINT_SEL(sel, "build time: %s %s\n", __DATE__, __TIME__);
      |  ^~~~~~~~~~~~~
/home/kali/rtl8821CU/core/rtw_debug.c:45:44: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
   45 |  RTW_PRINT_SEL(sel, "build time: %s %s\n", __DATE__, __TIME__);
      |                                            ^~~~~~~~
/home/kali/rtl8821CU/include/rtw_debug.h:224:25: note: in definition of macro ‘RTW_PRINT_SEL’
  224 |    _seqdump(sel, fmt, ##arg) /*rtw_warn_on(1)*/; \
      |                         ^~~
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-5.5.0-kali1-common/scripts/Makefile.build:271: /home/kali/rtl8821CU/core/rtw_debug.o] Error 1
make[2]: *** [/usr/src/linux-headers-5.5.0-kali1-common/Makefile:1707: /home/kali/rtl8821CU] Error 2
make[1]: *** [/usr/src/linux-headers-5.5.0-kali1-common/Makefile:179: sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.5.0-kali1-amd64'
make: *** [Makefile:2213: modules] Error 2
sabirovrinat85 commented 4 years ago

You don't need to do "make" as dkms-install will suffice And "bc: not found" states clearly what is missing also...

njaksch commented 4 years ago

You don't need to do "make" as dkms-install will suffice

I wanted to show the outcome of the second method obviously

And "bc: not found" states clearly what is missing also...

Unfortunately i did not know that this package is required. Note in readme would be good for timesaving

SatanicRaw commented 4 years ago

Unfortunately i did not know that this package is required. Note in readme would be good for timesaving

If you use Kali Linux, this should not be a problem for you, an error with bc affects only users of this distribution.

njaksch commented 4 years ago

If you use Kali Linux, this should not be a problem for you, an error with bc affects only users of this distribution.

Seems like it is