Closed fishbonesnl closed 11 months ago
To make AlmaLinux compatible with CoreFreq, change its source code with your kernel version at this line:
https://github.com/cyring/CoreFreq/blob/150a2191f37c07f2d0e8024090a16efa72d9e5f5/corefreqk.c#L20728
Like:
KERNEL_VERSION(5, 14, 0)
Or more appropriated to RHEL, something like:
#if ((LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0)) && (!defined(CONFIG_CACHY))) || (RHEL_MAJOR == 11)
Thank you.
I changed it to
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)) && (!defined(CONFIG_CACHY))
and now I get the error
/home/user/CoreFreq/corefreqk.c: In function ‘CoreFreqK_Create_Device_Level_Up’:
/home/user/CoreFreq/corefreqk.c:22853:35: error: assignment to ‘char * (*)(const struct device *, umode_t *)’ {aka ‘char * (*)(const struct device *, short unsigned int *)’} from incompatible pointer type ‘char * (*)(struct device *, umode_t *)’ {aka ‘char * (*)(struct device *, short unsigned int *)’} [-Werror=incompatible-pointer-types]
22853 | CoreFreqK.clsdev->devnode = CoreFreqK_DevNode;
The idea using
#if ((LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0)) && (!defined(CONFIG_CACHY))) || (RHEL_MAJOR == 11)
yields the same error as in the beginning.
Sorry to be a bother. I know very little about compiling these kind of programmes.
I'm now grapping AlmaLinux to verify what's going on ...
EDIT: looking for an Alma ISO with kernel headers inside (or to install) and test the build of CoreFreq within a VM
You wiil also change version at line 22696:
Fix is available on development branch
git clone -b develop https://github.com/CyrIng/CoreFreq.git
make clean all
It has been compiled against:
I made the second change that you suggested and I can confirm that it compiles and runs. Will test the development branch later, but for now thanks for all your help!
Hello,
Are we closing this issue ?
Yes, sorry for the late response. Please close it. I got it to work.
Hi,
I am getting a compilation error on Almalinux 9.3 with the latest version of Corefreq.
All the relevant kernel headers are installed.
What do I do?