Skip to content

gddrv build fails with error: redefinition of 'vm_flags_set' #330

Description

@goelayu

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

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions