Summary: | x11-drivers/nvidia-drivers-{390.116-r2410.104-r2,415.27-r2} with kernel 5.1.0 - In file included from .../work/kernel/nvidia/nv-instance.c:13: .../work/kernel/common/inc/nv-list-helpers.h:94:19: error: redefinition of ‘list_is_first’ | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Nikolay Kichukov <hjckr> |
Component: | Current packages | Assignee: | Jeroen Roovers (RETIRED) <jer> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | email200202 |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
suggested patch that allows the driver to compile
The patch work with Kernel 5.1 patch for nvidia drivers 390.116-r2, kernel 5.1 build.log (kernel 5.2.0) patch for kernel 5.2 Another patch for kernel 5.2 |
Description
Nikolay Kichukov
2019-05-08 10:04:50 UTC
Created attachment 575514 [details, diff]
suggested patch that allows the driver to compile
if use kernel_linux && kernel_is ge 5 1; then ewarn "Gentoo supports kernels which are supported by NVIDIA" ewarn "which are limited to the following kernels:" ewarn "<sys-kernel/gentoo-sources-5.1" ewarn "<sys-kernel/vanilla-sources-5.1" ewarn "" ewarn "You are free to utilize epatch_user to provide whatever" ewarn "support you feel is appropriate, but will not receive" ewarn "support as a result of those changes." ewarn "" ewarn "Do not file a bug report about this." ewarn "" fi You have been warned. Created attachment 575582 [details, diff] The patch work with Kernel 5.1 Source: http://rglinuxtech.com/?p=2530 Hi Jeroen, I did not pay attention to the warnings, sorry. You can close this bug now. Cheers, -N (In reply to Nikolay Kichukov from comment #4) > I did not pay attention to the warnings, sorry. No problem. > You can close this bug now. It has become a tradition to keep bugs like this one open until the problem is fixed upstream, because: 1) people tend to completely ignore the warnings, particularly the bit that says "Do not file a bug report about this." 2) insofar as the warnings are actually heeded, and as they point out that there may be patches that sort of unofficially fix the problem or work around it, and since CLOSED bugs are very hard to find, keeping open a bug report about the problem with attached patches tends to reduce the number of duplicate bug reports about the problem and probably reduces everyone's individual bug research time + patch hunt time as well. Same here The warning has high percentage of false positive. I compile the driver anyway with the new kernel. Created attachment 576700 [details, diff]
patch for nvidia drivers 390.116-r2, kernel 5.1
I was helping someone with a problem of compiling the 390 drivers with the 5.1 kernel. In looking I found someone (debian if I remember right) that had backported the 418 patch, I modified it to work with gentoo (changed the diff paths) and it worked, at least the person compiled it cleanly. He will test tomorrow.
I recommend placing the patch in /etc/portage/patches/x11-drivers/nvidia-drivers-390.116-r2
nvidia-drivers-390.116-r2 (with the 5.1.0 patch) failed to compile against kernel 5.2.0 CONFTEST: is_export_symbol_gpl_refcount_dec_and_test /var/tmp/portage/x11-drivers/nvidia-drivers-390.116-r2/work/kernel/nvidia-uvm/uvm8_tools.c:207:13: error: conflicting types for ‘put_user_pages’ 207 | static void put_user_pages(struct page **pages, NvU64 page_count) | ^~~~~~~~~~~~~~ In file included from /var/tmp/portage/x11-drivers/nvidia-drivers-390.116-r2/work/kernel/common/inc/nv-pgprot.h:17, from /var/tmp/portage/x11-drivers/nvidia-drivers-390.116-r2/work/kernel/common/inc/nv-linux.h:20, from /var/tmp/portage/x11-drivers/nvidia-drivers-390.116-r2/work/kernel/nvidia-uvm/uvm_linux.h:41, from /var/tmp/portage/x11-drivers/nvidia-drivers-390.116-r2/work/kernel/nvidia-uvm/uvm_common.h:48, from /var/tmp/portage/x11-drivers/nvidia-drivers-390.116-r2/work/kernel/nvidia-uvm/uvm8_tools.c:23: ./include/linux/mm.h:1075:6: note: previous declaration of ‘put_user_pages’ was here Should I open another bug report for kernel 5.2? Created attachment 582502 [details]
build.log (kernel 5.2.0)
Created attachment 582506 [details]
patch for kernel 5.2
This is my patch for kernel 5.2.
Created attachment 582698 [details, diff]
Another patch for kernel 5.2
This is a better patch. It forces nvidia driver to use the kernel new function "put_user_pages" instead of its locally defined function with the same name. This patch will work only on 64 bits machines.
A patched x11-drivers/nvidia-drivers-390.116-r3 is available in my overlay: https://github.com/stefantalpalaru/gentoo-overlay commit 4af593e8ad9d0aa47bf588e282a7c3e7c43e2c46 Author: Jeroen Roovers <jer@gentoo.org> Date: Tue Aug 6 08:20:51 2019 +0200 x11-drivers/nvidia-drivers: Versions 390.129 418.88 430.40 Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Jeroen Roovers <jer@gentoo.org> |