Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Should I use "make clean" before rebuilding a kernel ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
LegionOfHell
Tux's lil' helper
Tux's lil' helper


Joined: 16 Mar 2019
Posts: 86
Location: Toronto, Canada

PostPosted: Wed May 01, 2019 4:01 am    Post subject: Should I use "make clean" before rebuilding a kern Reply with quote

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
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7133
Location: almost Mile High in the USA

PostPosted: Wed May 01, 2019 4:16 am    Post subject: Reply with quote

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@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
LegionOfHell
Tux's lil' helper
Tux's lil' helper


Joined: 16 Mar 2019
Posts: 86
Location: Toronto, Canada

PostPosted: Wed May 01, 2019 4:46 am    Post subject: Reply with quote

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
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3687
Location: Hamburg

PostPosted: Wed May 01, 2019 7:53 am    Post subject: Re: Should I use "make clean" before rebuilding a Reply with quote

LegionOfHell wrote:
should I use "make clean" before "make" ?
Yes.
Back to top
View user's profile Send private message
Goverp
l33t
l33t


Joined: 07 Mar 2007
Posts: 668

PostPosted: Wed May 01, 2019 7:55 am    Post subject: Reply with quote

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
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3687
Location: Hamburg

PostPosted: Wed May 01, 2019 7:58 am    Post subject: Reply with quote

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
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7133
Location: almost Mile High in the USA

PostPosted: Wed May 01, 2019 7:39 pm    Post subject: Reply with quote

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@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Goverp
l33t
l33t


Joined: 07 Mar 2007
Posts: 668

PostPosted: Thu May 02, 2019 7:57 am    Post subject: Reply with quote

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
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3687
Location: Hamburg

PostPosted: Thu May 02, 2019 8:09 am    Post subject: Reply with quote

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
View user's profile Send private message
Pearlseattle
Apprentice
Apprentice


Joined: 04 Oct 2007
Posts: 153
Location: Switzerland

PostPosted: Fri May 03, 2019 10:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum