-
Notifications
You must be signed in to change notification settings - Fork 30
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
Accommodate Red Hat’s kernel backports on CentOS Stream release 9 #192
Conversation
Using /home/acc/workspace/mrfioc2-vmflags/mrmShared/linux/uio_mrf.c: In function ‘mrf_mmap_physical’:
/home/acc/workspace/mrfioc2-vmflags/mrmShared/linux/uio_mrf.c:127:5: error: implicit declaration of function ‘vm_flags_set’ [-Werror=implicit-function-declaration]
127 | vm_flags_set(vma, VM_IO | VM_RESERVED);
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors
I checked AlmaLinux 9.4 and RockyLinux 9.4, neither of them backports
|
@Insomnia1437 , good catch. What does |
|
it returns: here my numbers: #define LINUX_VERSION_CODE 331264
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))
#define LINUX_VERSION_MAJOR 5
#define LINUX_VERSION_PATCHLEVEL 14
#define LINUX_VERSION_SUBLEVEL 0
#define RHEL_MAJOR 9
#define RHEL_MINOR 6
#define RHEL_RELEASE_VERSION(a,b) (((a) << 8) + (b))
#define RHEL_RELEASE_CODE 2310
#define RHEL_RELEASE "522" |
Could you check also: |
Rocky
Alma
CentOS Stream 9
|
@Insomnia1437 , @amichelotti - as I do not have a possibility to test it, could you do that for your Linux distros using the branch below: |
@jerzyjamroz tried, it worked, thanks! what is USE_VM_FLAGS_WRAPPER? |
@jerzyjamroz it works on AlmaLinux 9.4 |
@amichelotti , I added It would be good if community members added their OS-es to: https://github.com/epics-modules/mrfioc2/blob/master/.github/workflows |
@@ -123,7 +123,7 @@ int mrf_mmap_physical(struct uio_info *info, struct vm_area_struct *vma) | |||
return -EINVAL; | |||
} | |||
|
|||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) | |||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) || (defined(RHEL_RELEASE_CODE) && (RHEL_RELEASE_CODE >= 906)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is 906
meant to be 0x906
, or better yet RHEL_RELEASE_VERSION(9,6)
?
The situation seems to me confusing enough to merit a comment describing what we think happened.
/* vm_flags_set() function introduced in upstream Linux 6.3.
* Backported to RHEL 9.6 ???
*/
Has anyone found a reference for how RHEL_RELEASE_VERSION
progresses wrt. distribution versions? Or a summary of how it diverges for the various RHEL derivatives?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdavidsaver I haven't been using those distros but it looks like Rocky Linux
and AlmaLinux
don't backport but CentOS Stream
does. All those 3 distros use the same macros.
I haven't found an easy solution but universal solution, so I am waiting for eventual proposals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is
906
meant to be0x906
, or better yetRHEL_RELEASE_VERSION(9,6)
?
To be clear 906 == 0x38a == RHEL_RELEASE_VERSION(3, 138)
is not what is intended. This is a bug. The condition needs to be on 0x906
or RHEL_RELEASE_VERSION(9,6)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far a "universal solution"... I think this would be difficult within the constraints of Make.
Our best case would be if RH and their competitors have a miraculous reconciliation. I wouldn't put money on this possibility. I think this leaves mrfioc2 to either 1) "delegate" handling of this situation to individual sites. Either as a one-line patch, or somehow defining an extra Make variable. (eg. make USR_CPPFLAGS=-DUSE_VM_FLAGS_WRAPPER
) Or 2) trying to do test compilations like autoconf or cmake to see if vm_flags_set()
exists. Possible with plain Make, but quite tedious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdavidsaver , I started a thread with the Centos Packaging Team discussion.fedoraproject. They wrote some conclusions.
@amichelotti , I think try to apply the comment of @mdavidsaver related to macros and then I think it can be merged. It means Alma and Rocky will not be supported for a few months (until they apply the Centos Stream patches (as explained by devs), then all compatible from that moment. |
|
@jerzyjamroz patch is ok, thanks you all. |
@amichelotti , what I wrote is that this what you are trying to do is ok. Why did you close the PR? Just apply the |
sorry I understood that at the moment the best thing to do is to apply your
c9 patch.Ok so I re-open and just use 9,6.
Il giorno lun 11 nov 2024 alle ore 09:59 Jerzy Jamroz <
***@***.***> ha scritto:
… @amichelotti <https://github.com/amichelotti> , what I wrote is that this
what you are trying to do is ok. Why did you close the PR? Just apply the
RHEL_RELEASE_VERSION(9,6) and test the things.
—
Reply to this email directly, view it on GitHub
<#192 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAW6KTEDCIR3L2FUYJYK6E32ABWWZAVCNFSM6AAAAABQ5XX7ESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRXGU4DMMJWGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
---------------------------------------------------
Andrea Michelotti
http://it.linkedin.com/in/michelotti
skype:a.michelotti
|
@amichelotti , and adding your CI update once tested is useful as well. |
Sorry again for my previous patch. Here a more reasoned patch to solve driver compilation failure on CentOS Stream release 9.