gddrv build fails with error: redefinition of 'vm_flags_set'
@pakmarkthub is already working on this.
Since Sep 15, 2025.
Assessment
This issue has not been assessed yet.
Description
Build command: make CC=clang LD=ld.lld CUDA=/usr/local/cuda/ NVIDIA_SRC_DIR=/root/local/open-gpu-kernel-modules-570.124.06/kernel-open/nvidia/ all install
OS: CentOS Stream release 9
Error:
make CC=clang LD=ld.lld CUDA=/usr/local/cuda/ NVIDIA_SRC_DIR=/root/local/open-gpu-kernel-modules-570.124.06/kernel-open/nvidia/ all instal
awk: cmd. line:1: warning: regexp escape sequence `\#' is not a known regexp operator
awk: cmd. line:1: warning: regexp escape sequence `\#' is not a known regexp operator
GDRAPI_ARCH=X86
cd src/gdrdrv && \
make
make[1]: Entering directory '/root/gdrcopy/src/gdrdrv'
Picking NVIDIA driver sources from NVIDIA_SRC_DIR=/root/local/open-gpu-kernel-modules-570.124.06/kernel-open/nvidia/. If that does not meet your expectation, you might have a stale driver still around and that might cause problems.
Setting NVIDIA_IS_OPENSOURCE=y
Setting HAVE_VM_FLAGS_SET=n
Setting HAVE_PROC_OPS=n
make[2]: Entering directory '/usr/src/kernels/6.9.0-0_fbk10_0_gc5fa564d33e3'
CC [M] /root/gdrcopy/src/gdrdrv/nv-p2p-dummy.o
CC [M] /root/gdrcopy/src/gdrdrv/gdrdrv.o
/root/gdrcopy/src/gdrdrv/gdrdrv.c:157:20: error: redefinition of 'vm_flags_set'
static inline void vm_flags_set(struct vm_area_struct *vma, vm_flags_t flags)
^
./include/linux/mm.h:857:20: note: previous definition is here
static inline void vm_flags_set(struct vm_area_struct *vma,
^
/root/gdrcopy/src/gdrdrv/gdrdrv.c:159:19: error: cannot assign to non-static data member 'vm_flags' with const-qualified type 'const vm_flags_t' (aka 'const unsigned long')
vma->vm_flags |= flags;
~~~~~~~~~~~~~ ^
./include/linux/mm_types.h:669:20: note: non-static data member 'vm_flags' declared const here
const vm_flags_t vm_flags;
~~~~~~~~~~~~~~~~~^~~~~~~~
/root/gdrcopy/src/gdrdrv/gdrdrv.c:1807:70: error: incompatible pointer types passing 'const struct file_operations *' to parameter of type 'const struct proc_ops *' [-Werror,-Wincompatible-pointer-types]
entry = proc_create("params", entry_mode, gdrdrv_proc_dir_entry, &gdrdrv_proc_params_proc_ops);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/proc_fs.h:111:122: note: passing argument to parameter 'proc_ops' here
struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
^
/root/gdrcopy/src/gdrdrv/gdrdrv.c:1815:89: error: incompatible pointer types passing 'const struct file_operations *' to parameter of type 'const struct proc_ops *' [-Werror,-Wincompatible-pointer-types]
entry = proc_create("nv_get_pages_refcount", entry_mode, gdrdrv_proc_dir_entry, &gdrdrv_proc_ngp_refcount_proc_ops);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/proc_fs.h:111:122: note: passing argument to parameter 'proc_ops' here
struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
^
4 errors generated.
make[4]: *** [scripts/Makefile.build:244: /root/gdrcopy/src/gdrdrv/gdrdrv.o] Error 1
- Dominant language
- C
- Stars
- 1.4k
- Forks
- 198
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from NVIDIA/gdrcopy
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Proposal: honor `TMPDIR` in gdrcopy package build scriptsPossibly taken @efegokdemir claimed this 53 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
Similar issues
-
SPIDevice selects an active-high device as soon as it is createdPossibly taken @mikeysklar claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
adafruit/circuitpython#11869 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
gnif/LookingGlass#1352 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
bazel-contrib/rules_go#4784 · 1 comment ·
Maintainers usually reply within 1 day