NVIDIA / NVIDIA/open-gpu-kernel-modules

Can't build nvidia driver on Linux 4.19 (Ubuntu 20.04)

Open
#584 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

build-problem
Dominant language
C
Stars
17.4k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

NVIDIA Open GPU Kernel Modules Version

545.29.06

Operating System and Version

Ubuntu 20.04.4 LTS

Kernel Release

4.19.112-0062 (Custom)

Build Command

When building the NVIDIA driver, I encountered an error where ld couldn't find a series of .o files. I am using a custom kernel, and the project can be found at https://github.com/Soheil-ab/sage/. I want to install the NVIDIA driver for this kernel. I tried compiling from source code and also attempted to install using NVIDIA-Linux-x86_64-535.146.02.run, but both failed. However, when I switched to the default 5.4.0-169-generic kernel in Ubuntu, I was able to compile the driver successfully. I suspect that there may be an issue with the custom kernel, and I'm wondering if there are any specific kernel requirements for compiling the driver. How can I resolve the aforementioned problem?

Terminal output/Build Log

LD [M] /home/zhangbochun/tools/nvidia/open-gpu-kernel-modules/kernel-open/nvidia.o
ld: cannot find /home/zhangbochun/tools/nvidia/open-gpu-kernel-modules/kernel-open/nvidia/nv.o: No such file or directory
ld: cannot find /home/zhangbochun/tools/nvidia/open-gpu-kernel-modules/kernel-open/nvidia/nv-pci.o: No such file or directory
ld: cannot find /home/zhangbochun/tools/nvidia/open-gpu-kernel-modules/kernel-open/nvidia/nv-dmabuf.o: No such file or directory
ld: cannot find /home/zhangbochun/tools/nvidia/open-gpu-kernel-modules/kernel-open/nvidia/nv-nano-timer.o: No such file or directory
ld: cannot find /home/zhangbochun/tools/nvidia/open-gpu-kernel-modules/kernel-open/nvidia/nv-acpi.o: No such file or directory
ld: cannot find /home/zhangbochun/tools/nvidia/open-gpu-kernel-modules/kernel-open/nvidia/nv-cray.o: No such file or directory
ld: cannot find /home/zhangbochun/tools/nvidia/open-gpu-kernel-modules/kernel-open/nvidia/nv-dma.o: No such file or directory
ld: cannot find /home/zhangbochun/tools/nvidia/open-gpu-kernel-modules/kernel-open/nvidia/nv-i2c.o: No such file or directory
ld: cannot find /home/zhangbochun/tools/nvidia/open-gpu-kernel-modules/kernel-open/nvidia/nv-mmap.o: No such file or directory
ld: cannot find /home/zhangbochun/tools/nvidia/open-gpu-kernel-modules/kernel-open/nvidia/nv-p2p.o: No such file or directory
ld: cannot find /home/zhangbochun/tools/nvidia/open-gpu-kernel-modules/kernel-open/nvidia/nv-pat.o: No such file or directory
ld: cannot find /home/zhangbochun/tools/nvidia/open-gpu-kernel-modules/kernel-open/nvidia/nv-procfs.o: No such file or directory
ld: cannot find /home/zhangbochun/tools/nvidia/open-gpu-kernel-modules/kernel-open/nvidia/nv-usermap.o: No such file or directory
ld: cannot find /home/zhangbochun/tools/nvidia/open-gpu-kernel-modules/kernel-open/nvidia/nv-vm.o: No such file or directory
ld: cannot find /home/zhangbochun/tools/nvidia/open-gpu-kernel-modules/kernel-open/nvidia/nv-vtophys.o: No such file or directory
ld: cannot find /home/zhangbochun/tools/nvidia/open-gpu-kernel-modules/kernel-open/nvidia/os-interface.o: No such file or directory
ld: cannot find /home/zhangbochun/tools/nvidia/open-gpu-kernel-modules/kernel-open/nvidia/os-mlock.o: No such file or directory
ld: cannot find /home/zhangbochun/tools/nvidia/open-gpu-kernel-modules/kernel-open/nvidia/os-pci.o: No such file or directory
ld: cannot find /home/zhangbochun/tools/nvidia/open-gpu-kernel-modules/kernel-open/nvidia/os-registry.o: No such file or directory
ld: cannot find /home/zhangbochun/tools/nvidia/open-gpu-kernel-modules/kernel-open/nvidia/os-usermap.o: No such file or directory

More Info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names kernel-open/nvidia and the custom kernel release 4.19.112-0062; begin by reproducing the module build with that kernel and compare it with Ubuntu's 5.4.0-169-generic build. Inspect the reported missing .o paths and build log; done means establishing whether the failure is in this repository or the custom kernel and documenting actionable kernel requirements.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux, ubuntu
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.