After updating my Debian (testing) system via apt-get a few days ago, I was unable to compile/install Nvidia's proprietary driver from nvidia.com. The relevant error message seemed to be "kernel does not support PIC mode".
After much fumbling about, I finally got it to compile via the following:
Code:
$ export KCPPFLAGS="-fno-pie -Wno-pointer-sign -fno-stack-protector -mfentry"
$ export CPPFLAGS="$KCPPFLAGS"
$ sh NVIDIA-Linux-x86_64-367.57.run
I'm not sure if the
Code:
export CPPFLAGS="$KCPPFLAGS"
line is necessary or not.
Hopefully this post will save someone the time/frustration that it took me to get it sorted.