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

Failing to compile on Fedora 34, kernel-headers outdated (but up to date according to dnf) #271

Closed
tmkcell opened this issue Jun 17, 2021 · 15 comments

Comments

@tmkcell
Copy link

tmkcell commented Jun 17, 2021

I tried to compile 5.11 upds and 5.12 cacule, but they both failed as they said
https://i.imgur.com/1YrKKGv.png
running kernel-headers 5.12.9-300

@xsmaze
Copy link

xsmaze commented Jun 18, 2021

I've also had this problem on a clean install of Fedora 34 on 5.12.10-300.

@AdelKS
Copy link
Collaborator

AdelKS commented Jun 18, 2021

Hello, I cannot see the error message, can you just copy your entire build log and attach it ? Please also provide your customization.cfg. I will have a look.

@tmkcell
Copy link
Author

tmkcell commented Jun 18, 2021

here is customization.cfg
and as for the build log, if you mean the output from the terminal when I install it, here it is

@AdelKS
Copy link
Collaborator

AdelKS commented Jun 18, 2021

Oh I see, it's a duplicate of #173 that got closed even though it didn't get fixed. Unfortunately, I do not know what's the root of this issue up until now... :/

@tmkcell
Copy link
Author

tmkcell commented Jun 18, 2021

oh i see... well is there any other way to install the kernel?

@AdelKS
Copy link
Collaborator

AdelKS commented Jun 18, 2021

Actually, there is, you can use Generic as distro, you will need to have dracut installed. And the installed files will not be tracked by dnf.

  • A folder gets installed in /lib/modules
  • The kernel image vmlinuz-****, the initramfs initramfs**** and a file called System.map get installed in /boot.
  • System headers get installed in /usr/src and they overwrite few files that get installed by one of the Fedora packages, you would need to reinstall that package to restore the original headers
  • To uninstall, you need to remove all that manually.

@tmkcell
Copy link
Author

tmkcell commented Jun 18, 2021

alright, will try this

thank you

@AdelKS
Copy link
Collaborator

AdelKS commented Jun 18, 2021

Quick googling gives this: sudo dnf install kernel-devel, try that ? (basically reinstall the kernel-devel package).

@tmkcell
Copy link
Author

tmkcell commented Jun 18, 2021

I tried that, it doesn't seem to work
And for some reason, the generic option doesn't seem to compile the kernel but it does make a kernel.new file, don't know what to do with that though

@AdelKS
Copy link
Collaborator

AdelKS commented Jun 18, 2021

Oh wait, you need to do ./install.sh install not config

@tmkcell
Copy link
Author

tmkcell commented Jun 19, 2021

I tried that, but it just exited
On a sidenote, I think I found out why the kernel wouldn't install, the kernel headers are located in a different place than normal, as when I was trying to install some dkms driver, it said it couldn't find the kernel headers at the place
Error! echo Your kernel headers for kernel 5.12.10-300.fc34.x86_64 cannot be found at /lib/modules/5.12.10-300.fc34.x86_64/build or /lib/modules/5.12.10-300.fc34.x86_64/source. You can use the --kernelsourcedir option to tell DKMS where it's located.

@AdelKS
Copy link
Collaborator

AdelKS commented Jun 19, 2021

I tried that, but it just exited

Can you attach the output on your terminal ? (you can make a text file then drag and drop it in the text you write here, you don't need to use a third-party service)

the kernel headers are located in a different place than normal, as when I was trying to install some dkms driver, it said it couldn't find the kernel headers at the place

Interesting find, I will see if I can do something based on this new information

@iWeaker
Copy link
Contributor

iWeaker commented Jun 22, 2021

I tried that, but it just exited
On a sidenote, I think I found out why the kernel wouldn't install, the kernel headers are located in a different place than normal, as when I was trying to install some dkms driver, it said it couldn't find the kernel headers at the place
Error! echo Your kernel headers for kernel 5.12.10-300.fc34.x86_64 cannot be found at /lib/modules/5.12.10-300.fc34.x86_64/build or /lib/modules/5.12.10-300.fc34.x86_64/source. You can use the --kernelsourcedir option to tell DKMS where it's located.

It is because the symlink is not generated correctly, here I have an example that the symlink is badly done, in fact the build "folder" marks it in red
Captura de pantalla de 2021-06-21 22-25-23

But with the tkg kernel, the symlink is correct. I leave image.

Captura de pantalla de 2021-06-21 22-27-23

If the folder appears in red, delete it and apply this.

sudo ln -s /usr/src/kernels/5.12.11-301.fsync.fc34.x86_64+debug /lib/modules/5.12.11-301.fsync.fc34.x86_64/build

Of course, it must be your kernel version in both cases, I have that kernel version that did not work but already applying this, it works without problems.

AdelKS added a commit to AdelKS/linux-tkg that referenced this issue Oct 1, 2022
AdelKS added a commit to AdelKS/linux-tkg that referenced this issue Oct 1, 2022
AdelKS added a commit to AdelKS/linux-tkg that referenced this issue Oct 1, 2022
AdelKS added a commit to AdelKS/linux-tkg that referenced this issue Oct 1, 2022
This should avoid conflicts with distro kernels
Remove the "obsoletes" line in the spec file

Fixes: Frogging-Family#339 Frogging-Family#609 Frogging-Family#375 Frogging-Family#173 Frogging-Family#271

Signed-off-by: Adel KARA SLIMANE <[email protected]>
AdelKS added a commit to AdelKS/linux-tkg that referenced this issue Oct 1, 2022
This should avoid conflicts with distro kernels
Remove the "obsoletes" line in the spec file

Fixes: Frogging-Family#339 Frogging-Family#609 Frogging-Family#375 Frogging-Family#173 Frogging-Family#271

Signed-off-by: Adel KARA SLIMANE <[email protected]>
AdelKS added a commit to AdelKS/linux-tkg that referenced this issue Oct 1, 2022
This should avoid conflicts with distro kernels
Remove the "obsoletes" line in the spec file

Fixes: Frogging-Family#339 Frogging-Family#609 Frogging-Family#375 Frogging-Family#173 Frogging-Family#271

Signed-off-by: Adel KARA SLIMANE <[email protected]>
AdelKS added a commit to AdelKS/linux-tkg that referenced this issue Oct 2, 2022
- Avoids conflicts with official kernels
- Fixes the reported issues with "unversionned obsoletes"
- Works now with akmod-nvidia

Fixes: Frogging-Family#609 Frogging-Family#513 Frogging-Family#375 Frogging-Family#339 Frogging-Family#375 Frogging-Family#173 Frogging-Family#271

Signed-off-by: Adel KARA SLIMANE <[email protected]>
AdelKS added a commit to AdelKS/linux-tkg that referenced this issue Oct 2, 2022
- Avoids conflicts with official kernels
- Fixes the reported issues with "unversionned obsoletes"
- Works now with akmod-nvidia

Fixes: Frogging-Family#609 Frogging-Family#513 Frogging-Family#375 Frogging-Family#339 Frogging-Family#375 Frogging-Family#173 Frogging-Family#271

Signed-off-by: Adel KARA SLIMANE <[email protected]>
@AdelKS
Copy link
Collaborator

AdelKS commented Oct 2, 2022

Hello! Please try PR #610 to confirm that it fixes this issue. It worked like a charm in my VM.

Adel

Tk-Glitch pushed a commit that referenced this issue Oct 2, 2022
* RPM: fix the script that generates kernel.spec

- Avoids conflicts with official kernels
- Fixes the reported issues with "unversionned obsoletes"
- Works now with akmod-nvidia

Fixes: #609 #513 #375 #339 #375 #173 #271

Signed-off-by: Adel KARA SLIMANE <[email protected]>

* install.sh: RPM: do not install kernel-headers package

We do not need it to build out-of-tree kernel modules. And that's
all we want actually.

Signed-off-by: Adel KARA SLIMANE <[email protected]>

Signed-off-by: Adel KARA SLIMANE <[email protected]>
@Tk-Glitch
Copy link
Member

Should be fixed with 1d063ca

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

5 participants