View previous topic :: View next topic |
Author |
Message |
LegionOfHell Apprentice
Joined: 16 Mar 2019 Posts: 253 Location: Toronto, Canada
|
Posted: Wed May 01, 2019 4:01 am Post subject: Should I use "make clean" before rebuilding a kern |
|
|
I rebuilt my kernel without using "make clean" is that ok ? I used this guide: https://wiki.gentoo.org/wiki/Kernel/Rebuild
I am going to rebuild again, should I use "make clean" before "make" , "make modules_install" and "make install" ? |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9691 Location: almost Mile High in the USA
|
Posted: Wed May 01, 2019 4:16 am Post subject: |
|
|
Usually it's "okay" but you chance running into weird build problems that won't show up until later, possibly after reboot and your kernel fails to work properly... if things don't work as you expect you may have to end up make cleaning and rebuilding later... _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
LegionOfHell Apprentice
Joined: 16 Mar 2019 Posts: 253 Location: Toronto, Canada
|
Posted: Wed May 01, 2019 4:46 am Post subject: |
|
|
I rebuilt the kernel once without "make clean", this is the second time I am rebuilding the kernel...do you recommend using "make clean" for the second rebuild ? |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3925 Location: Hamburg
|
Posted: Wed May 01, 2019 7:53 am Post subject: Re: Should I use "make clean" before rebuilding a |
|
|
LegionOfHell wrote: | should I use "make clean" before "make" ? | Yes. |
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2014
|
Posted: Wed May 01, 2019 7:55 am Post subject: |
|
|
FWIW, I've never used "make clean" in perhaps 10 years, and particularly not between rebuilds. That way "make" only recompiles what's affected by any config changes.
If I were applying my own patches, I'd probably consider "make clean", but I only use stock gentoo-sources. _________________ Greybeard |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3925 Location: Hamburg
|
Posted: Wed May 01, 2019 7:58 am Post subject: |
|
|
Goverp wrote: | FWIW, I've never used "make clean" in perhaps 10 years, and particularly not between rebuilds. That way "make" only recompiles what's affected by any config changes.
If I were applying my own patches, I'd probably consider "make clean", but I only use stock gentoo-sources. | If you de-select a module, then any previously created *.o and *.ko file will be copied to /lib/modules nevertheless.This has sometimes nasting side effects. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9691 Location: almost Mile High in the USA
|
Posted: Wed May 01, 2019 7:39 pm Post subject: |
|
|
Yes this is the secrets of the developer that never gets shared to people who just "make" and don't write code --
The intent of "make clean" is when you make a change to your build routine that "make" can't handle, usually things like
- compiler changes
- outside library changes
- poorly written makefile
- or other outside of tree dependency
These "make" cannot figure out what changed and thus leaves it, which ends up causing random headaches down the road.
If you don't completely understand how the package you're trying to build is compiled, you're better off "make clean" and start from a fresh slate. However if you know what you're doing and only making small incremental changes, make clean would simply waste a LOT of time. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2014
|
Posted: Thu May 02, 2019 7:57 am Post subject: |
|
|
toralf wrote: |
...If you de-select a module, then any previously created *.o and *.ko file will be copied to /lib/modules nevertheless.This has sometimes nasting side effects. | Out of interest, as I've not checked, do you know if "make clean" also clears the contents of /lib/modules/... for the current kernel? I tend to move the current modules directory to foo.old, and rerun "make install" if I think I may be leaving junk behind. _________________ Greybeard |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3925 Location: Hamburg
|
Posted: Thu May 02, 2019 8:09 am Post subject: |
|
|
Goverp wrote: | toralf wrote: |
...If you de-select a module, then any previously created *.o and *.ko file will be copied to /lib/modules nevertheless.This has sometimes nasting side effects. | Out of interest, as I've not checked, do you know if "make clean" also clears the contents of /lib/modules/... for the current kernel? | IMO no, and I run into problems at my server exactly of that behaviour (which is ok BTW). SO moving the old dir away is a good idea if you'vre chnages to modules. |
|
Back to top |
|
|
Pearlseattle Apprentice
Joined: 04 Oct 2007 Posts: 162 Location: Switzerland
|
Posted: Fri May 03, 2019 10:28 pm Post subject: |
|
|
Goverp wrote: | FWIW, I've never used "make clean" in perhaps 10 years, and particularly not between rebuilds. That way "make" only recompiles what's affected by any config changes.
If I were applying my own patches, I'd probably consider "make clean", but I only use stock gentoo-sources. |
Same here, since 15 years. |
|
Back to top |
|
|
|