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

Build error: redefinition of ‘struct sha256_state’ (kernel 5.8.2) #73

Closed
LevitatingBusinessMan opened this issue Aug 19, 2020 · 3 comments

Comments

@LevitatingBusinessMan
Copy link

LevitatingBusinessMan commented Aug 19, 2020

make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.8.2-050802-generic/build M=/home/rein/rtl8188eus  modules
make[1]: Entering directory '/usr/src/linux-headers-5.8.2-050802-generic'
  CC [M]  /home/rein/rtl8188eus/core/rtw_cmd.o
In file included from /home/rein/rtl8188eus/include/drv_types.h:77,
                 from /home/rein/rtl8188eus/core/rtw_cmd.c:17:
/home/rein/rtl8188eus/include/rtw_security.h:252:8: error: redefinition of ‘struct sha256_state’
  252 | struct sha256_state {
      |        ^~~~~~~~~~~~
In file included from ./include/linux/filter.h:23,
                 from ./include/net/sock.h:59,
                 from ./include/linux/tcp.h:19,
                 from ./include/linux/ipv6.h:88,
                 from ./include/net/addrconf.h:50,
                 from /home/rein/rtl8188eus/include/osdep_service_linux.h:48,
                 from /home/rein/rtl8188eus/include/osdep_service.h:50,
                 from /home/rein/rtl8188eus/include/drv_types.h:26,
                 from /home/rein/rtl8188eus/core/rtw_cmd.c:17:
./include/crypto/sha.h:84:8: note: originally defined here
   84 | struct sha256_state {
      |        ^~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:281: /home/rein/rtl8188eus/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:1756: /home/rein/rtl8188eus] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.8.2-050802-generic'
make: *** [Makefile:2059: modules] Error 2

uname -a: Linux pop-os 5.8.2-050802-generic #202008190732 SMP Wed Aug 19 07:35:42 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I will add that that line has been there for 11 years

Edit: I renamed that struct and now I am getting:

/home/rein/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:9435:3: error: ‘struct cfg80211_ops’ has no member named ‘mgmt_frame_register’
 9435 |  .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
      |   ^~~~~~~~~~~~~~~~~~~
/home/rein/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:9435:25: error: initialization of ‘int (*)(struct wiphy *, struct wireless_dev *, u64)’ {aka ‘int (*)(struct wiphy *, struct wireless_dev *, long long unsigned int)’} from incompatible pointer type ‘void (*)(struct wiphy *, struct wireless_dev *, u16,  bool)’ {aka ‘void (*)(struct wiphy *, struct wireless_dev *, short unsigned int,  _Bool)’} [-Werror=incompatible-pointer-types]
 9435 |  .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/rein/rtl8188eus/os_dep/linux/ioctl_cfg80211.c:9435:25: note: (near initialization for ‘rtw_cfg80211_ops.mgmt_tx_cancel_wait’)

@SmartBoy84
Copy link
Contributor

I am also having the same problem when building the kernel.
Using the 5.8.1-surface linux kernel
https://github.com/linux-surface/linux-surface

@SmartBoy84
Copy link
Contributor

I was able to resolve this issue and have sent a pull request but until it is approved you can use my fork:
https://github.com/SmartBoy84/rtl8188eus

@kimocoder
Copy link
Collaborator

Problem should be resolved

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

3 participants