NVIDIA / NVIDIA/open-gpu-kernel-modules
[Installation] Fails to Build/Install for LLVM Thin-LTO Running Kernels
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 17.4k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
NVIDIA Driver Version
515.43.04 (to install)
GPU
RTX 2080 Ti
Describe the bug
Attempting to install the kernel modules with Clang using an LLVM thin-LTO compiled kernel fails:
build.log
Related to:
For reference, my kernel is: Linux 5.17.2-256-tkg-pds-llvm
To Reproduce
## *Should* be sufficient to reproduce, though I had a few extra flags
make modules -j`nproc` \
TARGET_ARCH=x86_64 \
CC=clang \
CXX=clang++ \
LD="/usr/bin/ld.lld" \
AR="/usr/bin/llvm-ar" \
OBJCOPY="/usr/bin/llvm-objcopy"
## My flags:
make modules -j`nproc` \
TARGET_ARCH=x86_64 \
CC=clang \
CXX=clang++ \
LD="/usr/bin/ld.lld" \
AR="/usr/bin/llvm-ar" \
NM="/usr/bin/llvm-nm" \
RANLIB="/usr/bin/llvm-ranlib" \
STRIP="/usr/bin/llvm-strip" \
OBJCOPY="/usr/bin/llvm-objcopy"
CFLAGS="-march=znver2 -mtune=znver2 -O3 -pipe -fno-plt -minline-all-stringops -fexceptions -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection" \
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS" \
LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now"
Expected behavior
The toolchain and LTO status of the running kernel should be irrelevant to the ability to link and install the open GPU kernel modules.
(This isn't an issue with the proprietary modules.)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached nvidia-build.log and the make modules entry point, using the Linux 5.17.2-256-tkg-pds-llvm reproduction command and LLVM tool settings. Compare the open kernel-module build path with the proprietary-module behavior described in the issue and related issue #109. Done means the open GPU kernel modules build, link, and install when the running kernel uses LLVM Thin-LTO.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100