Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On latest RHEL8, dkms fails to build #2

Open
davidtluong opened this issue Apr 14, 2023 · 3 comments
Open

On latest RHEL8, dkms fails to build #2

davidtluong opened this issue Apr 14, 2023 · 3 comments

Comments

@davidtluong
Copy link

This is what's happening when trying to install on lastest rhel8:

DKMS make.log for gasket-0.0.git.245.66aa4629 for kernel 4.18.0-425.19.2.el8_7.x86_64 (x86_64)
Fri Apr 14 10:29:56 EDT 2023
make -C "/lib/modules/4.18.0-425.19.2.el8_7.x86_64/build" M="/var/lib/dkms/gasket/0.0.git.245.66aa4629/build" modules
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Entering directory '/usr/src/kernels/4.18.0-425.19.2.el8_7.x86_64'
  CC [M]  /var/lib/dkms/gasket/0.0.git.245.66aa4629/build/gasket_core.o
  CC [M]  /var/lib/dkms/gasket/0.0.git.245.66aa4629/build/gasket_ioctl.o
  CC [M]  /var/lib/dkms/gasket/0.0.git.245.66aa4629/build/gasket_interrupt.o
  CC [M]  /var/lib/dkms/gasket/0.0.git.245.66aa4629/build/gasket_page_table.o
/var/lib/dkms/gasket/0.0.git.245.66aa4629/build/gasket_page_table.c: In function ‘gasket_perform_mapping’:
/var/lib/dkms/gasket/0.0.git.245.66aa4629/build/gasket_page_table.c:541:48: error: passing argument 1 of ‘sg_page_iter_dma_address’ from incompatible pointer type [-Werror=incompatible-pointer-types]
    ptes[i].dma_addr = sg_page_iter_dma_address(sg_iter);
                                                ^~~~~~~
In file included from ./include/linux/dmapool.h:14,
                 from ./include/linux/pci.h:1567,
                 from /var/lib/dkms/gasket/0.0.git.245.66aa4629/build/gasket_page_table.h:15,
                 from /var/lib/dkms/gasket/0.0.git.245.66aa4629/build/gasket_page_table.c:42:
./include/linux/scatterlist.h:445:51: note: expected ‘struct sg_dma_page_iter *’ but argument is of type ‘struct sg_page_iter *’
 sg_page_iter_dma_address(struct sg_dma_page_iter *dma_iter)
                          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:318: /var/lib/dkms/gasket/0.0.git.245.66aa4629/build/gasket_page_table.o] Error 1
make[1]: *** [Makefile:1585: _module_/var/lib/dkms/gasket/0.0.git.245.66aa4629/build] Error 2
make[1]: Leaving directory '/usr/src/kernels/4.18.0-425.19.2.el8_7.x86_64'
make: *** [Makefile:15: all] Error 2
@davidtluong
Copy link
Author

My fix for this was:

sudo vi +540 /var/lib/dkms/gasket/0.0.git.245.66aa4629/source/gasket_page_table.c

Changing the 5 to a 4 so it doesn't handle the if and goes to the else. Seems that RHEL has sent the corresponding patch through to update sg_page_iter_dma_address

@abeeson
Copy link

abeeson commented Nov 8, 2023

I'm still seeing this issue on RHEL 8 (Rocky specifically) on kernel 4.18.0-477.27.1.el8_8.x86_64

I had to apply this fix in the comment above, as well as the DMA_BUF call on line 57 was also causing problems, reverting the line on 56 to:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,16,0)

From this PR:
09385d4

Resolved it, avoiding that line and letting the modules compile OK.

Hope this helps somebody else, not sure why its failing for us, as far as I can tell that should now be OK for RHEL 8.....

@kyleishie
Copy link

I'm still seeing this issue on RHEL 8 (Rocky specifically) on kernel 4.18.0-477.27.1.el8_8.x86_64

I had to apply this fix in the comment above, as well as the DMA_BUF call on line 57 was also causing problems, reverting the line on 56 to: #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,16,0)

From this PR: 09385d4

Resolved it, avoiding that line and letting the modules compile OK.

Hope this helps somebody else, not sure why its failing for us, as far as I can tell that should now be OK for RHEL 8.....

This solved it for me. Thanks @abeeson and @rh-dluong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants