Gentoo Archives: gentoo-user

From: David Haller <gentoo@×××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: is multi-core really worth it?
Date: Wed, 22 Nov 2017 11:27:50
Message-Id: 20171122112651.d6arklvaovzun4jf@grusum.endjinn.de
In Reply to: [gentoo-user] Re: is multi-core really worth it? by Martin Vaeth
1 Hello,
2
3 On Wed, 22 Nov 2017, Martin Vaeth wrote:
4 >David Haller <gentoo@×××××××.de> wrote:
5 >> autotools is _by far_the best both from a users and a packagers view.
6 >
7 >I do not agree. Its main advantage is that it is compatible with
8 >most existing unix systems (but I am already not so sure whether
9 >this also holds if you also want to compile for windows, powerpc,
10 >etc.)
11
12 Aye.
13
14 >> cmake [...] qmake
15 >
16 >I agree, these are horrible. The best build system currently
17 >appears to be meson.
18 >
19 >> equivalent to "./configure --help"
20 >
21 >For meson, it is "cat meson_options.txt", and there is a clear
22 >distinction between general options and project specific ones.
23
24 I've not yet "enconutered" meson... How is that meson_options.txt
25 maintained? Automatically or by hand? If the former: yay! If the
26 latter, treat it as non-existant...
27
28 >> transparent and easily hackable
29 >
30 >Hacking autotools is a nightmare: Things are often hidden in
31 >subprojects, sometimes combined with project specific hacks,
32 >generating/updating necessary configure files somewhere within the
33 >projects tree etc.
34
35 Well, now you're quite exaggerating! Projects using subprojects with
36 distinct autotools stack are broken by design and that is _NOT_ a
37 fault of autotools. And it's not "often". And then, usually it's
38 projects pulling in e.g. a "local" copy of e.g. "ffmpeg". _That_ is
39 broken and a nightmare. But then again, it shows the "hackability" of
40 autotools. With all "bad" side-effects. And on that I _DO_ agree quite
41 affirmatively! But then again, nobody keeps devs from using local
42 copies of qmake/cmake/meson/whatnot subprojects, in a otherwise
43 autotools/cmake/qmake/meson project and you'll have the same horrors...
44
45 >And after each change you have to run autoreconf, often with
46 >compatibility problems of autoconf/automake/gettext/... versions etc.
47
48 You'll get use to that. And you can get around by directly patching
49 configure and Makefile.in files. It _IS_ up to you! And that's one of
50 the points I like about autotools. You can even go around and first
51 run ./configure and _then_ patch the Makefiles and whatever like the
52 generated config.h. Or just set some ENV-vars or defines. That's the
53 flexibility of autotools. You can choose quite exactly where you want
54 to mess about with the delivered self-contained build. You can change
55 (or "mess with") _ANYTHING AT ANY STAGE_ of the process. As bad as
56 autotools are, that's something, I've not seen with any other
57 build-system yet. Be they self contained (IIRC: bjam anyone?) or
58 generators like imake/qmake, and cmake, what's that? It generates
59 makefiles but ... *gah*
60
61 >With meson, there is an absolutely strict separation between
62 >the distributed files and the generated/output files which are
63 >always in a fresh dir (and thus are _always_ produced).
64 >When hacking up, you need to modify only the *.meson files
65 >and do not have to worry about re-generating any other data.
66 >
67 >This sounds like I am a meson fanboy. I am not; actually, I dislike
68 >a lot of its design decisions. But compared to autotools, cmake,
69 >and qmake, it did a lot of things right.
70
71 Welcome to the club of build-system-haters! :)
72
73 I do not know meson yet, but, as far as I remember, it's rather
74 "closed" to interference from "packagers". I think I will rectify my
75 ignorance. But tell me:
76
77 - can you influence large parts of the build by just using ENV-vars or
78 easy options? 'DESTDIR="/foo"' is the prime example but doesn't
79 count, that's _too_ obvious. With autotools, you're free to fiddle
80 with any var in the generated Makefiles...
81
82 - project specific './configure --help' (see above). Python's
83 setuptools have that IIRC clumsily via 'python setup.py help' or
84 some such, and that's usually rather disappointing regarding project
85 specific options...
86
87 - etc. pp. I'm to tired...
88
89 As a packager, I just love autotools. As an author, autotools is a
90 piece of cake (you need _very_ few lines in your
91 configure.ac/Makefile.am, BTDT, esp. if you put your stuff into
92 subdirs and can use make's wildcard function for source/header etc.
93 stuff). Well, but plainly implemented, Makefile.am are just some few
94 lines, with some clever "includes" (see the magic libreoffice does
95 with "plain" makefiles) you could probably prune it down to 2-3 lines
96 or so ...
97
98 But! Yes, I will look into meson and try building one of my "fully
99 autotooled" stuff as a meson project.. At least, I'll learn how to
100 munge meson stuff to my liking :)
101
102 I'm always curious about new build systems as a packager/ebuilder, and
103 I had a case recently, where I got a build failure due to some
104 build-system stuff, and I could not track it down. And I've about
105 15-20 years experience of compiling and packaging all kinds of weird
106 stuff. But this time, no go. Until I acutally used 'strace -e file'!
107 WHAT THE *FSCK*! ISTR it might have been cmake, pulling in some file
108 from under /usr/. That's _NOT_ transparent. Debugging the build via
109 strace? Hey? Anyone home? And no, no debug option did help. And when
110 it comes to packageing, "I'm a Vet, I'm a Pro!" ;) [STR]
111
112 Oh, and just running the good ole
113
114 ./configure && make install
115
116 has its charms ;) BTW: Has meson the seperation into "configure",
117 "make/build" and "install" stages? ISTR it does .?.?.?
118
119 -dnh
120
121 PS: I hate how "sudo" is abused recently. But that's another rant.
122
123 --
124 "What happens when you read some doc and either it doesn't answer your
125 question or is demonstrably wrong? In Linux, you say "Linux sucks" and
126 go read the code. In Windows/Oracle/etc you say "Windows sucks" and
127 start banging your head against the wall." -- Denis Vlasenko on lkml

Replies

Subject Author
[gentoo-user] Re: is multi-core really worth it? Martin Vaeth <martin@×××××.de>