Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nvidia driver fails to build on Linux kernels with CONFIG_DEBUG_INFO_BTF_MODULES #756

Open
1 task done
ryao opened this issue Dec 26, 2024 · 2 comments
Open
1 task done

Comments

@ryao
Copy link

ryao commented Dec 26, 2024

NVIDIA Open GPU Kernel Modules Version

565.77

Operating System and Version

Gentoo Linux

Kernel Release

6.12.6-gentoo-x86_64

Please confirm you are running a stable release kernel (e.g. not a -rc). We do not accept bug reports for unreleased kernels.

  • I am running on a stable kernel release.

Build Command

emerge x11-drivers/nvidia-drivers

Terminal output/Build Log

build.log

More Info

That build used MAKEOPTS=-j16, so the command that caused the failure is not obvious. The command that fails is this:

# LLVM_OBJCOPY="/usr/bin/x86_64-pc-linux-gnu-objcopy" pahole -J -j --btf_features=encode_force,var,float,enum64,decl_tag,type_tag,optimized_func,consistent_func,decl_tag_kfuncs --lang_exclude=rust --btf_features=distilled_base --btf_base vmlinux /var/tmp/portage/x11-drivers/nvidia-drivers-565.77/work/kernel-module-source/kernel-open/nvidia-modeset.ko
dwarf_expr: unhandled 0x12 DW_OP_ operation
die__process_function: tag not supported 0x2f (template_type_parameter)!
dwarf_expr: unhandled 0x12 DW_OP_ operation
Unsupported DW_TAG_reference_type(0x10): type: 0x5fb
Encountered error while encoding BTF.

This appears to be related to #149. The reporter there claimed using !buildflags on Arch avoided the problem, although I am not sure how that is possible because the kernel build system does not use regular build flags.

In any case, there is something in the module's DWARF information that pahole does not like. Upgrading to pahole 1.28, which is the latest version, does not resolve the issue.

@ryao
Copy link
Author

ryao commented Dec 26, 2024

Renaming my /usr/src/linux/vmlinux binary will allow the build to complete, but this is a hack, as it prevents the BTF debuginfo from being generated.

@ryao
Copy link
Author

ryao commented Dec 26, 2024

It probably should be noted that reproduction likely requires building against a locally built kernel. I assume that a packaged one won't include the vmlinux binary in /usr/src/linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant