Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to compile on 5.0.0* #21

Closed
nolsen42 opened this issue Jan 19, 2019 · 8 comments
Closed

Fail to compile on 5.0.0* #21

nolsen42 opened this issue Jan 19, 2019 · 8 comments

Comments

@nolsen42
Copy link

/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/wifi.h:1019: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
 #define IEEE80211_MAX_AMPDU_BUF 0x40
 
In file included from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/osdep_service_linux.h:86,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/osdep_service.h:48,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/drv_types.h:32,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/recv_linux.c:22:
./include/linux/ieee80211.h:1444: note: this is the location of the previous definition
 #define IEEE80211_MAX_AMPDU_BUF  0x100
 
  CC [M]  /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/wifi_regd.o
In file included from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/drv_types.h:35,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_cfg80211.c:22:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/wifi.h:1019: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
 #define IEEE80211_MAX_AMPDU_BUF 0x40
 
In file included from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/osdep_service_linux.h:86,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/osdep_service.h:48,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/drv_types.h:32,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_cfg80211.c:22:
./include/linux/ieee80211.h:1444: note: this is the location of the previous definition
 #define IEEE80211_MAX_AMPDU_BUF  0x100
 
In file included from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/drv_types.h:35,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/rtw_cfgvendor.c:21:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/wifi.h:1019: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
 #define IEEE80211_MAX_AMPDU_BUF 0x40
 
In file included from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/osdep_service_linux.h:86,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/osdep_service.h:48,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/drv_types.h:32,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/rtw_cfgvendor.c:21:
./include/linux/ieee80211.h:1444: note: this is the location of the previous definition
 #define IEEE80211_MAX_AMPDU_BUF  0x100
 
In file included from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/drv_types.h:35,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/wifi_regd.c:7:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/wifi.h:1019: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
 #define IEEE80211_MAX_AMPDU_BUF 0x40
 
In file included from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/osdep_service_linux.h:86,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/osdep_service.h:48,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/drv_types.h:32,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/wifi_regd.c:7:
./include/linux/ieee80211.h:1444: note: this is the location of the previous definition
 #define IEEE80211_MAX_AMPDU_BUF  0x100
 
  CC [M]  /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/rtw_android.o
  CC [M]  /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/rtw_proc.o
  CC [M]  /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.o
In file included from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/drv_types.h:35,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/rtw_android.c:25:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/wifi.h:1019: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
 #define IEEE80211_MAX_AMPDU_BUF 0x40
 
In file included from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/osdep_service_linux.h:86,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/osdep_service.h:48,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/drv_types.h:32,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/rtw_android.c:25:
./include/linux/ieee80211.h:1444: note: this is the location of the previous definition
 #define IEEE80211_MAX_AMPDU_BUF  0x100
 
In file included from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/drv_types.h:35,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/rtw_proc.c:22:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/wifi.h:1019: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
 #define IEEE80211_MAX_AMPDU_BUF 0x40
 
In file included from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/osdep_service_linux.h:86,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/osdep_service.h:48,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/drv_types.h:32,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/rtw_proc.c:22:
./include/linux/ieee80211.h:1444: note: this is the location of the previous definition
 #define IEEE80211_MAX_AMPDU_BUF  0x100
 
  CC [M]  /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/hal/hal_intf.o
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/rtw_android.c: In function ‘rtw_android_priv_cmd’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/rtw_android.c:629:62: error: macro "access_ok" passed 3 arguments, but takes just 2
  if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)) {
                                                              ^
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/rtw_android.c:629:7: error: ‘access_ok’ undeclared (first use in this function)
  if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)) {
       ^~~~~~~~~
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/rtw_android.c:629:7: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [scripts/Makefile.build:277: /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/rtw_android.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/drv_types.h:35,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:22:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/wifi.h:1019: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
 #define IEEE80211_MAX_AMPDU_BUF 0x40
 
In file included from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/osdep_service_linux.h:86,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/osdep_service.h:48,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/drv_types.h:32,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:22:
./include/linux/ieee80211.h:1444: note: this is the location of the previous definition
 #define IEEE80211_MAX_AMPDU_BUF  0x100
 
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_write_reg’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:51:2: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
  char input[wrqu->length];
  ^~~~
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_read_reg’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:133:2: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
  char input[wrqu->length];
  ^~~~
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_write_rf’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:265:2: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
  char input[wrqu->length];
  ^~~~
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_read_rf’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:307:2: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
  char input[wrqu->length];
  ^~~~
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_rate’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:415:2: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
  u8  input[wrqu->length];
  ^~
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_channel’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:463:2: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
  u8  input[wrqu->length];
  ^~
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_bandwidth’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:491:2: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
  u8  input[wrqu->length];
  ^~
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_txpower_index’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:524:2: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
  char input[wrqu->length];
  ^~~~
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_txpower’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:549:2: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
  u8  input[wrqu->length];
  ^~
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_ant_tx’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:587:2: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
  u8  input[wrqu->length];
  ^~
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_ant_rx’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:633:2: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
  u8  input[wrqu->length];
  ^~
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_disable_bt_coexist’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:809:2: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
  u8 input[wrqu->data.length];
  ^~
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_arx’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:843:2: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
  u8  input[wrqu->length];
  ^~
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_pwrtrk’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:1022:2: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
  u8  input[wrqu->length];
  ^~
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_psd’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:1060:2: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
  u8  input[wrqu->length];
  ^~
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_dump’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:1173:2: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
  u8  input[wrqu->length];
  ^~
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_phypara’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:1199:2: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
  char input[wrqu->length];
  ^~~~
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_SetRFPath’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:1225:2: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
  char input[wrqu->length];
  ^~~~
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_QueryDrv’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:1264:2: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
  char input[wrqu->data.length];
  ^~~~
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_PwrCtlDM’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:1293:2: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
  u8  input[wrqu->length];
  ^~
In file included from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/drv_types.h:35,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/hal/hal_intf.c:23:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/wifi.h:1019: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
 #define IEEE80211_MAX_AMPDU_BUF 0x40
 
In file included from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/osdep_service_linux.h:86,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/osdep_service.h:48,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/include/drv_types.h:32,
                 from /var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/hal/hal_intf.c:23:
./include/linux/ieee80211.h:1444: note: this is the location of the previous definition
 #define IEEE80211_MAX_AMPDU_BUF  0x100
 
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c: In function ‘rtw_mp_hwtx’:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/ioctl_mp.c:1935:2: warning: ISO C90 forbids variable length array ‘input’ [-Wvla]
  u8  input[wrqu->data.length];
  ^~
make[1]: *** [Makefile:1553: _module_/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.0.0-050000rc2-generic'
make: *** [Makefile:1902: modules] Error 2
@towo2099
Copy link

you haven't show the real error!
It would be:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/rtw_android.c:629:62: error: macro "access_ok" passed 3 arguments, but takes just 2
For a fast fix, change
if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len))
to
if (!access_ok(priv_cmd.buf, priv_cmd.total_len))
in build/os_dep/linux/rtw_android.

It is working fine with 5.0-rc3

@nolsen42
Copy link
Author

rtw_android? Isn't that for only android?

@towo2099
Copy link

It was the error on compile time, after the change, it has compiled fine against 5.0-rc3 and is working like a charm.

@tomaspinho
Copy link
Owner

@towo2099 thanks for the patch. I will apply it as soon as 5.0.0 gets a stable release on Ubuntu. Keeping this open in the meantime.

@harryyoud
Copy link
Contributor

Made a patch that retains compatibility with both kernels because I have both on my system and I wasn't sure how to have different dkms modules per kernel version (not even sure it is possible)

@tomaspinho
Copy link
Owner

@harryyoud you made the right choice, that's how I've been updating this. Thank you so much again!

@ghost
Copy link

ghost commented Mar 6, 2019

you haven't show the real error!
It would be:
/var/lib/dkms/rtl8821ce/v5.2.5_1.26055.20180108/build/os_dep/linux/rtw_android.c:629:62: error: macro "access_ok" passed 3 arguments, but takes just 2
For a fast fix, change
if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len))
to
if (!access_ok(priv_cmd.buf, priv_cmd.total_len))
in build/os_dep/linux/rtw_android.

It is working fine with 5.0-rc3

Updated to 5.0 and there was the same problem. After change it in (629:24) ./rtl8821ce/os_dep/linux/rtw_android.c - fixed.

@tomaspinho
Copy link
Owner

Fix merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants