← Back to context

Comment by Aurornis

18 hours ago

> is this really a big deal given you run ./configure once

I end up running it dozens of times when changing versions, checking out different branches, chasing dependencies.

It’s a big deal.

> it's like systemd trading off non-determinism for boot speed, when it takes 5 minutes to get through the POST

5 minute POST time is a bad analogy. systemd is used in many places, from desktops (that POST quickly) to embedded systems where boot time is critical.

If deterministic boot is important then you would specify it explicitly. Relying on emergent behavior for consistent boot order is bad design.

The number of systems that have 5 minute POST times and need deterministic boot is an edge case of an edge case.

>chasing dependencies.

This aspect of configure, in particular, drives me nuts. Obviously I'd like it to be faster, but it's not the end of the world. I forget what I was trying to build the other week, but I had to make 18 separate runs of configure to find all the things I was missing. When I dug into things it looked like it could probably have done it in 2 runs, each presenting a batch of things that were missing. Instead I got stuck with "configure, install missing package" over and over again.

  • Exactly. Multiply this with the time it takes for one run on a slow machine. Back in the day, I ran a compilation on my phone as it was the target device. Besides the compilation taking 40 minutes (and configure had missed a thing or two), the configure step itself took a minute or so. Because I don't know all the moving parts, I prefer start from scratch than running into obscure problems later on.

    Arguing against parallelization of configure is like arguing against faster OS updates. "It's only once a week/whatever, come on!" Except it's spread over a billion of people time and time again.

> to embedded systems where boot time is critical.

if it's critical on an embedded system then you're not running systemd at all

> The number of systems that have 5 minute POST times and need deterministic boot is an edge case of an edge case.

desktop machines are the edge case, there's a LOT more servers running Linux than people using Linux desktops

> Relying on emergent behavior for consistent boot order is bad design.

tell that to the distro authors who 10 years in can't tell the difference between network-online.target, network-pre.target, network.target

  • And a very large number of those Linux servers are running Linux VMs, which don't POST, use systemd, and have their boot time dominated by the guest OS. Those servers are probably hosting dozens of VMs too. Boot time makes a lot of difference here.

> I end up running it dozens of times when changing versions, checking out different branches, chasing dependencies.

Yeah... but neither of that is going to change stuff like the size of a data type, the endianness of the architecture you're running on, or the features / build configuration of some library the project depends on.

Parallelization is a bandaid (although a sorely needed!) IMHO, C/C++ libraries desperately need to develop some sort of standard that doesn't require a full gcc build for each tiny test. I'd envision something like nodejs's package.json, just with more specific information about the build details themselves. And for the stuff like datatype sizes, that should be provided by gcc/llvm in a fast-parseable way so that autotools can pick it up.

  • There is the `-C` option of course. It's supposedly good for the standard tests that waste all the time, but not so much for the ad-hoc tests various projects use, which have an unfortunate chance of being buggy or varying across time.

    ... I wonder if it's possible to manually seed a cache file with only known-safe test results and let it still perform the unsafe tests? Be sure to copy the cache file to a temporary name ...

    ---

    I've thought about rewriting `./configure` in C (I did it in Python once but Python's portability turned out to be poor - Python2 was bug-free but killed; Python3 was unfixably buggy for a decade or so). Still have a stub shell script that reads HOSTCC etc. then quickly builds and executes `./configure.bin`.