Gentoo Archives: gentoo-user

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

Replies

Subject Author
Re: [gentoo-user] make -j <n> for kernel builds? John Covici <covici@××××××××××.com>