Gentoo Archives: gentoo-user

From: John Covici <covici@××××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] make -j <n> for kernel builds?
Date: Tue, 01 Nov 2016 00:25:22
Message-Id: m3lgx4nj15.wl-covici@ccs.covici.com
In Reply to: Re: [gentoo-user] make -j for kernel builds? by Alan McKinnon
1 On Mon, 31 Oct 2016 18:33:44 -0400,
2 Alan McKinnon wrote:
3 >
4 > On 01/11/2016 00:27, John Covici wrote:
5 > > On Mon, 31 Oct 2016 18:06:07 -0400,
6 > > Alan McKinnon wrote:
7 > >>
8 > >> On 31/10/2016 23:57, John Covici wrote:
9 > >>> On Mon, 31 Oct 2016 13:37:50 -0400,
10 > >>> Meino.Cramer@×××.de wrote:
11 > >>>>
12 > >>>> Dale <rdalek1967@×××××.com> [16-10-31 18:36]:
13 > >>>>> Meino.Cramer@×××.de wrote:
14 > >>>>>> Hi,
15 > >>>>>>
16 > >>>>>> from ancient times ;) I remember, that it is not advisable
17 > >>>>>> to compile a linux kernel with more than one cpu core.
18 > >>>>>>
19 > >>>>>> Is that still true, or is it save to compile it with
20 > >>>>>> "all you can eat" ::)) ?
21 > >>>>>>
22 > >>>>>> Cheers
23 > >>>>>> Meino
24 > >>>>>>
25 > >>>>>>
26 > >>>>>
27 > >>>>> While I don't upgrade my kernel very often, since I don't reboot often
28 > >>>>> either, I've used -j 6 for my 4 core CPU for a long time. I'm pretty
29 > >>>>> sure I've done that ever since I built this rig. So far, no problems
30 > >>>>> that I have seen.
31 > >>>>>
32 > >>>>> Dale
33 > >>>>>
34 > >>>>> :-) :-)
35 > >>>>>
36 > >>>>
37 > >>>> Great! Currently rebuilding the kernel with '-j7 ' :)
38 > >>>
39 > >>> I wonder, how does it make sure that a dependency is always compiled
40 > >>> before what depends on it, so the link and all that works?
41 > >>>
42 > >>
43 > >> The kernel is special - it's a completely self-contained body of code
44 > >> with no external dependencies, so it is internally consistency almost as
45 > >> a matter of course.
46 > >>
47 > >> As for compiling the right things in the right order, the Makefiles take
48 > >> care of that just like all other software with a build system. How does
49 > >> the Makefile get made? Well, when you do make <something>config, you see
50 > >> all those deps like how iwlwifi depends on 80211 which depends on
51 > >> networking etc. That tells you the order things must be built in. Shove
52 > >> that into a Makefile maker, and voila, Bob's your auntie. Build issues
53 > >> tends to get fixed during the dev period so when Linux releases a kernel
54 > >> there's an excellent chance it will build correctly.
55 > >>
56 > >> FWIW, none of this is a specially difficult problem. It's the kind of
57 > >> thing I'd expect bright CS students to be able to do at the end of the
58 > >> first year
59 > >
60 > > OK, I will maybe try something, but I have had gentoo problems only
61 > > solved by -j1 due to such things, I guess.
62 > >
63 >
64 >
65 >
66 > With the kernel? Very very highly unlikely. If you had that problem,
67 > there is something wrong with your setup and I'd be very reluctant jump
68 > at the kernel Makefiles being the problem.
69 >
70 > Now if you said you had that problem with libreoffice, I'd agree 100%.
71 > The kernel? No.
72 >
73 >
74 > and btw, emerge problems that are solved using -j1 are
75 > a) not gentoo problems at all
76 > b) neither are they compiler problems
77 > c) they are always build problems caused by the package's own shitty
78 > build system and by upstream devs that never heard of this idea called
79 > "test your stuff to make sure it works in the real world"
80
81 I am sure you are correct, I have never tried this with the kernel, so
82 that will be an experiment for me.
83
84 Thanks.
85
86 --
87 Your life is like a penny. You're going to lose it. The question is:
88 How do
89 you spend it?
90
91 John Covici
92 covici@××××××××××.com