7 ms·
Autoconf is an easy target for these kind of rants, but you know what? It does its job, and it does it very well. The ratio of autoconf to non-autoconf programs
by lmm 14y ago
Autoconf is an easy target for these kind of rants, but you know what? It does its job, and it does it very well. The ratio of autoconf to non-autoconf programs on my system is probably 10:1, but the ratio of build problems is something like 1:20.
If anyone ever managed to write a genuinely better build system, the bazaar would let it rise to the top; the gradual rise of e.g. cmake is testament to this. Trying to impose one solution top-down, e.g. the LSB standardization of RPM, has a far worse track record than letting the bazaar do its thing.
- __alexs 14y agoAutoconf is certainly extremely functional but it is not Good. The irony in all of this of course is that autoconf was created to solve the portability issues between platforms that came from the Cathedral model.
- phkamp 14y agoNo, autoconf happened because UNIX abandonned the cathedral model and went bazaar.
- acdha 14y agoMore accurately, it went multi-cathedral: major vendors were building temples to their self-perceived importance and unless you were a major customer they weren't interested in borrowing a better idea from someone else. The bazaar at least opened up the option for most users to have some influence over the process.
- __alexs 14y agoIndeed, the first "Free" UNIX was released in the early 90's. The UNIX fragmentation of the 80's doesn't really describe the Bazaar from C&B to me either.
- norswap 14y agoI doesn't change the fact that it's terrible and that better alternative exist (for instance, CMake), thereby making it yet another cruft from the past.
- lmm 14y agoThe bazaar is perfectly capable of adopting improvements that prove themselves, and eliminating cruft from the past, if the cost is worth it. See the recent systemd fuss. If CMake really is better then eventually all important projects will shift over to it, and distributions will stop installing autoconf by default, or eventually at all. The fact that this hasn't happened already tells us that the practical difference isn't big enough to justify expending a lot of effort on switching.
- TylerE 14y agoDisagree. The bazaar model SUCKS at getting rid of cruft. New stuff gets added sure, but old dependencies never seem to go away. It's just accretion. The prevailing attitude is that "hard drive space is cheap." This inevitable leads to calcification and the perpetuation of sub-par solutions, like auto-crap. It get used because "everything else uses it".
- acdha 14y agoThere are many old libraries which have been phased out and replaced in the OSS community. It's not fast but it's pretty good compared to the commercial world where companies like Microsoft or Oracle ship everything without gaping security holes until the last customer stops using it.
- michaelt 14y agoThe fact that this hasn't happened already tells us that the practical difference isn't big enough to justify expending a lot of effort on switching. Are you arguing that it can't be a good idea, because if it was a good idea it would already have been done?
- secure 14y agoI hear your statement about build problems as soon as someone does not use autoconf quite a bit. However, in the past I’ve had the opposite experience: Trying to port software such as Apache, PHP or bacula to UNIX systems such as SGI IRIX, I always ended up writing a simple Makefile to compile the software instead of putting up with the multitude of autotools-fixing that would have been required. I reported one or two clear issues upstream and they have been fixed, but until the relevant fixes arrive at the projects (especially PHP came with an old version of autotools), some time will pass. As a counter-example, take i3-wm: it ships with a GNU Makefile (OK, multiple Makefiles in subdirectories, one for each tool) and compiles on Linux, Mac OS X, FreeBSD, OpenBSD, NetBSD. Now let’s have a look at each of these: • NetBSD: No patches required to the makefiles: http://cvsweb.se.netbsd.org/cgi-bin/bsdweb.cgi/wip/i3/patches/ http://cvsweb.se.netbsd.org/cgi-bin/bsdweb.cgi/wip/i3/patche... • FreeBSD: No patches required to the makefiles: http://www.freebsd.org/cgi/cvsweb.cgi/ports/x11-wm/i3/files/ http://www.freebsd.org/cgi/cvsweb.cgi/ports/x11-wm/i3/files/ (they do their usual change to /usr/local in the ports Makefile) • OpenBSD: several patches because OpenBSD lacks SHM support, doesn’t want (?) to use pkg-config at compile-time and quite a few bugfix backports: http://www.openbsd.org/cgi-bin/cvsweb/ports/x11/i3/patches/ http://www.openbsd.org/cgi-bin/cvsweb/ports/x11/i3/patches/ I would argue that porting i3-wm to another platform is easy because you can understand the Makefiles and it’s very clear what they do. As a conclusion, I just wanted to show you that there are counter-examples to both: situations where autotools really does not do a good job and situations where you can deliver good Makefiles without using autotools at all.
- takluyver 14y agoThis resonates with me. I've inherited an application recently that uses autoconf. Makefile.am files generate Makefile.in, which become Makefiles, which actually do the build. Then there's autogen.sh, configure.ac and acinclude.m4. If I want to change something in the build process, I don't have a clue where to start. The real kicker? It's a Python application, so there isn't much of a build process anyway. You can run it directly from source.
- lmm 14y ago>However, in the past I’ve had the opposite experience: Trying to port software such as Apache, PHP or bacula to UNIX systems such as SGI IRIX, I always ended up writing a simple Makefile to compile the software instead of putting up with the multitude of autotools-fixing that would have been required. I reported one or two clear issues upstream and they have been fixed, but until the relevant fixes arrive at the projects (especially PHP came with an old version of autotools), some time will pass. You know that you can replace config.guess and/or libtool with updated versions? Or run make -f Makefile.cvs to regenerate configure etc. from aclocal.m4? And I would argue that the fact that you had the option of writing a Makefile is itself an advantage of autoconf, because it was written to generate Makefiles in exactly the kind of layering cruft that the OP is complaining about. A more "cathedrally" solution would probably have replaced Makefiles entirely, but by having autoconf generate them it makes it possible for people who know make to, in extremis, edit the generate files. >As a counter-example, take i3-wm: it ships with a GNU Makefile (OK, multiple Makefiles in subdirectories, one for each tool) and compiles on Linux, Mac OS X, FreeBSD, OpenBSD, NetBSD. Last time we had a post from the same guy I offered up two challenges: a) cross-compile the program for ARM, b) build the program on a version of SUA (the windows posix compatibility layer) that didn't even exist when the program was released. Both of these are things I can and have done trivially with autoconf-based builds; for most projects it requires no editing of files at all, just replacing config.guess with the latest version for challenge b. I'd be interested to see how building i3-wm was in those two cases (though not interested enough to go to the effort of actually doing it).
- fluidcruft 14y agoYeah, but cmake (with roots to GE corporate development and large government contracts) isn't exemplary of bazaar development. If anything it underscores the inferiority of the bazaar.
- tedunangst 14y agoWhen OpenBSD replaced GNU libtool with a home grown perl version, it was so much faster I believe it literally cut days off machine time off a full ports build. For smaller packages, with tiny C files, running libtool.sh takes longer than running the compiler does. The majority of build time for some of those packages is still running configure, testing for things like <stdio.h>, which the package provides no workaround when missing. The OpenBSD project alone has spent years of machine time to running configure and libtool. As for doing its job well, the failure mode of configure "you can't build this" is abysmal. Just give me a fucking Makefile, I'll fix it myself. I love packages that come with Makefiles that don't work. I pop "-I/usr/local/include" into CFLAGS, run make again, and boom. Done. Trying to do the same with configure? Forget about it. --with-include-dir or whatever doesn't work, because it's really running some bogus test in the background which expects /bin/bash to exist and so on and so forth.
- phkamp 14y agoI'm nodding so hard my neck hurts.
- wglb 14y agoHave you seen redis?
- lmm 14y ago>When OpenBSD replaced GNU libtool with a home grown perl version, it was so much faster I believe it literally cut days off machine time off a full ports build. For smaller packages, with tiny C files, running libtool.sh takes longer than running the compiler does. The majority of build time for some of those packages is still running configure, testing for things like <stdio.h>, which the package provides no workaround when missing. The OpenBSD project alone has spent years of machine time to running configure and libtool. Sounds like the bazaar in action. I hope they succeed, but I know two gentoo projects that tried to do the same thing and were eventually abandoned as unworkable. >As for doing its job well, the failure mode of configure "you can't build this" is abysmal. Just give me a fucking Makefile, I'll fix it myself. I love packages that come with Makefiles that don't work. I pop "-I/usr/local/include" into CFLAGS, run make again, and boom. Done. Trying to do the same with configure? Forget about it. --with-include-dir or whatever doesn't work, because it's really running some bogus test in the background which expects /bin/bash to exist and so on and so forth. Sounds like you know make better than you know autoconf; I find it easier to fix autoconf problems on the rare occasions when they fail.
- pnathan 14y agoInterestingly, git just uses a makefile. no cmake/autoconf.
- zvrba 14y ago> The ratio of autoconf to non-autoconf programs on my system is probably 10:1, but the ratio of build problems is something like 1:20. I guess you're running Linux, right? I'd be VERY interested to see this ratio if you ran Solaris.
- lmm 14y agoFreeBSD for what it's worth