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

Build failure on openSUSE 15.4 #419

Closed
bubbleguuum opened this issue Feb 23, 2023 · 5 comments
Closed

Build failure on openSUSE 15.4 #419

bubbleguuum opened this issue Feb 23, 2023 · 5 comments
Milestone

Comments

@bubbleguuum
Copy link

bubbleguuum commented Feb 23, 2023

Building CoreFreq for openSUSE 15.4 on OBS (Open Build Service) fails on a label at end of compound statement warning turned into error due to -Wfatal-errors being used:

[   45s]   CC [M]  /home/abuild/rpmbuild/BUILD/CoreFreq-1.95.4/corefreqk.o
[   46s] /home/abuild/rpmbuild/BUILD/CoreFreq-1.95.4/corefreqk.c: In function 'Query_TGL_IMC':
[   46s] /home/abuild/rpmbuild/BUILD/CoreFreq-1.95.4/corefreqk.c:5197:1: error: label at end of compound statement
[   46s]  EXIT_TGL_IMC:
[   46s] compilation terminated due to -Wfatal-errors.

On openSUSE Tumbleweed there is no such issue. Tumbleweed uses gcc 12 while I think 15.4 uses gcc 7 to compile modules

Googling this warning it seems to be caused by a switch without a default label or a default label without a break.

Full build log

@cyring
Copy link
Owner

cyring commented Feb 23, 2023

You should be right; this time I did not make regression tests on oldest kernel and gcc.
I will fix that ASAP when I'm back to labs.
Thank you.

@cyring cyring added this to the ASAP milestone Feb 23, 2023
@cyring
Copy link
Owner

cyring commented Feb 23, 2023

Not switch but a lonely label at the end of those two void functions.

An empty statement should help compiler:

void Query_TGL_IMC(void __iomem *mchmap, unsigned short mc)
{
EXIT_TGL_IMC: do { } while (0);
}
void Query_ADL_IMC(void __iomem *mchmap, unsigned short mc)
{
EXIT_ADL_IMC: do { } while (0);
}

@bubbleguuum
Copy link
Author

Thanks, confirming it fixes the compile error.

@cyring
Copy link
Owner

cyring commented Mar 2, 2023

Fix available in commit 453b8b9

@cyring cyring closed this as completed Mar 3, 2023
@olejon
Copy link

olejon commented Mar 3, 2023

Confirmed fixed on Ubuntu 20.04.5 LTS. Stopped compiling with exit 1 error for dkms install corefreqk/1.95 - not dkms add corefreqk/1.95 first of course - but 1 second into make - on v 1.95.3 and also 1.95.4, so I reverted to 1.95.2 (was stable and reliable as always).

I assumed this was reported and so I didn't report it. Didn't bother you check the dkms error log, so 💤

Sorry. I should have when 2 consecutive releases failed.

Now it's fixed 👍🏻

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