LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Do I need to re-compile software if I update the kernel? (https://www.linuxquestions.org/questions/slackware-14/do-i-need-to-re-compile-software-if-i-update-the-kernel-4175587918/)

Altiris 08-24-2016 11:44 PM

Do I need to re-compile software if I update the kernel?
 
For example, I just compiled qemu, libvirt, and virt-manager, I have realized Slackware 14.2 has updates available for the 4.4. kernel, if I update to the latest, will the software listed above still be compatible or will I need to recompile the software? Thanks!

dugan 08-25-2016 12:00 AM

Only software that includes kernel modules will need to be recompiled. VirtualBox and the binary NVidia driver are the two that I know about.

StreamThreader 08-25-2016 02:18 AM

In some cases, software on new kernel not work, even latest version, like nvidia or vbox.
You need read changelog in kernel and in software.
If kernel version minor (only fixes) it maybe work as stable kernel, but if you upgrade to major version, be careful.

hazel 08-25-2016 06:32 AM

If you're building software locally, your installed kernel headers need to be the ones that your libc was built against. The actual running kernel can usually be different without it causing problems.

dugan 08-25-2016 09:48 AM

Quote:

Originally Posted by StreamThreader (Post 5595737)
In some cases, software on new kernel not work, even latest version, like nvidia or vbox. You need read changelog in kernel and in software. If kernel version minor (only fixes) it maybe work as stable kernel, but if you upgrade to major version, be careful.

Uhm, no. The situation with both Nvidia and VirtualBox is that they install kernel modules into /lib/modules/4.4.17 or whatever the kernel version is. That path needs to change if the kernel version changes.

bassmadrigal 08-25-2016 10:03 AM

Quote:

Originally Posted by dugan (Post 5595885)
Uhm, no. The situation with both Nvidia and VirtualBox is that they install kernel modules into /lib/modules/4.4.17 or whatever the kernel version is. That path needs to change if the kernel version changes.

I think he means really new kernel versions that the software hasn't explicitely added support for. I know we've seen that with nvidia and AMD binary drivers, but these can usually be solved with a quick patch. I don't think I've ever noticed any posts about that with VirtualBox, so I don't know if they artificially limit the high end of the kernel version or not.

That being said, for OP, this won't be one of those situations, because both nvidia and virtualbox have support for the 4.4.x kernel. It doesn't matter if it's 4.4.14 or 4.4.19. They'll work fine after a recompile.

EDIT: You can check your SBo packages for anything that contains kernel modules so you know what packages need to be recompiled.

Code:

grep ".*\.ko$" /var/log/packages/*SBo*
On my system, I would need to recompile the lirc and virtualbox-kernel packages.

volkerdi 08-25-2016 12:12 PM

Quote:

Originally Posted by hazel (Post 5595798)
If you're building software locally, your installed kernel headers need to be the ones that your libc was built against. The actual running kernel can usually be different without it causing problems.

As far as I know, I've never encountered any issues with upgrading the kernel headers without recompiling glibc. I'd be interested to hear if anyone ever has, and under what circumstances.

Emerson 08-25-2016 12:16 PM

In my Gentoo system the only package that needs headers is glibc. So obviously nothing breaks when headers are upgraded.

hazel 08-25-2016 12:36 PM

I think I read somewhere that programs could perhaps make use of constants from the headers, which could then conflict with the ones assumed by glibc. It sounds very theoretical but it isn't actually illegal, is it?

Certainly most distros upgrade the kernel and glibc in lockstep, and LFS treats the kernel headers as one of the four things you shouldn't upgrade between releases (the others are binutils, gcc and glibc).


All times are GMT -5. The time now is 09:22 AM.