Assuming you have the appropriate patches and had DKMS working...
0001-Fix-conftest-to-ignore-implicit-function-declaration.patch
0002-Fix-conftest-to-use-a-short-wchar_t.patch
0003-Fix-conftest-to-use-nv_drm_gem_vmap-which-has-the-se.patch
nvidia-470xx-fix-gcc-15.patch
kernel-6.10.patch
kernel-6.12.patch
- OS: Linux (Debian 13 / Trixie / Sid)
- Kernel: 6.12.x / 6.13.x
- Compiler: GCC 14.x
- Driver: NVIDIA 470.256.02 (Legacy)
Users likely encountered one or more of the following blockers:
- Missing Symbol Table for RDMA:
make: *** [/usr/src/ofa_kernel/Module.symvers] Error 1 - Symbol Pollution / Duplicate Exports:
ERROR: modpost: net/vmw_vsock/vsock: 'vsock_addr_validate' exported twice. - Compiler Mismatch:
The compiler used to compile the kernel (gcc 14) does not match the current compiler.
Ensure the kernel and the driver are using the same GCC version.
- Edit
/etc/dkms/framework.confor the driver'sdkms.conf:export CC="gcc-14"
The nvidia-peermem module (RDMA/InfiniBand) is the primary source of ofa_kernel errors.
- Remove the directory:
rm -rf /usr/src/nvidia-470.256.02/nvidia-peermem - Edit
dkms.conf: Remove or comment out all entries forBUILT_MODULE_NAME[4]andDEST_MODULE_LOCATION[4](or those which mentionpeermem).
Prevent the NVIDIA conftest.sh from searching for external RDMA headers.
- Edit
/usr/src/nvidia-470.256.02/conftest.sh: Locate and comment out lines settingMLNX_OFED_KERNEL_DIRor searching for/usr/src/ofa_kernel.
To prevent modpost from scanning the entire kernel tree and reporting "exported twice" for networking/virt symbols:
- Update the
MAKEcommand indkms.conf:MAKE[0]="'make' -j`nproc` NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=${kernelver} IGNORE_CC_MISMATCH='1' modules"
Flush the DKMS tree to remove stale artifacts and trigger the build:
sudo dkms remove nvidia/470.256.02 --all
sudo CC=gcc-14 dkms install nvidia/470.256.02The 470 series is legacy. By removing the nvidia-peermem directory and its associated conftest logic, you remove the dependency on ofa_kernel. Using KBUILD_MODPOST_WARN=1 allows the build to complete even if the Debian header metadata contains duplicate symbol definitions, which is common in the transition to Kernel 6.13.