AcademySoftwareFoundation / AcademySoftwareFoundation/OpenRV

[Bug]: Building OpenRV on RHEL 9.6, hitting an error with the AJA driver

Open
#993 10 comments 0 reactions 0 assignees View on GitHub
bug linux
Dominant language
C++
Stars
764
Forks
246
Avg merge
6d 12h
Merged PRs (30d)
13

Description

### What happened?

From @williamwira:
When I build OpenRV on a RHEL 9.6 machine, I get this error in AJA. Did the signature for get_user_pages change somehow?

`/disk1/scratch/wwira/git_repo/OpenRV/_build/RV_DEPS_AJA/src/driver/linux/ntv2dma.c: In function 'dmaPageLock':
/disk1/scratch/wwira/git_repo/OpenRV/_build/RV_DEPS_AJA/src/driver/linux/ntv2dma.c:2799:21: error: too many arguments to function 'get_user_pages'
2799 | numPinned = get_user_pages(
| ^~~~~~~~~~~~~~
In file included from ./include/linux/pagemap.h:8,
from /disk1/scratch/wwira/git_repo/OpenRV/_build/RV_DEPS_AJA/src/driver/linux/ntv2dma.c:17:
./include/linux/mm.h:2561:6: note: declared here
2561 | long get_user_pages(unsigned long start, unsigned long nr_pages,
| ^~~~~~~~~~~~~~
make[5]: *** [scripts/Makefile.build:249: /disk1/scratch/wwira/git_repo/OpenRV/_build/RV_DEPS_AJA/src/driver/linux/ntv2dma.o] Error 1
make[4]: *** [Makefile:1947: /disk1/scratch/wwira/git_repo/OpenRV/_build/RV_DEPS_AJA/src/driver/linux] Error 2
make[3]: *** [Makefile:238: default] Error 2
gmake[2]: *** [driver/CMakeFiles/driver_linux.dir/build.make:71: driver/CMakeFiles/driver_linux] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:209: driver/CMakeFiles/driver_linux.dir/all] Error 2`

Kernel number for this machine:
`% uname -r
5.14.0-570.49.1.el9_6.x86_64`

### List all the operating systems versions where this is happening

RHEL 9.6

### On what computer hardware is this happening?

23 Intel Xeon cpu, 86Gb Ram, Nvidia A40

### Relevant console log output

```shell
/disk1/scratch/wwira/git_repo/OpenRV/_build/RV_DEPS_AJA/src/driver/linux/ntv2dma.c: In function 'dmaPageLock':
/disk1/scratch/wwira/git_repo/OpenRV/_build/RV_DEPS_AJA/src/driver/linux/ntv2dma.c:2799:21: error: too many arguments to function 'get_user_pages'
2799 | numPinned = get_user_pages(
| ^~~~~~~~~~~~~~
In file included from ./include/linux/pagemap.h:8,
from /disk1/scratch/wwira/git_repo/OpenRV/_build/RV_DEPS_AJA/src/driver/linux/ntv2dma.c:17:
./include/linux/mm.h:2561:6: note: declared here
2561 | long get_user_pages(unsigned long start, unsigned long nr_pages,
| ^~~~~~~~~~~~~~
make[5]: *** [scripts/Makefile.build:249: /disk1/scratch/wwira/git_repo/OpenRV/_build/RV_DEPS_AJA/src/driver/linux/ntv2dma.o] Error 1
make[4]: *** [Makefile:1947: /disk1/scratch/wwira/git_repo/OpenRV/_build/RV_DEPS_AJA/src/driver/linux] Error 2
make[3]: *** [Makefile:238: default] Error 2
gmake[2]: *** [driver/CMakeFiles/driver_linux.dir/build.make:71: driver/CMakeFiles/driver_linux] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:209: driver/CMakeFiles/driver_linux.dir/all] Error 2
```

### Environment variables

_No response_

### Extra information

_No response_

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Research direction

Start with the dmaPageLock function in _build/RV_DEPS_AJA/src/driver/linux/ntv2dma.c and compare its get_user_pages call with the declaration in the RHEL kernel's include/linux/mm.h. Reproduce the build on RHEL 9.6 with kernel 5.14.0-570.49.1.el9_6.x86_64; done means the AJA Linux driver builds without the argument-count error.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.