* clean before or after dep?
@ 2002-09-08 1:51 D. Hugh Redelmeier
2002-09-08 13:13 ` Alan Cox
0 siblings, 1 reply; 12+ messages in thread
From: D. Hugh Redelmeier @ 2002-09-08 1:51 UTC (permalink / raw)
To: Linux Kernel List, Martin.Knoblauch
I'm having a problem building a Red Hat kernel
(kernel-source-2.4.18-10).
It looks a lot like:
<http://www.van-dijk.net/linuxkernel/200223/0349.html>
The error message is:
make[4]: *** No rule to make target `/usr/src/linux-2.4.18-10/drivers/pci/devlist.h', needed by `names.o'. Stop.
The fix proposed in <http://www.van-dijk.net/linuxkernel/200223/0432.html>
is to reverse the order of clean and dep:
a kind soul pointed out that I should do:
make clean dep
make bzimage
instead. Works. Learned a new trick :-)
Now this seems to contradict
<http://www.tldp.org/HOWTO/Kernel-HOWTO-2.html#ss2.3>
which specifies, in step 5:
bash# make dep
bash# make clean
Which is the right order for clean and dep?
I've always assumed that they could be combined, as in:
bash# make dep clean
Am I wrong?
Where is this documented?
Hugh Redelmeier
hugh@mimosa.com voice: +1 416 482-8253
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: clean before or after dep?
2002-09-08 1:51 clean before or after dep? D. Hugh Redelmeier
@ 2002-09-08 13:13 ` Alan Cox
2002-09-08 13:31 ` Joe Kellner
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Alan Cox @ 2002-09-08 13:13 UTC (permalink / raw)
To: D. Hugh Redelmeier; +Cc: Linux Kernel List, Martin.Knoblauch
> Now this seems to contradict
> <http://www.tldp.org/HOWTO/Kernel-HOWTO-2.html#ss2.3>
> which specifies, in step 5:
> bash# make dep
> bash# make clean
>
> Which is the right order for clean and dep?
The "kernel-howto" has been badly broken for years. The world would
actually be better without that document IMHO
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: clean before or after dep?
2002-09-08 13:13 ` Alan Cox
@ 2002-09-08 13:31 ` Joe Kellner
2002-09-08 13:53 ` Dr. David Alan Gilbert
2002-09-08 14:53 ` Sam Ravnborg
2002-09-08 18:09 ` D. Hugh Redelmeier
2 siblings, 1 reply; 12+ messages in thread
From: Joe Kellner @ 2002-09-08 13:31 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel
Quoting Alan Cox <alan@lxorguk.ukuu.org.uk>:
>
> The "kernel-howto" has been badly broken for years. The world would
> actually be better without that document IMHO
>
Currently, what is the proper way then? I know over the years the proper
procedure has changed. make *config; make dep; make clean; make *Image;make
modules?
-------------------------------------------------
sent via KingsMeade secure webmail http://www.kingsmeadefarm.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: clean before or after dep?
2002-09-08 13:31 ` Joe Kellner
@ 2002-09-08 13:53 ` Dr. David Alan Gilbert
2002-09-09 18:03 ` Thunder from the hill
0 siblings, 1 reply; 12+ messages in thread
From: Dr. David Alan Gilbert @ 2002-09-08 13:53 UTC (permalink / raw)
To: Joe Kellner; +Cc: Alan Cox, linux-kernel
* Joe Kellner (jdk@kingsmeadefarm.com) wrote:
> Currently, what is the proper way then? I know over the years the proper
> procedure has changed. make *config; make dep; make clean; make *Image;make
> modules?
I always do
make clean && make dep && make ......
Notes:
1) I've always done clean and then dep ever since a problem on Alpha
where it created a file during dep and deleted it in clean.
2) I always use && instead of ; - that way if one of the stages fails
you don't miss it.
3) The ..... - some architectures like zImage, some like Image, some
like boot; hell I can never remember which a particular platform
needs. I wish we had some commonality (hmm - an 'itso' target).
4) Generally make {menu|x}config tells you the story for x86 at the
end.
Dave
---------------- Have a happy GNU millennium! ----------------------
/ Dr. David Alan Gilbert | Running GNU/Linux on Alpha,68K| Happy \
\ gro.gilbert @ treblig.org | MIPS,x86,ARM, SPARC and HP-PA | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: clean before or after dep?
2002-09-08 13:13 ` Alan Cox
2002-09-08 13:31 ` Joe Kellner
@ 2002-09-08 14:53 ` Sam Ravnborg
2002-09-08 17:51 ` Thomas Molina
2002-09-08 18:09 ` D. Hugh Redelmeier
2 siblings, 1 reply; 12+ messages in thread
From: Sam Ravnborg @ 2002-09-08 14:53 UTC (permalink / raw)
To: Alan Cox; +Cc: D. Hugh Redelmeier, Linux Kernel List, Martin.Knoblauch
README located in the top-level directory specify:
make config
make clean
make dep
Which is the logical order if you ask me.
On Sun, Sep 08, 2002 at 02:13:02PM +0100, Alan Cox wrote:
> The "kernel-howto" has been badly broken for years. The world would
> actually be better without that document IMHO
What about a small HOWTO located in Documentation/ that include a note
that the LDP HOWTO is outdated?
Sam
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: clean before or after dep?
2002-09-08 14:53 ` Sam Ravnborg
@ 2002-09-08 17:51 ` Thomas Molina
0 siblings, 0 replies; 12+ messages in thread
From: Thomas Molina @ 2002-09-08 17:51 UTC (permalink / raw)
To: Linux Kernel List
On Sun, 8 Sep 2002, Sam Ravnborg wrote:
> README located in the top-level directory specify:
> make config
> make clean
> make dep
>
> Which is the logical order if you ask me.
>
> On Sun, Sep 08, 2002 at 02:13:02PM +0100, Alan Cox wrote:
> > The "kernel-howto" has been badly broken for years. The world would
> > actually be better without that document IMHO
>
> What about a small HOWTO located in Documentation/ that include a note
> that the LDP HOWTO is outdated?
I can't find the make clean in the top-level directory mentioned above.
Is the make clean even needed? I'm not doing a make clean when I rebuild
kernels; am I making a big booboo?
I'm willing to rewrite the HOWTO, or create a new one if needed.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: clean before or after dep?
2002-09-08 13:13 ` Alan Cox
2002-09-08 13:31 ` Joe Kellner
2002-09-08 14:53 ` Sam Ravnborg
@ 2002-09-08 18:09 ` D. Hugh Redelmeier
2002-09-08 18:50 ` Sam Ravnborg
2 siblings, 1 reply; 12+ messages in thread
From: D. Hugh Redelmeier @ 2002-09-08 18:09 UTC (permalink / raw)
To: Alan Cox; +Cc: Linux Kernel List
| From: Alan Cox <alan@lxorguk.ukuu.org.uk>
| > Which is the right order for clean and dep?
|
| The "kernel-howto" has been badly broken for years. The world would
| actually be better without that document IMHO
OK, but then where is the right documentation?
The top level README mentions "clean" only one place, and it is not
relevant.
The top level Makefile does not explain the semantics and constraints of
the targets in question.
A grep through Documentation leads to apparent contradictions (this is
from Red Hat LINUX 7.3's linux-2.4.18-10 source):
Files suggesting dep ; clean:
Documentation/DocBook/sis900.tmpl:476:make clean
Documentation/cdrom/cm206:59: make dep; make clean; make zImage; make modules
Documentation/filesystems/devfs/README:713:make xconfig) and then make dep; make clean and then
Documentation/filesystems/devfs/README:1546:Forgetting to run make dep; make clean after changing the
Documentation/kbuild/bug-list.txt:13: on, do a 'make dep' followed by 'make clean' before you try anything
Documentation/modules.txt:27: make clean
Documentation/networking/arcnet.txt:112: make clean
Documentation/networking/arcnet.txt:191: make clean
Documentation/networking/sis900.txt:220:make clean
Documentation/smp.txt:18: time -v sh -c 'make dep ; make clean install modules modules_install'
Documentation/telephony/ixj.txt:366: 4. make dep;make clean;make bzImage;make modules;make modules_install
Files suggesting clean ; dep:
Documentation/isdn/README.HiSax:486: make clean; make dep; make zImage; make modules; make modules_install
Documentation/moxa-smartio:256: b. make clean /* take a few minutes */
Documentation/networking/DLINK.txt:95: # make clean
What are the ordering constraints on mrproper, clean, dep, and
*config? I'd like to characterise all sequences that properly prepare
for a kernel build.
What these targets do, according to README:
mrproper: removes stale .o files and dependencies lying around
clean: ? seems to remove files built by the build process
*config: configure the kernel [build a .config]
dep: set up dependencies
The normal sequence seems to be:
mrproper && *config && dep && build
I'm not sure where clean comes in this sequence. mrproper includes
clean, so this sequence will do it once. Is it needed somewhere after
the *config too?
Is it safe to combine some or all targets in one make command, eg:
make mrproper *config dep build
I've done this for some targets, but I wonder if it is safe to
have dep combined with any following targets since it computes
dependencies.
These issues come up when iteratively trying a kernel build that
fails. What kinds of changes require an mrproper? a clean? a dep?
- is it safe to do an mrproper after a *config? In other words, does
mrproper affect/damage/undo anything done by *config?
- an mrproper undoes dep, so it must be followed by a dep
- is it safe to do a clean after a *config? In other words, does clean
affect/damage/undo anything done by *config? Surely it is safe:
many of us have done this for years.
- is it necessary to do a clean after a *config? (README suggests no;
many things in Documentation suggest yes.)
One reason might be that dep requires this -- is this the case?
<http://www.van-dijk.net/linuxkernel/200223/0432.html> suggests yes.
Experience suggests no, at least until very recently.
Or is there some other way in which dep now requires that
it be preceded by a clean, perhaps after a failed build?
- is it safe to do a clean after a dep? In other words, does clean
affect/damage/undo anything done by dep?
- is it necessary to do a clean after a dep? (README suggests no;
many things in Documentation suggest yes.) Does dep affect
subsequent cleans?
- theory: a clean should be done after a failing build so that
a subsequent build won't use the results of the failing build.
Hugh Redelmeier
hugh@mimosa.com voice: +1 416 482-8253
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: clean before or after dep?
2002-09-08 18:09 ` D. Hugh Redelmeier
@ 2002-09-08 18:50 ` Sam Ravnborg
2002-09-08 18:54 ` jbradford
2002-09-09 7:29 ` Helge Hafting
0 siblings, 2 replies; 12+ messages in thread
From: Sam Ravnborg @ 2002-09-08 18:50 UTC (permalink / raw)
To: D. Hugh Redelmeier; +Cc: Alan Cox, Linux Kernel List
On Sun, Sep 08, 2002 at 02:09:00PM -0400, D. Hugh Redelmeier wrote:
> What are the ordering constraints on mrproper, clean, dep, and
> *config? I'd like to characterise all sequences that properly prepare
> for a kernel build.
Lets go through the targets in question, and their purpose:
mrproper:
mrproper removes all files generated during the build process. This
includes the final kernel, the current configuration, firmware for
drivers, host-progs used during compilation, buildversion,
the include/asm link and a few more files.
mrproper is the right choice when you are going to build a new kernel
or something weird happend during the build process.
make mrproper are needed from time to time with the 2.4 kernel, when the
kernel build system gets 'confused'.
When executing mrproper, the first step is actually a clean as described below.
clean:
Clean removes all intermidiate files generated during the build process.
make clean will force all SRC to be build because all the .o files are
deleted.
[Checking arch/i386/Makefile + arch/i386/boot/Makefile]
make clean delete the final bzImage as well, which kinf of suprised me,
I did expect that mrproper were needed to do that.
dep:
In the 2.4 kernel make dep is used to record all the dependencies.
In the 2.5 kernel it's used for much less than in 2.4 kernel.
==>You need someone more familiar than me to comment on that.
*config:
As you probarly know it is used to build the .config.
To my best knowledge make dep, make clean does not have any influence.
But make mrproper will delete the .config file.
> What these targets do, according to README:
>
> mrproper: removes stale .o files and dependencies lying around
> clean: ? seems to remove files built by the build process
> *config: configure the kernel [build a .config]
> dep: set up dependencies
>
> The normal sequence seems to be:
> mrproper && *config && dep && build
> I'm not sure where clean comes in this sequence. mrproper includes
> clean, so this sequence will do it once. Is it needed somewhere after
> the *config too?
No, if executed before that should do it.
> - is it safe to do an mrproper after a *config? In other words, does
> mrproper affect/damage/undo anything done by *config?
Yes, .config is deleted.
> - is it necessary to do a clean after a *config? (README suggests no;
> many things in Documentation suggest yes.)
> One reason might be that dep requires this -- is this the case?
> <http://www.van-dijk.net/linuxkernel/200223/0432.html> suggests yes.
> Experience suggests no, at least until very recently.
> Or is there some other way in which dep now requires that
> it be preceded by a clean, perhaps after a failed build?
With the 2.5 kernel, if make clean or make mrproper is ever _required_
I would say you had triggered an error in the kernel build system.
> - theory: a clean should be done after a failing build so that
> a subsequent build won't use the results of the failing build.
Should not be needed with the build system in the 2.5 kernel.
Sam
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: clean before or after dep?
2002-09-08 18:50 ` Sam Ravnborg
@ 2002-09-08 18:54 ` jbradford
2002-09-08 19:23 ` Sam Ravnborg
2002-09-09 7:29 ` Helge Hafting
1 sibling, 1 reply; 12+ messages in thread
From: jbradford @ 2002-09-08 18:54 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: linux-kernel
> Lets go through the targets in question, and their purpose:
> mrproper:
> mrproper removes all files generated during the build process. This
> includes the final kernel, the current configuration, firmware for
> drivers, host-progs used during compilation, buildversion,
> the include/asm link and a few more files.
This used to be called distclean, right?
John.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: clean before or after dep?
2002-09-08 18:54 ` jbradford
@ 2002-09-08 19:23 ` Sam Ravnborg
0 siblings, 0 replies; 12+ messages in thread
From: Sam Ravnborg @ 2002-09-08 19:23 UTC (permalink / raw)
To: jbradford; +Cc: Sam Ravnborg, linux-kernel
On Sun, Sep 08, 2002 at 07:54:56PM +0100, jbradford@dial.pipex.com wrote:
> > Lets go through the targets in question, and their purpose:
> > mrproper:
> > mrproper removes all files generated during the build process. This
> > includes the final kernel, the current configuration, firmware for
> > drivers, host-progs used during compilation, buildversion,
> > the include/asm link and a few more files.
>
> This used to be called distclean, right?
Nope, distclean is still present.
distclean in addition to mrproper removes all editor backup files, patch
leftovers, md5 sum files, and empty files.
So three leves of cleaning.
Sam
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: clean before or after dep?
2002-09-08 18:50 ` Sam Ravnborg
2002-09-08 18:54 ` jbradford
@ 2002-09-09 7:29 ` Helge Hafting
1 sibling, 0 replies; 12+ messages in thread
From: Helge Hafting @ 2002-09-09 7:29 UTC (permalink / raw)
To: Sam Ravnborg, linux-kernel
Sam Ravnborg wrote:
> With the 2.5 kernel, if make clean or make mrproper is ever _required_
> I would say you had triggered an error in the kernel build system.
>
> > - theory: a clean should be done after a failing build so that
> > a subsequent build won't use the results of the failing build.
> Should not be needed with the build system in the 2.5 kernel.
Make clean is nice to have for a couple of occations:
1. Before making a tar.bz2 of the tree as a backup. Why
waste space on .o files?
A backup is useful for a number of reasons, such as
before testing a mix of patches that might
interferre badly. Or even patches for another version.
Getting the tree again takes time.
2. The pc hardware clock screwed up again and timestamps
are spread all over past and future :-( Make clean time.
Helge Hafting
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: clean before or after dep?
2002-09-08 13:53 ` Dr. David Alan Gilbert
@ 2002-09-09 18:03 ` Thunder from the hill
0 siblings, 0 replies; 12+ messages in thread
From: Thunder from the hill @ 2002-09-09 18:03 UTC (permalink / raw)
To: Dr. David Alan Gilbert; +Cc: Joe Kellner, Alan Cox, linux-kernel
Hi,
On Sun, 8 Sep 2002, Dr. David Alan Gilbert wrote:
> I always do
>
> make clean && make dep && make ......
I use to do:
# make menuconfig
# make clean dep vmlinuz modules
# su -c "make modules_install"
# install-kernel.sh
Thunder
--
--./../...-/. -.--/---/..-/.-./..././.-../..-. .---/..-/.../- .-
--/../-./..-/-/./--..-- ../.----./.-../.-.. --./../...-/. -.--/---/..-
.- -/---/--/---/.-./.-./---/.--/.-.-.-
--./.-/-.../.-./.././.-../.-.-.-
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2002-09-09 17:59 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-08 1:51 clean before or after dep? D. Hugh Redelmeier
2002-09-08 13:13 ` Alan Cox
2002-09-08 13:31 ` Joe Kellner
2002-09-08 13:53 ` Dr. David Alan Gilbert
2002-09-09 18:03 ` Thunder from the hill
2002-09-08 14:53 ` Sam Ravnborg
2002-09-08 17:51 ` Thomas Molina
2002-09-08 18:09 ` D. Hugh Redelmeier
2002-09-08 18:50 ` Sam Ravnborg
2002-09-08 18:54 ` jbradford
2002-09-08 19:23 ` Sam Ravnborg
2002-09-09 7:29 ` Helge Hafting
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®