Rootserver Sponsor

webtropia"

Donations

Please support your operating system's further development:

donate"

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
Ilinsekt
14 Post subject: nvidia module fails to build with recent aptosid kernels  PostPosted: 29.12.2018, 22:39



Joined: 2010-10-29
Posts: 46

Hi all,

with recent aptosid kernels (starting around 4.18, if I remember correctly) the nvidia kernel module fails to build. As far as I can tell, this is caused by the SUBLEVEL variable being empty in the aptosid kernel makefile. nvidia's Kbuild requires it to be set:
      Code:

KERNEL_VERSION_NUMERIC := $(shell echo $$(( $(VERSION) * 65536 + $(PATCHLEVEL) * 256 + $(SUBLEVEL) )))


I am getting the following error in the module build log:
      Code:

/bin/sh: 1: arithmetic expression: expecting primary: " 4 * 65536 + 19 * 256 +  "
/bin/sh: 1: [: -ge: unexpected operator


This failure in turn causes the nvidia_unsupported.c file being included in the module build, which depends on some old header files and causes the build to fail.

Cheers, Ilinsekt
 
 View user's profile Send private message  
Reply with quote Back to top
slhOffline
Post subject: RE: nvidia module fails to build with recent aptosid kernels  PostPosted: 30.12.2018, 06:16



Joined: 2010-08-25
Posts: 962

Status: Offline
SUBLEVEL has been unset in our kernels since kernel 3.0, released in august 2011. There was some time (very early on, for probably 2-3 months, maybe half a year) when this caused havoc, but there is no excuse for any out-of-tree kernel module to fall over this in (almost) 2019, with kernel 5.0 being close.
 
 View user's profile Send private message  
Reply with quote Back to top
Ilinsekt
Post subject: RE: nvidia module fails to build with recent aptosid kernels  PostPosted: 30.12.2018, 10:18



Joined: 2010-10-29
Posts: 46

Well, editing /usr/src/linux-headers-4.19.0-6.slh.1-aptosid-amd64/Makefile and setting SUBLEVEL to 0 makes the module build. I have no idea why the error is only showing up now. As far as I can tell the offending function (the build trips up at "implicit function declaration of copy_from_user") has been in linux/uaccess.h (instead of asm/uaccess.h, which uvm_unsupported.c includes) already in 4.17.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio