lwfinger / rtl8723du

89 stars 43 forks source link

ERROR: "__stack_chk_guard" #6

Closed jfdesignnet closed 3 years ago

jfdesignnet commented 3 years ago

Hello, I'm trying to compile this 8723du.ko module on sebanc brunch chromeos build using chromebrew, but it throws error about "stack_chk_guard" :

chronos@localhost /home/user/c0fb6532976981f2f5630f6b64affa2626b1ea70/Downloads/rtl8723du $ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.4.88-brunch-sebanc/build M=/home/user/c0fb6532976981f2f5630f6b64affa2626b1ea70/Downloads/rtl8723du  modules
make[1]: Entering directory '/lib/modules/5.4.88-brunch-sebanc/build'
  CC [M]  /home/user/c0fb6532976981f2f5630f6b64affa2626b1ea70/Downloads/rtl8723du/core/rtw_cmd.o
  CC [M]  /home/user/c0fb6532976981f2f5630f6b64affa2626b1ea70/Downloads/rtl8723du/core/rtw_security.o
...
...
  CC [M]  /home/user/c0fb6532976981f2f5630f6b64affa2626b1ea70/Downloads/rtl8723du/hal/halbtc8723d2ant.o
  CC [M]  /home/user/c0fb6532976981f2f5630f6b64affa2626b1ea70/Downloads/rtl8723du/platform/platform_ops.o
  LD [M]  /home/user/c0fb6532976981f2f5630f6b64affa2626b1ea70/Downloads/rtl8723du/8723du.o
  Building modules, stage 2.
  MODPOST 1 modules
ERROR: "__stack_chk_guard" [/home/user/c0fb6532976981f2f5630f6b64affa2626b1ea70/Downloads/rtl8723du/8723du.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
make[1]: *** [Makefile:1654: modules] Error 2
make[1]: Leaving directory '/lib/modules/5.4.88-brunch-sebanc/build'
make: *** [Makefile:196: modules] Error 2
chronos@localhost /home/user/c0fb6532976981f2f5630f6b64affa2626b1ea70/Downloads/rtl8723du $

According to some of my friend, this is because of the gcc10 that chromebrew use and suggest to add "-fstack-protector-all" on Makefile, but unfortunately I don't know how or where I have to put that cflag. Can someone help me, where I have to put this cflag on Makefile please ? I tried with EXTRA_CFLAGS += -fstack-protector-all on the beginning of Makefile but it throws the same error.

With the same hardware but on ubuntu, this rtl8723du driver was compiled and runs very good without a problem.

Thank you very much in advance, and really appreciate this repo.

jfdesignnet commented 3 years ago

nevermind, solved it.