gddrv build fails with error: redefinition of 'vm_flags_set'

Open
#330 1 comment 1 reaction 1 assignee View on GitHub

@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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA/gdrcopy

All issues in NVIDIA/gdrcopy

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.