Skip to content

Building on RHEL 8.8 Fails due to function redefinition. #12

@slack2450

Description

@slack2450

I'm no kernel expert but the checks for LINUX_VERSION_CODE appear to not account for some functions being available much earlier than stated.

For example I get

/home/joss/memflow-kvm/memflow-kmod/mmap_lock.h:9:20: error: redefinition of ‘mmap_write_lock’
 static inline void mmap_write_lock(struct mm_struct *mm)

Which was resolved by removing the check for kernel version 5.8.0 in mmap_lock.h

#if LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0)

Another error that pops up is:

error: macro "kvm_for_each_memslot" requires 3 arguments, but only 2 given kvm_for_each_memslot2(slot, bkt, slots)

Which was resolved by removing the check for kernel version 5.17.0 in vmtools.c

#if LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0)

It seems these kernel features are being found in much older kernels than expected, but this also causes issues with pre-built installation using dkms.

Metadata

Metadata

Assignees

No one assigned

    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