lwfinger / rtl8812au

GNU General Public License v2.0
58 stars 20 forks source link

make failed: cc1: error: code model kernel does not support PIC mode #8

Closed wheelcomplex closed 6 years ago

wheelcomplex commented 6 years ago

make failed in Ubuntu 18.04 with current code: https://github.com/lwfinger/rtl8812au/commit/84c178b64df793feb20540c6b42bd29c066706e2

Linux intelwifi 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

A previous fork is ok: https://github.com/wheelcomplex/rtl8812au-ubuntu-18.04

There are many changes between them.

make CROSS_COMPILE= -C /lib/modules/4.15.0-20-generic/build M=/home/david/home/wifi/rtl8812au  modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-20-generic'
  CC [M]  /home/david/home/wifi/rtl8812au/core/rtw_cmd.o
cc1: error: code model kernel does not support PIC mode
scripts/Makefile.build:332: recipe for target '/home/david/home/wifi/rtl8812au/core/rtw_cmd.o' failed
make[2]: *** [/home/david/home/wifi/rtl8812au/core/rtw_cmd.o] Error 1
Makefile:1552: recipe for target '_module_/home/david/home/wifi/rtl8812au' failed
make[1]: *** [_module_/home/david/home/wifi/rtl8812au] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-20-generic'
Makefile:238: recipe for target 'modules' failed
make: *** [modules] Error 2
lwfinger commented 6 years ago

That looks like a gcc error. Certainly, nothing that I have changed modifies the PIC mode.

If you disagree, do a git bisection. That will be easy.

wheelcomplex commented 6 years ago

Thanks for your reply. After I install some packages for samba compiling this issue is gone. I am not sure which package is the key one.

sachins301 commented 6 years ago

I have the same issue. how did you fix it?

lwfinger commented 6 years ago

Your kernel needs to be rebuilt. That is what I do.