After installing an appropriate gcc package to match your running
kernel, the nvidia-kernel-source package can successfully create an
nvidia-kernel-$FOO package to match your system. nvidia-glx cannot
install without an appropriate nvidia-kernel package (which is what
module-assistant creates, using a C compiler and nvidia-kernel-source)
The package cleverly determines which compiler was used to create your
running kernel, and uses it automatically. Firstly, it runs some tests
to ensure that your system will work with the nvidia driver. One of the
first tests is to try and compile some trivial C with your kernel's
compiler - if it fails, then your system is incorrectly configured (it
must be configured to use the rivafb framebuffer driver). However, the
test doesn't check to ensure that its chosen compiler is actually on the
system - hence the failure and unrelated error message. See this antique
bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=319544