Topic: nVidia kernel driver will not compile

Hi all,
   The kernel driver from Slakcbuilds.org for Slackware 14.2 will not compile.  I'm using "sbopkg" to build the package.
Absolute 64bit kernel version is 4.4.32  -- I've installed the kernel source.  Paul Sherman just published that is "exta" today.

   So this is what the compilter gives me:

(****************************************************************************
CONFTEST: drm_available
CONFTEST: nvidia_grid_build
CONFTEST: drm_atomic_available
  CC [M]  /tmp/SBo/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-frontend.o
/tmp/SBo/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-frontend.c:1:0: error: code model ‘kernel’ not supported in the 32 bit mode
/* _NVRM_COPYRIGHT_BEGIN_
^
scripts/Makefile.build:258: recipe for target '/tmp/SBo/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-frontend.o' failed
make[2]: *** [/tmp/SBo/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-frontend.o] Error 1
Makefile:1401: recipe for target '_module_/tmp/SBo/NVIDIA-Linux-x86_64-367.44/kernel' failed
make[1]: *** [_module_/tmp/SBo/NVIDIA-Linux-x86_64-367.44/kernel] Error 2
make[1]: Leaving directory '/usr/src/linux-4.4.32'
Makefile:81: recipe for target 'modules' failed
make: *** [modules] Error 2

nvidia-kernel:
Would you like to continue processing the rest of the
queue or would you like to abort?  If this failed
package is a dependency of another package in the queue
then it may not make sense to continue.

(Y)es to continue, (N)o to abort, (R)etry the build?:

*)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

Paul suggest I look for a solution here on the forum.  I tried a legacy version of the nVidai driver - but that gave another set of compile errors as well.

TNX

Re: nVidia kernel driver will not compile

Hi!

Maybe you could try a more recent version of the nvidia driver, to see if that works:

ftp://download.nvidia.com/XFree86/Linux … 375.39.run

Re: nVidia kernel driver will not compile

Hi

The nvidia driver on Slackbuilds.org is in version 375.39. (Have just checked it.)
In your build log i read " tmp/SBo/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-frontend.c:1:0: error: code model ‘kernel’ not supported in the 32 bit mode "
In nvidia-driver description from Slackbuilds.org there is a reference for 32 bit compatibility libraries.
Nvidia-kernel is a dependency and it should be installed first.

Re: nVidia kernel driver will not compile

Solved:
Either/Or : The kernel or  nVidia  is broken.  My solution --- edit the 4.4.32 kernel source and recompile the kernel.

Here is the one link that I could find that offered the solution -- and it worked for me:

http://www.linuxquestions.org/questions/slackware-14/nvidia-won't-build-kernel-4-4-38-32bit-4175596893/

Here is the meat of the solution copied from the article:

(************************************************************
you need to add

EXPORT_SYMBOL(mtrr_add);
and
EXPORT_SYMBOL(mtrr_del);

to the main.c file
in
source /arch/x86/kernel/cpu/mtrr

the old legacy nvidia driver looks for these symbols. (I put them after the functions)

Dave
*************************************************************)
My problems in compiling the kernel:

From the Absolute install disk -- use the kernel configuration file
to configure the kernel.  No changes needed.  That will build just about every module under the sun.

/AbsoluteInstall/kernels/huge.s/config

If you build the kernel based on the stock running kernel config ... you will get not many modules ... network, sound and many things will break ...

I'm using a legacy nVidia pair of packages from Slackbuilds.org.  The newest nVidia version will build as well.

Problems left:  My screen resolution is now way to small to read in many cases.  Still need to find a solution here.  That's all the problems I can find for right now.


Have a great day!

Re: nVidia kernel driver will not compile

How do you mark a post: [Solved]  ?????