by brooke2k on 4/25/25, 11:19 PM with 186 comments
by iforgotpassword on 4/26/25, 6:50 AM
by creatonez on 4/26/25, 2:28 AM
This is how it was done: https://github.com/tavianator/tavianator.com/blob/cf0e4ef26d...
by codys on 4/26/25, 4:50 AM
Instead of splitting the "configure" and "make" steps though, I chose to instead fold much of the "configure" step into the "make".
To clarify, this article describes a system where `./configure` runs a bunch of compilations in parallel, then `make` does stuff depending on those compilations.
If one is willing to restrict what the configure can detect/do to writing to header files (rather than affecting variables examined/used in a Makefile), then instead one can have `./configure` generate a `Makefile` (or in my case, a ninja file), and then have the "run the compiler to see what defines to set" and "run compiler to build the executable" can be run in a single `make` or `ninja` invocation.
The simple way here results in _almost_ the same behavior: all the "configure"-like stuff running and then all the "build" stuff running. But if one is a bit more careful/clever and doesn't depend on the entire "config.h" for every "<real source>.c" compilation, then one can start to interleave the work perceived as "configuration" with that seen as "build". (I did not get that fancy)
by epistasis on 4/26/25, 12:57 AM
It's likely that C will continue to be used by everyone for decades to come, but I know that I'll personally never start a new project in C again.
I'm still glad that there's some sort of push to make autotools suck less for legacy projects.
by fmajid on 4/26/25, 1:23 AM
by fishgoesblub on 4/26/25, 1:04 AM
Also, I was surprised when the animated text at the top of the article wasn't a gif, but actual text. So cool!
by andreyv on 4/26/25, 5:13 AM
[1] https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/a...
by SuperV1234 on 4/26/25, 2:15 AM
by rbanffy on 4/26/25, 8:42 AM
Also, you shouldn’t need to run ./configure every time you run make.
by moralestapia on 4/26/25, 2:36 AM
Wait is this true? (!)
by kazinator on 4/28/25, 3:42 AM
$ git bisect good
Bisecting: 7 revisions left to test after this (roughly 3 steps)
restored cached configuration for 2f8679c346a88c07b81ea8e9854c71dae2ade167
[2f8679c346a88c07b81ea8e9854c71dae2ade167] expander: noexpand mechanism.
The "restored cached configuration" message is from the git hook. What it's not saying is that it also saved the config for the commit it is navigating away from.I primed the cache by executing a "git checkout" for each of a range of commits.
Going forward, it will populate itself.
This is the only issue I would conceivably care about with regard to configure performance. When not navigating in git history, I do not often run configure.
Downstream distros do not care; they keep their machines and cores busy by building multiple packages in parallel.
It's not ideal because the cache from one host is not applicable to another; you can't port it. I could write an intelligent script to populate it, which basically identifies commits (within some specified range) that have touched the config system, and then assumes that for all in-between commits, it's the same.
The hook could do this. When it notices that the current sha doesn't have a cached configuration, it could search backwards through history for the most recent commit which does have it. If the configure script (or something influencing it) has not been touched since that commit, then its cached material can be populated for all in-between commits right through the current one. That would take care of large swaths of commits in a typical bisect session.
by gorgoiler on 4/26/25, 3:26 AM
x = 2 + 2
y = 2 * 2
z = f(x, y)
print(z)
…where x and y evaluate in parallel without me having to do anything. Clojure, perhaps?*And superficially off the topic of this thread, but possibly not.
by gitroom on 4/26/25, 6:15 PM
by redleader55 on 4/26/25, 2:20 AM
by klysm on 4/26/25, 3:16 AM
by malkia on 4/26/25, 4:05 AM
by psyclobe on 4/26/25, 3:15 AM
by tmtvl on 4/26/25, 10:40 AM
by tekknolagi on 4/26/25, 1:58 PM
by BobbyTables2 on 4/26/25, 2:53 AM
Nice writeup though.
by Chocimier on 4/26/25, 8:29 AM
Is there any such previous work?
by saagarjha on 4/26/25, 12:10 PM
by amelius on 4/26/25, 8:14 AM
by db48x on 4/26/25, 11:44 PM
And of course most of the time you don't need to rerun configure at all, just make.
by mrrogot69 on 4/26/25, 1:04 PM
by blibble on 4/26/25, 1:03 AM
it's like systemd trading off non-determinism for boot speed, when it takes 5 minutes to get through the POST