Re: Future plans for Autotools

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2023-12-29 at 03:59 +0000, Adam Faiz via Discussion list for
the autoconf build system wrote:
> Hi,
> 
> I want to share an interesting perspective that's overlooked and something that the Autotools is capable of fixing:
> https://media.ccc.de/v/camp2023-57415-fantastic_build_system_failure_modes_and_how_to_fix_them
> 
> All the examples in the video are a result of targets underspecifying their dependencies, but the bug is invisible due to make's timestamp-based nature rebuilding lots of things, including the unspecified dependencies of the target.
> 
> Does using autotools avoid this problem?
> Are there other approaches to ensuring correctness apart from make becoming stateful(like keeping track of changes in file attributes in addition to mtime to check if it's up to date)?

Autotools is more of a portability tool than it is a build system. The
behavior of "make" is part of the POSIX standard. Autotools uses make
because it's reliable, and the behavior can't change, because if it
did, it wouldn't be reliable any more. So there's that.

The bigger picture in the context of build systems is that they're all
wrong. If you're pedantic enough, the entire system is a prerequisite
for every target. The examples in the talk don't address this: does it
rebuild when my $PATH changes? How about the other environment
variables? If your build runs arbitrary programs ($CC, for example),
then there's an unknowable set of dependencies contained in the
environment alone.

OK, so you make the entire environment a prerequisite. Now the behavior
of (say) gcc depends on my filesystem -- what if I've rebuilt my
toolchain with a different library path? Etc. Do you rebuild whenever
any file changes (how long would that take to determine), or simply
require me to list the transitive dependencies of my toolchain down to
libc and the kernel (no thanks)?

So, "correctness" is impossible to achieve without rebuilding
everything unconditionally all the time. Every build system is
therefore wrong; the only difference is where they make the cut-off,
drawing the lines between correctness, complexity, and convenience.
Measure build system popularity and you'll find what is acceptable to
people; autotools and make are just fine.






[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux