You are not logged in.

#1 2015-04-07 20:17:22

mxx
Member
Registered: 2012-11-23
Posts: 27

new kernel: makepkg needs reboot to build against new kernel headers?

Hi,

sorry for the stupid question, I bet it's obvious, because it's difficult for me to find any specific answer on this big_smile

What I always wondered is whether I need to reboot after a kernel upgrade before the makepkg/PKGBUILD system makes use of the new kernel headers.
Is there a *good* way to force it to use the new kernel stuff like changing an environment variable?

It would be nice if it was possible to delay the reboot -after a kernel upgrade- until after remaining packages that might depend on the kernel headers have been upgraded or rebuilt.

Thank you!

Max

Offline

#2 2015-04-07 23:20:44

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: new kernel: makepkg needs reboot to build against new kernel headers?

There shouldn't be any need for reboot. As long as you have latest linux-headers installed, everything should be built against them.

If you want to make things easy for yourself, you can enable dkms systemd service, which builds any dkms modules automatically after reboot to a new kernel.

Offline

#3 2015-04-08 00:31:28

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: new kernel: makepkg needs reboot to build against new kernel headers?

ooo wrote:

There shouldn't be any need for reboot. As long as you have latest linux-headers installed, everything should be built against them.

"Should" is a key word there.  In reality, this might take some patching of makefiles, or at least setting of environment variables as many makefiles use the output of `uname -r` in constructing the path.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2015-04-08 02:17:07

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: new kernel: makepkg needs reboot to build against new kernel headers?

Trilby wrote:

"Should" is a key word there.  In reality, this might take some patching of makefiles, or at least setting of environment variables as many makefiles use the output of `uname -r` in constructing the path.

I think I missed the question a bit, since it was about buiding packages with makepkg, and not building of kernel modules where I don't see any issues at least if you use dkms. Thanks for the correction.

With makepkg it completely depends on what you're building. Looks like many PKGBUILDs check the kernel version from /usr/lib/modules/extramodules-KERNEL/version, which should be updated alongside with the kernel (and not kernel headers).

Offline

#5 2015-04-11 12:43:33

mxx
Member
Registered: 2012-11-23
Posts: 27

Re: new kernel: makepkg needs reboot to build against new kernel headers?

ooo wrote:

There shouldn't be any need for reboot. As long as you have latest linux-headers installed, everything should be built against them.

If you want to make things easy for yourself, you can enable dkms systemd service, which builds any dkms modules automatically after reboot to a new kernel.

ooo wrote:
Trilby wrote:

"Should" is a key word there.  In reality, this might take some patching of makefiles, or at least setting of environment variables as many makefiles use the output of `uname -r` in constructing the path.

I think I missed the question a bit, since it was about buiding packages with makepkg, and not building of kernel modules where I don't see any issues at least if you use dkms. Thanks for the correction.

With makepkg it completely depends on what you're building. Looks like many PKGBUILDs check the kernel version from /usr/lib/modules/extramodules-KERNEL/version, which should be updated alongside with the kernel (and not kernel headers).

Thank you very much ooo and Trilby! I have been wondering about this since ages smile
I wish you a nice weekend!

Offline

Board footer

Powered by FluxBB