#1148493 nvidia-driver: dkms ftbfs due to kernel dropping strncpy for strscpy

Package:
nvidia-driver
Source:
nvidia-driver
Submitter:
Paul R. Tagliamonte
Date:
2026-10-06 21:07:02 UTC
Severity:
normal
Tags:
#1148493#5
Date:
2026-09-20 02:47:47 UTC
From:
To:
After an update to gcc-16 nvidia-current (and nvidia-tesla-550) FTBFS with:

nvidia/os-interface.c:24:10: fatal error: string.h: No such file or directory
   24 | #include <string.h>
      |          ^~~~~~~~~~

Curiously, adding an import doesn't work, I suspect due to the
nostdinc flag being passed. There's likely some sort of real fix.
conftest.sh looks like it could be one such place but I didn't want to
muck around too much.

  Paul

#1148493#12
Date:
2026-09-20 03:07:39 UTC
From:
To:
retitle 1148494 nvidia-graphics-drivers-tesla: dkms ftbfs due to
kernel dropping strncpy for strscpy
retitle 1148493 nvidia-driver: dkms ftbfs due to kernel dropping
strncpy for strscpy
thanks

https://www.phoronix.com/news/Linux-7.2-Drops-strncpy

I'll give this a whirl when I get some free cycles; but fixing the
first failing call to strncpy to strscpy (along with some minor
cleanup due to the api difference) moved the build along. Shouldn't be
too bad. Not a header issue.

  Paul

#1148493#21
Date:
2026-09-21 16:57:42 UTC
From:
To:
tags 1148493 + patch
tags 1148494 + patch
tags 1148495 + patch
kthxbyte

Attached are two absolute messes of a debdiff, one for nvidia and one
for nvidia-tesla. I don't think these should be applied without a
grownup looking at what's going on here -- both are a mess. Hopefully
its a net workload reduction for you.

I started with the tesla patches (I didn't know about the dependency to
nvidia's current dkms module), so the diffs are a bit of a mess and not
exactly the same. There's also two patches in the tesla debdiff that
should be one -- and I didn't make any DEP3 headers. There's a lot of
YOLO in here and not my finest work.

```
$ uname -a
Linux theseus 7.2.6+deb14-amd64 #1 SMP PREEMPT_DYNAMIC Debian 7.2.6-1 (2026-09-16) x86_64 GNU/Linux
$ nvidia-smi
Mon Sep 21 12:55:38 2026
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.163.01             Driver Version: 550.163.01     CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  Tesla PG500-216                Off |   00000000:06:00.0 Off |                    0 |
| N/A   36C    P0             36W /  250W |       1MiB /  32768MiB |      1%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |
+-----------------------------------------------------------------------------------------+
```

Running a test program, it appears to be working still.

Thank you for maintaining this!
   paultag

#1148493#28
Date:
2026-09-21 16:59:59 UTC
From:
To:
(Actually attached, apologies)
#1148493#33
Date:
2026-09-23 07:48:48 UTC
From:
To:
Hi,

please for us, less experienced with DKMS, please can you attach diff
to apply on DKMS tree? Or describe how to apply it?

thanks

#1148493#38
Date:
2026-09-26 23:28:49 UTC
From:
To:
[Slavko 2026-09-23]

I ran into this problem on a llama.cpp test machine.  I tested the
nvidia-graphics-drivers.debdiff patch, and can confirm that it work.

I used 'apt-get source nvidia-kernel-dkms', then cd into the extracted
directory and applied the patch using 'patch -p1 < nvidia-graphics-drivers.debdiff'
before doing 'debuild' to generate a new dkms deb.

#1148493#43
Date:
2026-09-28 14:56:46 UTC
From:
To:
I was wondering why my dkms yolo-patch didn't match what i submitted
to the tesla src package, and I realized that the 550 version was split
into its own src package.

attached is a debdiff for that src package too. same caviats apply, and
same patches for the most part.

   paultag

#1148493#48
Date:
2026-10-06 21:04:09 UTC
From:
To:
[Petter Reinholdtsen]

Is there some reason I fail to grasp that block this fix from being
uploaded into unstable, or should someone just NMU it?