Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
nvidia-driver-450.51-r1 fails to compile
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Utsuho Reiuji
Apprentice
Apprentice


Joined: 03 Apr 2013
Posts: 177

PostPosted: Sat Jun 27, 2020 3:12 pm    Post subject: nvidia-driver-450.51-r1 fails to compile Reply with quote

This is the error I get when emerging the new drivers:
Code:

--snip--
/x11-drivers/nvidia-drivers-450.51-r1/work/kernel -Wall -MD -Wno-cast-qual -Wno-error -Wno-format-extra-args -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"450.51\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -mno-red-zone -mcmodel=kernel -DNV_UVM_ENABLE -Werror=undef -DNV_SPECTRE_V2=0 -O2 -DNVIDIA_UVM_ENABLED -DNVIDIA_UNDEF_LEGACY_BIT_MACROS -DLinux -D__linux__ -I/var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/kernel/nvidia-uvm  -DMODULE  -DKBUILD_BASENAME='"uvm8_mem"' -DKBUILD_MODNAME='"nvidia_uvm"' -c -o /var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/kernel/nvidia-uvm/uvm8_mem.o /var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/kernel/nvidia-uvm/uvm8_mem.c
   ./tools/objtool/objtool orc generate  --module --no-fp --retpoline --uaccess /var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/kernel/nvidia-uvm/uvm8_gpu.o
/var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/kernel/nvidia-uvm/uvm8_va_space_mm.c: In function ‘uvm_mmu_notifier_register’:
/var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/kernel/nvidia-uvm/uvm8_va_space_mm.c:256:16: error: implicit declaration of function ‘__mmu_notifier_register’; did you mean ‘uvm_mmu_notifier_register’? [-Werror=implicit-function-declaration]
  256 |         return __mmu_notifier_register(&va_space_mm->mmu_notifier, va_space_mm->mm);
      |                ^~~~~~~~~~~~~~~~~~~~~~~
      |                uvm_mmu_notifier_register
/var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/kernel/nvidia-uvm/uvm8_va_space_mm.c: In function ‘uvm_mmu_notifier_unregister’:
/var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/kernel/nvidia-uvm/uvm8_va_space_mm.c:261:9: error: implicit declaration of function ‘mmu_notifier_unregister’; did you mean ‘clk_notifier_unregister’? [-Werror=implicit-function-declaration]
  261 |         mmu_notifier_unregister(&va_space_mm->mmu_notifier, va_space_mm->mm);
      |         ^~~~~~~~~~~~~~~~~~~~~~~
      |         clk_notifier_unregister
  x86_64-pc-linux-gnu-gcc -Wp,-MD,/var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/kernel/nvidia-uvm/.uvm8_rm_mem.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/include -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -fplugin=./scripts/gcc-plugins/structleak_plugin.so -fplugin-arg-structleak_plugin-byref-all -DSTRUCTLEAK_PLUGIN -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wimplicit-fallthrough -Wno-unused-const-variable -fomit-frame-pointer -fno-var-tracking-assignments -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=./= -fcf-protection=none -Wno-packed-not-aligned -I/var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/kernel/common/inc -I/var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/kernel -Wall -MD -Wno-cast-qual -Wno-error -Wno-format-extra-args -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"450.51\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -mno-red-zone -mcmodel=kernel -DNV_UVM_ENABLE -Werror=undef -DNV_SPECTRE_V2=0 -O2 -DNVIDIA_UVM_ENABLED -DNVIDIA_UNDEF_LEGACY_BIT_MACROS -DLinux -D__linux__ -I/var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/kernel/nvidia-uvm  -DMODULE  -DKBUILD_BASENAME='"uvm8_rm_mem"' -DKBUILD_MODNAME='"nvidia_uvm"' -c -o /var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/kernel/nvidia-uvm/uvm8_rm_mem.o /var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/kernel/nvidia-uvm/uvm8_rm_mem.c
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:267: /var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/kernel/nvidia-uvm/uvm8_va_space_mm.o] Error 1
make[2]: *** Waiting for unfinished jobs....
   ./tools/objtool/objtool orc generate  --module --no-fp --retpoline --uaccess /var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/kernel/nvidia-uvm/uvm8_gpu_semaphore.o
   ./tools/objtool/objtool orc generate  --module --no-fp --retpoline --uaccess /var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/kernel/nvidia-uvm/uvm8_va_space.o
   ./tools/objtool/objtool orc generate  --module --no-fp --retpoline --uaccess /var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/kernel/nvidia-uvm/uvm8_rm_mem.o
   ./tools/objtool/objtool orc generate  --module --no-fp --retpoline --uaccess /var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/kernel/nvidia-uvm/uvm8_mem.o
make[1]: *** [Makefile:1729: /var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/kernel] Error 2
make[1]: Leaving directory '/usr/src/linux-5.7.4-gentoo'
make: *** [Makefile:81: modules] Error 2
 * ERROR: x11-drivers/nvidia-drivers-450.51-r1::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-450.51-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-450.51-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/kernel'
 * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/work/'


Regarding this, I also found this Gentoo forum post, where the user apparently just masked the driver. Is this a known problem or should I file a bug report?
Back to top
View user's profile Send private message
fturco
Veteran
Veteran


Joined: 08 Dec 2010
Posts: 1169
Location: Italy

PostPosted: Sat Jun 27, 2020 3:56 pm    Post subject: Reply with quote

Please post the output of the following commands:
Code:
wgetpaste -c "emerge --info x11-drivers/nvidia-drivers"
wgetpaste /var/tmp/portage/x11-drivers/nvidia-drivers-450.51-r1/temp/build.log

See the Gentoo wiki article about wgetpaste for details.
Back to top
View user's profile Send private message
Utsuho Reiuji
Apprentice
Apprentice


Joined: 03 Apr 2013
Posts: 177

PostPosted: Sat Jun 27, 2020 4:03 pm    Post subject: Reply with quote

first command: http://dpaste.com/10687DX
second command: http://dpaste.com/38V509R

(wgetpaste is quite convenient, lol)
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 24369
Location: here

PostPosted: Sat Jun 27, 2020 4:21 pm    Post subject: Reply with quote

Probably this version is incompatible with kernel 5.7.4, it seems to work with 5.7.5.
Another workaround is disable uvm use flag
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Utsuho Reiuji
Apprentice
Apprentice


Joined: 03 Apr 2013
Posts: 177

PostPosted: Sat Jun 27, 2020 4:53 pm    Post subject: Reply with quote

I will try without the uvm flag. I probably won't need it anyway.
Back to top
View user's profile Send private message
Josef.95
Advocate
Advocate


Joined: 03 Sep 2007
Posts: 3861
Location: Germany

PostPosted: Sat Jun 27, 2020 4:55 pm    Post subject: Reply with quote

Hm, can't reproduce this error here.
Please try it with
Code:
MAKEOPTS="-j1" emerge -av1 nvidia-drivers
Back to top
View user's profile Send private message
Utsuho Reiuji
Apprentice
Apprentice


Joined: 03 Apr 2013
Posts: 177

PostPosted: Sat Jun 27, 2020 5:15 pm    Post subject: Reply with quote

Neither
Code:
USE="-uvm" emerge -av nvidia-drivers

nor
Code:
MAKEOPTS="-j1" emerge -av1 nvidia-drivers

work, I get the same build error.

I don't know how to interpret the error but could this be an incompatibility with the 5.7.4 kernel?
Back to top
View user's profile Send private message
Ionen
l33t
l33t


Joined: 06 Dec 2018
Posts: 889

PostPosted: Sat Jun 27, 2020 5:20 pm    Post subject: Reply with quote

I've seen someone on IRC with the same issue but I couldn't reproduce (just further saying it's not just you).

And yeah USE=-uvm will do nothing because this flag doesn't prevent the uvm module compilation. The flag just ignore the opencl runtime dependency and skips installing the module (aka, it still builds it). Build fine with or without it for me (tried with kernel 5.6.11 and 5.7.5).

I'm using it but 450.51 is a beta driver anyhow (called such by nvidia), using 440.100 if you have any issues may make more sense.
Edit: not that it wouldn't be interesting to figure out why this is happening now
Edit2: having a quick look right now.. not that I can promise anything (I suspect kernel config options that aren't being checked)
Back to top
View user's profile Send private message
Ionen
l33t
l33t


Joined: 06 Dec 2018
Posts: 889

PostPosted: Sat Jun 27, 2020 5:38 pm    Post subject: Reply with quote

Ionen wrote:
having a quick look right now.. not that I can promise anything (I suspect kernel config options that aren't being checked)
Do you have CONFIG_MMU_NOTIFIER=y in your kernel? I do because enabled by other things like KVM and IOMMU support (not normally something you'd select yourself, I don't think it shows up in the menu on its own).

Last edited by Ionen on Sat Jun 27, 2020 5:56 pm; edited 3 times in total
Back to top
View user's profile Send private message
kallee
n00b
n00b


Joined: 07 Sep 2004
Posts: 13

PostPosted: Sat Jun 27, 2020 5:38 pm    Post subject: Reply with quote

I have the same error with kernel 5.6.16.

The other versions of nvidia-drivers compile fine.
Back to top
View user's profile Send private message
Ionen
l33t
l33t


Joined: 06 Dec 2018
Posts: 889

PostPosted: Sat Jun 27, 2020 6:09 pm    Post subject: Reply with quote

Ionen wrote:
Do you have CONFIG_MMU_NOTIFIER=y in your kernel? I do because enabled by other things like KVM and IOMMU support (not normally something you'd select yourself, I don't think it shows up in the menu on its own).
Was able to reproduce, getting the same error now after disabling those, opened bug #729928
Back to top
View user's profile Send private message
kallee
n00b
n00b


Joined: 07 Sep 2004
Posts: 13

PostPosted: Sat Jun 27, 2020 6:20 pm    Post subject: Reply with quote

Thanks Ionen. This worked for me.

I could not find how to set CONFIG_MMU_NOTIFIER=y using make menuconfig so I set IOMMU and the AMD parts of it to yes, which brought in MMU_NOTIFIER. Not sure if that is needed for nvidia-drivers.
Back to top
View user's profile Send private message
Ionen
l33t
l33t


Joined: 06 Dec 2018
Posts: 889

PostPosted: Sat Jun 27, 2020 6:24 pm    Post subject: Reply with quote

On a related note, if your hardware supports IOMMU it makes sense to use it over DMA (direct memory access), it's essentially a security option. Can also allow for things like GPU passthrough with virtual machines given other conditions are met.

Given I use it and disabled DMA entirely, I kinda wish the nvidia-drivers ebuild would stop telling me to enable CONFIG_ZONE_DMA. Not that there's any harm in leaving it enabled, but I won't just to silence a warning :lol:
Back to top
View user's profile Send private message
Utsuho Reiuji
Apprentice
Apprentice


Joined: 03 Apr 2013
Posts: 177

PostPosted: Sat Jun 27, 2020 8:37 pm    Post subject: Reply with quote

In my kernel MMU is set to no:
Code:
CONFIG_MMU_NOTIFIER=n

Makes sense since I do not have KVM installed on this machine.

For those that have problems finding this: Start make menuconfig in /usr/src/linux/ and select

Code:
  device drivers --->
    [*] IOMMU Hardware Support --->
      [*] AMD IOMMU support
      <M> AMD IOMMU Version 2 driver


This will automatically set MMU_NOTIFIER=y. The nvidia-drivers then install without issues.
Back to top
View user's profile Send private message
tantalum73
n00b
n00b


Joined: 05 Jul 2020
Posts: 1

PostPosted: Sun Jul 05, 2020 2:24 pm    Post subject: Reply with quote

Code:
       
Device Drivers --->
    Graphics support  --->                                                     
        <*> Intel 8xx/9xx/G3x/G4x/HD Graphics                                                             
            [*]   Enable capturing GPU state following a hang                                     
            [*]   Compress GPU error state                                                       
            [*]   Always enable userptr support                                                 


This can also make MMU_NOTIFIER = y. :)
Back to top
View user's profile Send private message
Ionen
l33t
l33t


Joined: 06 Dec 2018
Posts: 889

PostPosted: Sun Jul 05, 2020 3:21 pm    Post subject: Reply with quote

Note that CONFIG_MMU_NOTIFIER is not normally _required_ but it's rather because nvidia seems to do a test wrong and end up using it when it shouldn't (there's a #if/#else clause that would replace this part of the code). So consider that adding those kernel options is a temporary workaround that should be removed later on if not something you use.

450.51 is also a beta driver (called such by nvidia), so simply using 440.100 that was released at same time would be pretty normal :) For older cards, 390.138 was also released at same time, all getting fixes for building with kernel 5.7.x.
Back to top
View user's profile Send private message
jagdpanther
Guru
Guru


Joined: 22 Nov 2003
Posts: 590

PostPosted: Sun Jul 19, 2020 5:26 pm    Post subject: Reply with quote

Same issue here when trying to emerge the stable x11-drivers/nvidia-drivers-450.57. MMU_NOTIFIER is not set on my system.
Because I don't really want to set extra things in my kernel as a workaround, I think I'll enter
=x11-drivers/nvidia-drivers-450.57 in /etc/portage/package.mask/temporary_mask and continue to use 440.100-r1.
Back to top
View user's profile Send private message
Progman3K
l33t
l33t


Joined: 03 Jan 2004
Posts: 687

PostPosted: Wed Jul 22, 2020 4:38 pm    Post subject: Where is the option? Reply with quote

Hello everyone,

I am also experiencing this problem on one of two machine I have that are running kernel 5.7.9

I can see that the MMU_NOTIFIER option does in fact account for this, so verified.

I'd like to toggle the option ON, but I can't find where the option is located in menuconfig

Code:
Symbol: MMU_NOTIFIER [=n]
  │ Type  : bool
  │ Defined at mm/Kconfig:300
  │ Selects: SRCU [=y] && INTERVAL_TREE [=n]
  │ Selected by [n]:

[...]

Can someone please explain where in the menus this option can be found?

Thank you

[Moderator edit: added [code] tags to preserve output layout. -Hu]
Back to top
View user's profile Send private message
Ionen
l33t
l33t


Joined: 06 Dec 2018
Posts: 889

PostPosted: Wed Jul 22, 2020 4:47 pm    Post subject: Reply with quote

Progman3K wrote:
Can someone please explain where in the menus this option can be found?
It can't be found, it's a hidden option auto-selected as a dependency when needed which force you to select things you likely don't need so it can be enabled. See this post higher up for one example but there are other options that work.

As a result this usually won't affect people with more generic kernels that have a lot of things they don't need enabled. Personally I do use KVM+IOMMU though :)

My personal recommendation would be to just stick to nvidia-drivers-440.100-r1 for now and keep track of bug #/729928, given this seem like a bug on nvidia's end I believe this issue won't be permanent, fixing nvidia's test may also be an option if someone bothers with it.


Last edited by Ionen on Wed Jul 22, 2020 4:53 pm; edited 2 times in total
Back to top
View user's profile Send private message
fturco
Veteran
Veteran


Joined: 08 Dec 2010
Posts: 1169
Location: Italy

PostPosted: Wed Jul 22, 2020 4:52 pm    Post subject: Reply with quote

As far as I know, the MMU_NOTIFIER kernel option cannot be manually selected from make menuconfig.
On the other hand, it is automatically enabled if any of the following two logical conditions is true:
Quote:
Code:
Selected by [y]:
  │   - KVM [=y] && VIRTUALIZATION [=y] && HAVE_KVM [=y] && HIGH_RES_TIMERS [=y] && NET [=y] && MULTIUSER [=y] && X86_LOCAL_APIC [=y]
  │   - DRM_I915_USERPTR [=y] && HAS_IOMEM [=y] && DRM_I915 [=y]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum