Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 642320

Summary: x11-drivers/nvidia-drivers-384.98 build failures with sys-kernel/*-sources-4.14 branch
Product: Gentoo Linux Reporter: kuzetsa CatSwarm (kuza for short) <kuzetsa>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal CC: jasmin+gentoo, jstein, tsmksubc
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=638868
https://bugs.gentoo.org/show_bug.cgi?id=643228
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: 384.98-environment.xz
x11-drivers:nvidia-drivers-384.98.log.xz
emerge -pqv '=sys-kernel/gentoo-sources-4.14.9::gentoo'
emerge -pqv '=x11-drivers/nvidia-drivers-384.98::gentoo'
emerge --info '=x11-drivers/nvidia-drivers-384.98::gentoo'
[after_patch] /var/tmp/portage/x11-drivers/nvidia-drivers-384.98/temp/build.log
[patch] header fix for build issue on kernel version 4.14.9

Description kuzetsa CatSwarm (kuza for short) 2017-12-26 14:03:53 UTC
Created attachment 511646 [details]
384.98-environment.xz

./arch/x86/include/asm/processor.h:826:39: error: implicit declaration of function ‘task_stack_page’ [-Werror=implicit-function-declaration]


v4.14.9 {bad}
[ ~ bisect test says "bad" ~ ]
25e2999e630c744c27c9179d1279c7f9d503385e
[ ~ multi-commit rewrite / refactor ~ ]
f576136bc88175014ef3f57378d0d982a5c4e786
[ ~ bisect test says "good" ~ ]
v4.14.8 {good}
Comment 1 kuzetsa CatSwarm (kuza for short) 2017-12-26 14:04:51 UTC
Created attachment 511648 [details]
x11-drivers:nvidia-drivers-384.98.log.xz
Comment 2 kuzetsa CatSwarm (kuza for short) 2017-12-26 14:06:24 UTC
Created attachment 511650 [details]
emerge -pqv '=sys-kernel/gentoo-sources-4.14.9::gentoo'
Comment 3 kuzetsa CatSwarm (kuza for short) 2017-12-26 14:07:23 UTC
Created attachment 511652 [details]
emerge -pqv '=x11-drivers/nvidia-drivers-384.98::gentoo'
Comment 4 kuzetsa CatSwarm (kuza for short) 2017-12-26 14:08:53 UTC
Created attachment 511654 [details]
emerge --info '=x11-drivers/nvidia-drivers-384.98::gentoo'
Comment 5 kuzetsa CatSwarm (kuza for short) 2017-12-26 14:12:30 UTC
(In reply to kuzetsa from comment #0)
> v4.14.9 {bad}
> [ ~ bisect test says "bad" ~ ]
> 25e2999e630c744c27c9179d1279c7f9d503385e
> [ ~ multi-commit rewrite / refactor ~ ]
> f576136bc88175014ef3f57378d0d982a5c4e786
> [ ~ bisect test says "good" ~ ]
> v4.14.8 {good}


^ regression caused by upstream (kernel.org) change

hashes are upstream (git-style) commit refs,  
v4.14.8, and v4.14.9 are tags
Comment 6 kuzetsa CatSwarm (kuza for short) 2017-12-27 17:02:38 UTC
someone on the nVidia side (user?) confirmed this issue on 4.14.9 kernels:

https://devtalk.nvidia.com/default/topic/1028016/linux/patch-for-compiling-v384-98-modules-with-linux-v4-14-9-/post/5228999/#5228999

official patch has not been released by upstream
(nvidia of kernel.org) to address this change.

as the nvidia.com forum thread suggests, detecting kernel version and conditionally adding the new include (linux/sched/task_stack.h) may be a usable fix. possibly added in the same way as here:

> if use kernel_linux && kernel_is ge 4 15; then

^ line from:

/usr/portage/x11-drivers/nvidia-drivers/nvidia-drivers-384.98.ebuild
Comment 7 kuzetsa CatSwarm (kuza for short) 2017-12-27 17:46:24 UTC
Created attachment 511770 [details]
[after_patch] /var/tmp/portage/x11-drivers/nvidia-drivers-384.98/temp/build.log

updated build.log (non-failing)

as-per nVidia testing, workaround is to update the following:

> /kernel/nvidia-uvm/uvm8_va_block.c

with the change from 4.14.9 (kernel.org) minor bump:

> linux/sched/task_stack.h

(attached build.log)
Comment 8 kuzetsa CatSwarm (kuza for short) 2017-12-27 17:50:11 UTC
Created attachment 511772 [details, diff]
[patch] header fix for build issue on kernel version 4.14.9

this patch has been tested, as-per:

(In reply to kuzetsa from comment #7)
> /var/tmp/portage/x11-drivers/nvidia-drivers-384.98/temp/build.log


[...]

using EAPI-6, tested by placing patch in directory:

> /etc/portage/patches/x11-drivers/nvidia-drivers-384.98/
Comment 9 kuzetsa CatSwarm (kuza for short) 2018-01-03 13:49:02 UTC
(In reply to kuzetsa from comment #6)
> if use kernel_linux && kernel_is ge 4 15; then
> 
> ^ line from:
> 
> /usr/portage/x11-drivers/nvidia-drivers/nvidia-drivers-384.98.ebuild

sys-kernel/gentoo-sources-4.14.9 is now masked, however:

the newly required header is still an issue, additionally:

PAGE_TABLE_ISOLATION causes issues with 4.14.11, if enabled
(build failure due to new GPL-only symbols)

FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only 
symbol 'cpu_tlbstate' ...

nvidia_drivers_versions_check() might need rolled back from:

ewarn "<sys-kernel/gentoo-sources-4.15"
ewarn "<sys-kernel/vanilla-sources-4.15"

to the older:

ewarn "<sys-kernel/gentoo-sources-4.14"
ewarn "<sys-kernel/vanilla-sources-4.14"

upstream has been making several security-related changes which break nvidia drivers packages.
Comment 10 Jonas Stein gentoo-dev 2018-01-03 21:24:27 UTC

*** This bug has been marked as a duplicate of bug 642262 ***