News for hackers. Stuff that matters.
Re:Autotools Mythbuster by falcolas on Thursday December 17, 2015 @10:09AM (#10751854)
While it's quite popular to bash autotools, how about instead working towards a successor? One that's as easy for the end user to use as autotools, but with less technical debit.

It's a hard problem, as evidenced by the inherent complexity in autotools, but there are a lot of smart folks who could apply their effort towards that goal.

Re:Autotools Mythbuster by rwmj on Thursday December 17, 2015 @10:17AM (#10751911)
Of course there are many alternatives (of the alternatives, I can only really recommend cmake).

The problems broadly speaking are:

* Assumptions: autotools assumes that only a basic Bourne shell is available, and a basic make, and that make is a good way to build projects. All of those are questionable, and certainly if you get rid of the assumption that you're only allowed to use ancient tools, you could immediately make autotools better, if only by removing all the shell cruft. But then someone will complain because your project doesn't compile on SunOS 4 or whatever.

* Familiarity: When I'm packaging your project for Fedora, I will not be pleased if you've used some obscure or half-assed build system. If you're using autotools, I may dislike it, but at least I can fix things.

The second one is a difficult one, because until your build system gets popular, it will never be familiar, and us packagers will keep cursing you. Once it's popular, it'll probably be quite crufty because it has had to handle all the horrible corner cases that autotools can do now.

Re:Autotools Mythbuster by adekok on Thursday December 17, 2015 @11:48AM (#10752543)
Even worse, autotools doesn't have the concept of modularization.

Look at the nginx configure scripts. They're hand-written, and modularized. Check for "foo"? There's a shell script. Autotools does the same thing via special-purpose autogenerated shell code.

That's why the configure script is 1000's to 10's of 1000's of lines of shell script. It's all auto-generated crap.

And autotools doesn't have the concept of bootstrapping. Building a C program? Great! Test everything with shell scripts. It might be more efficient to have C programs doing work, but no... it has to be the lowest common denominator.

Because managing multiple pieces is too hard. Why? Because there's no modularization.

I've used autotools for decades because everything else is worse. But I have a long-term deep-seated loathing of it which is hard to put into words.

Re:Autotools Mythbuster by scrollaway on Thursday December 17, 2015 @12:49PM (#10752991)
> I've used autotools for decades because everything else is worse.

I take it you've used CMake - could you explain in which ways you think it's worse than autotools? I agree it has concerning design flaws, but they don't come anywhere close to autotools' and I'd say CMake is overall dozens of times saner.

Re:Autotools Mythbuster by kazinator on Thursday December 17, 2015 @02:54PM (#10754019)
Does CMake generate a deliverable which builds on a machine that doesn't have CMake installed? With full incremental build support and all, so reasonable development can take place on that system?
Re:Autotools Mythbuster by icebraining on Thursday December 17, 2015 @03:16PM (#10754189)
Yes to the first question, it generates platform-specific build files (e.g. Makefiles for Unix/Linux), which don't need cmake itself to build the software. Regarding the second question, I believe so, but I'm not sure.
Re:Autotools Mythbuster by atso on Thursday December 17, 2015 @04:23PM (#10754663)
Of course once the makefile is generated, there is no need to use cmake (as long as the project is not modified), but you cannot share a makefile generated by cmake, not even redistribute it. You cannot even re/locate it on your hard drive.

The difference is that autotools generates source distributions that do not need autotools to build, while a cmake project always requires cmake when building.

Re:Autotools Mythbuster by icebraining on Thursday December 17, 2015 @07:12PM (#10755719)
Oh, I wasn't aware it wasn't distributable, my bad.
Re:Autotools Mythbuster by kazinator on Thursday December 17, 2015 @03:18PM (#10754212)
Can we give everyone exactly the same tarball of a project and just have it unpack and build on their platform?
Re:Autotools Mythbuster by icebraining on Thursday December 17, 2015 @03:23PM (#10754238)
I think so, if you pre-generate the build files for every platform and distribute them all in the tarball.
Re:Autotools Mythbuster by jedisct1 on Thursday December 17, 2015 @06:27PM (#10755454)
Haha
Re:Autotools Mythbuster by falcolas on Thursday December 17, 2015 @10:32AM (#10752013)
Yeah, I know it's a damned hard problem, but that's why I posted it the way I did. This was mostly an attempt to head off the typical cargo-cult hate against autotools.
Re:Autotools Mythbuster by mannykannot on Thursday December 17, 2015 @11:28AM (#10752401)
The hatred is not really cargo-cult-like - you can understand it and still not be happy with it. That said, thinking about what it would take to replace it helped me come to an admittedly somewhat grudging acceptance of it. The testing alone...
Re:Autotools Mythbuster by mwcampbell on Thursday December 17, 2015 @11:22AM (#10752352)
Do you have any opinion on GYP, as used by Node.js and (last time I checked) Chromium? It seems to be particularly good at producing a large binary made up of a complex graph of static libraries.
Re:Autotools Mythbuster by rockdoe on Thursday December 17, 2015 @11:26AM (#10752390)
Some simple things like compiling a single file with specific options quickly get needlessly complex, IIRC.
Re:Autotools Mythbuster by rectang on Thursday December 17, 2015 @11:38AM (#10752468)
The Apache Lucy project has an internal tool called "Charmonizer" which doesn't assume Bourne shell.

Charmonizer needs a supported C compiler command line interface (POSIX cc, MSVC, maybe others in the future) which can run "system()" commands in a supported shell (sh, cmd.exe).

The testing logic is all implemented in C code. Instead of shipping a shell script, there's one big amalgamated C file, plus a tiny "configure" wrapper to present a familiar interface.

Charmonizer hast given Lucy Autoconf-style probing on all our target platforms without adding any prerequisites beyond what Lucy already needs itself. This has made installing Lucy much easier for a wide range of users.

Right now Charmonizer remains a private component supporting only Lucy but if there were to be interest it could be broken out as an independent project at Apache.

http://github.com/apache/lucy-charmonizer

Re:Autotools Mythbuster by rdtsc on Thursday December 17, 2015 @10:43AM (#10752097)
The problem is most people who end up using autotools and other build/install/package tools are not interested in their internals or interested in working on them. They just want a tool that gets their job done and they get to do something else.

I realized this a while back, when I was advocating git at my company (maybe 5 or so years back...) some developers loved because they like the idea of it, they wanted to know how it works underneath etc., other group didn't care, didn't want to hear about internal they just wanted a list of commands to type to get their code committed.

Neither one is wrong or or bad, it just comes down to personalities or interests. Autotools is a bit in the same area.

A lot of people will complain about it, because they want to use it to get stuff done. But they will never the ones to start writing tools like it, because they do something else -- databases, graphics, numerical simulations etc.

So "start working on a successor if you don't like it" might not have the same effect for this project.

Re:Autotools Mythbuster by riffraff on Thursday December 17, 2015 @10:14AM (#10751890)
there _is_ a huge amount of smart folks who worked or works on build systems. Sadly, it seems everyone is 80% better than the others in something and 20% lacking in something else.

For example, the SCons wiki has some interesting comparisons.

https://bitbucket.org/scons/scons/wiki/SconsVsOtherBuildTool...

Re:Autotools Mythbuster by wyldfire on Thursday December 17, 2015 @10:42AM (#10752086)
I really liked SCons, but it seems like it never really hit critical mass.

Ubiquity is important for a build tool.

Re:Autotools Mythbuster by kazinator on Thursday December 17, 2015 @11:25AM (#10752380)
I recommend a hand-crafted configure script, which provides the same usage interface to package builders, without Autocrap:

E.g.:

http://www.kylheku.com/cgit/txr/tree/configure

Re:Autotools Mythbuster by jessaustin on Thursday December 17, 2015 @12:46PM (#10752963)
That script is 2500 lines long, and appears to have been written by a wizard. If my only other option was producing something like that, I'd just bite the bullet and use autotools. (IDK, that may be your point?)
Re:Autotools Mythbuster by kazinator on Thursday December 17, 2015 @02:27PM (#10753783)
Do you honestly think that I gradually developed a 2500 line configure script by hand over more than six years for an important project of mine ironically, in order to promote Autocrap?

The script detects just what is necessary for the program and is easy for me to understand, extend, port and debug.

You can fix it right on a given target platform where you're trying to get it working.

You can't do that with an Autoconf configure script (in a way that you can merge back to your stream), because it's generated. You need an installation of Autoconf.

If you want to patch the Autoconf-generated configure script with minimal changes, just reflecting the topic of the change you're making, you need the exact same version of Autoconf with which it was generated, otherwise there will be irrelevant diffs all over the script.

(I learned this when I developed an embedded, cross-compiled LInux distro from scratch. On my development system, I had about half a dozen installations of different versions of Autoconf, so that I could create minimal patches against configure scripts!!!)

And, of course, you first have to work backwards to figure out how to coax the script behavior you want indirectly through the m4 macro files. Forget about "I just want to make this tiny tweak in one command and it will Just Work".

In my script, you just ... open the script and write the necessary code. Then regression-test it on the other targets, do any necessary tweaking and commit.

Once you have written one of these scripts, you can easily re-use it. My above script is BSD-licensed. Anyone can take it and cut out whatever they don't need. If you want help using it or have any questions, you can fire me an e-mail.

Re:Autotools Mythbuster by krylon on Thursday December 17, 2015 @05:24PM (#10755042)
Thanks!
Re:Autotools Mythbuster by mwcampbell on Thursday December 17, 2015 @11:18AM (#10752321)
> as easy for the end user to use as autotools

End-users don't build from source in the first place. At least, if they do, then the developers and/or packagers have failed to do their job.

Re:Autotools Mythbuster by pjmlp on Thursday December 17, 2015 @10:44AM (#10752106)
For me it is called cmake.
Re:Autotools Mythbuster by humanrebar on Thursday December 17, 2015 @10:15AM (#10751896)
Doesn't CMake count as a successor?
Re:Autotools Mythbuster by rwmj on Thursday December 17, 2015 @10:20AM (#10751934)
I think more like "differently bad". However of all the build systems out there (and as a Fedora packager, I have had to deal with many), I'd prefer if you used either autotools or cmake, because those are the ones we're most familiar with and we can fix things.