Alternatives to Autoconf? 108
Despairing Developer queries: "Once autoconf was a great way to make widely portable programs. But now when you have to spend more time sorting out incompatibilities between autoconf versions, breaking battles between autoconf compatibility wrappers and configure.in compatibility functions that tries to outsmart each other, and on top of that see the list of dependencies increase (it's not that fun to compile perl on unicos) and performance diving rapidly, what is your escape plan? Is there a drop in replacement for autoconf? Is there something else out there that is as portable as autoconf to use instead?"
QMake (Score:3, Interesting)
Re:QMake (Score:3, Informative)
Re:QMake (Score:3, Interesting)
Never the less, it's easy for beginners, and it's cross-plattform!
So for posix developers it might be unsufficient - for Windoze developers (M$VC) it would be a great improvement (the way M$VC handles the project settings is horrific)!
Re:QMake (Score:1, Informative)
not entirely sure why this got marked as a troll
Because QMake is free. I couldn't find any comment by the FSF about QMake, and it's dual licensed under exactly the same terms as Qt itself. From the FSF website:
Simply suggesting QMake wouldn't have been a t
Re:QMake (Score:2)
<grin>
Re:QMake (Score:2)
mod article up! (Score:5, Insightful)
unfortunately, there are no reasonable replacements that i know of, which is probably a testament to the nastiness inherent in solving this problem. a pity, really -- auto(conf|make) and company are a really good idea (in theory). unfortunately, there seems to be some really bad crack smoke involved in designing these tools. first (and probably foremost) in my mind is why isn't there a database of some sort which would at least allow the option of keeping track of which versions of what applications have been configured how and installed where.
Re:mod article up! (Score:5, Informative)
pkg-config provides you with compiler/linker/preprocessor flags for
compiling a program that uses various libraries.
Now, if only all libraries provided a
Mod parent up! (Score:5, Interesting)
Re:Mod parent up! (Score:2, Insightful)
For instance, when compiling Evo from fresh source on a version of SuSE awhile back, I installed the various -devel RPMs that were required and yet those -devel RPMs left out their
Not saying pkg-config may not be useful
Re:Mod parent up! (Score:3, Informative)
well that's actually your distro's fault. And yes binary distro's suck at providing headers and other -config and
source distro's like Lunar-linux [lunar-linux.org] provide a wonderful rich platform with all of these -dev stuff installed by default and the way the developer has meant it. These source distros are excellent for developers.
Re:Mod parent up! (Score:3, Informative)
As somone who works on an open-source project that requires evolution-devel to compile, let me say that I am well aware of that problem. When GNOME went over to pkgconfig, many distros took a while to build their -devel packages with the .pc files.
That being said, I agree with the parent post - pkgconfig goes a long way toward solving problems with automake and autoconf. Everything in GNOME now uses it, so setting up the build environment for anything that depends on GNOME libraries is much, much easier.
Re:Mod parent up! (Score:3, Interesting)
Instead they got put in
Re:Mod parent up! (Score:2, Interesting)
This is the one thing that bugs me about pkgconfig. I mean how hard can it be to add a --install option, allowing pkgconfig to choose where to place the .pc file.
Maybe I'll go make a patch...
RegardselFarto
Re:mod article up! (Score:3, Interesting)
Which brings me to another issue: why isn't the output from 'configure --help' available in machine-readable form? Say, XML? This would help a lot with the creation of graphical configuration tools for source packages. AFAIK there are a couple of helper apps out there that do this, but they have to go through horrible hoops parsing the output from 'configure --help'.
Re:mod article up! (Score:2)
The place to extract that information is not from 'configure --help', it's from the configure.{in,ac} file directly. The basic --help output (the standard options like --prefix, etc) is known already, so just get the arguments to AC_ENABLE_* and AC_WITH_*, or however they're spelled.
Re:mod article up! (Score:2, Funny)
How is a graphical configuration tool going to help anything? You want to pile another layer of crap onto an already burdened autoconf just so you can play with your mouse? What the hell is wrong with you? Don't be such a pussy: type './configure --help', figure out the options on the command line, and stop recommending open source programmers waste their time developing mere gimmicks. Do you work for Micr
Re:mod article up! (Score:2)
You mean why doesn't
The latter is obvious... there is no standard package management system.
I can't imagine a mode of operation for configure where you're re-running it so frequently as to be a real time waster. Unless you've got a source base so screwed
Re:mod article up! (Score:1)
Re:mod article up! (Score:2)
Worst understatement ever!
Re:mod article up! (Score:2)
Two suggestions: (Score:3, Informative)
These are both sort of combined configuration and build systems (which is the way it should be IMHO). Scons requires Python (>=1.5.2, IIRC), so it is as "only" as portable as Python itself (which is to say "very") while cmake doesn't require anything except a C++ compiler. The actual "language" in Scons is just regular python while cmake uses a hideous custom language.
Two awful suggestions (Score:5, Informative)
they may be a drop in replacement for developers, but for packagers and people trying to track changes and new versions, both cmake and scons (blender!) are horrible. They cost us (A group of 10 people working on a distro) enormous amount of extra time (blender's upgrade to
all in all autoconf maybe a problem for developers, but for packagers it is still *by* *far* the best.
Re:Two awful suggestions (Score:1)
I actually found it easier porting software back before anybody did any attempt at making it fully automatic. autoconf's use of sh as a back-end language for a compiler for an auto-detect language often makes it necessery to muck about in the "object files" (sh files), and reverse engineering these i
Re:Two suggestions: (Score:4, Insightful)
Re:Two suggestions: (Score:2)
Developers use it, users suffer under it. I've spent so much time fighting with autoconf on non-vanilla-GNU/Linux systems that it would have saved time to just edit the fucking source code to get it to compile.
problem inevitable (Score:5, Insightful)
Re:problem inevitable (Score:1)
Re:problem inevitable (Score:2)
So, when your app needs a feature introduced in libfoo version 2.1, it would (depending on the naming scheme
scons? (Score:1)
Re:scons? (Score:2)
and the autotools are just way to complicated to begin bother with.
You have been 's CONNED (Score:5, Interesting)
SCons makes you lazy, do the work, then your application builds BETTER on MORE platforms with autoconf
Re:You have been 's CONNED (Score:2)
Try PMK, for example (Score:5, Informative)
You can find it at pmk.sourceforge.net [sourceforge.net]
Or else, you can have a look at A-A-P [a-a-p.org], by nobody else than Bram Moolenaar, the author of the One True Editor, a.k.a. ViM :-)
There is also Package-framework [freshmeat.net], by Tom Lord, the author of the infamous Arch [gnuarch.org] SCM.
I was about to mention SCons, too, but other people already did (it always pay to check other comments just before posting, especially on /. :-)
To sum it up : there is no shortage of alternatives to the incredibly hairy Autoconf/Automake nightmare. The problem is, people are still using them for the very same reason they use CVS instead of Arch/Subversion, or Sendmail instead of Postfix/Exim : because they're considered ``standard'' tools, and people feel more comfortable with software they know to be used by plenty of other people (millions of programmers can't all be wrong. Can they ?). I really hope they'll stop making this kind of mistakes soon, so I won't need to curse them everytime I have to debug some Autoconf breakage...
Re:Try PMK, for example (Score:3, Insightful)
I took a quick look at pmk a while back. I got as far as this FAQ entry:
7. Why not supporting cygwin?
Because cygwin is not handling executable files as it should. It is absurd to have to take care about a trailing'.exe' under a Unix-like environment.
Absurd it may be, but Windows is the most popular platform out there and refusing to support it because it's too icky is just plain dumb. They've refused to make pmk useful enough to actually be valuable to me, so I haven't bothered using it for anyth
Re:Try PMK, for example (Score:2)
What you missed is that PMK is aimed to POSIX systems.
The bit I saw was that it was supposed to be a replacement for GNU autoconf. Autoconf is designed to automate away the differences between platforms and if PMK is restricted to POSIX, that makes it insufficiently flexible for my purposes.
(Autoconf is designed to work on non-POSIX systems. That's why the shell code is so hacky--it's got to work around every Unix's own shell wierdness.)
If someday someone has interests to make a PMK port for win
Re:Try PMK, for example (Score:2)
Yay, a flamewar! I'll join! I see this issue the other way: it's not portable software not supporting Windows, it's Windows not supporting portable software.
Before Windows was created, there was the POSIX API. Though definitely inspired by UNIX, POSIX is an API that any operating system could support, and there are indeed non-UNIX systems that are POSIX-compliant. Wh
Re:Try PMK, for example (Score:2)
Yay, a flamewar! I'll join!
I'm not usually very good at flamewars, so just pretend I wrote a lot of incoherent abuse here.
Asserting that developers are dumb because they do not support a system that was designed to be incompatible is, I would say, misguided.
If you go back and read my post, you will see that I'm referring to the behaviour as dumb, not the people. That's a big distinction. These folks have written a working non-trivial software package and that requires some smarts. I'm talking a
Re:Try PMK, for example (Score:2)
Anyway, I must go to bed now, or I'll be writing incoherent abuse because I'm incapable of doing anything else. Thanks for your explanation!
Solution to the Problem (Score:3, Interesting)
> portable as autoconf to use instead?
Yeah. It's called GNU Make.
Seriously, if you write your makefiles and your
code in a responsibly portable manner, there's
absolutely no reason for autoconf or automake.
And it's not hard. I've done it repeatedly.
The auto* tools are an antipattern virus.
Re:Solution to the Problem (Score:2)
> Seriously, if you write your makefiles and your
> code in a responsibly portable manner, there's
> absolutely no reason for autoconf or automake.
Well, that's right except sometimes you can't avoid some #ifdef quirkyness (because a function has to be invoked with different parameters in some foreign C library you target, or because Windows uses '\' instead of '/' as a directory delimiter, etc.). In these cases, the simplest way to go is to write a Makefile.Linux, a Makefile.FreeBSD, a Makefile.
Re:Solution to the Problem (Score:5, Insightful)
So how do you portably detect which taste of system calls you have on the OS without autoconf, and without an explicit database OS <=> feature?
eg:
All of the above are easily detectable with autoconf.
I however agree with you that there's absolutely no need for automake.
Re:Solution to the Problem (Score:3, Informative)
But more importantly, if you're writing application
code using a system call layer, you've already lost
the game.
Re:Solution to the Problem (Score:3, Informative)
Of course thats what ifdef is for, but ifdef isn't dangling its always:
#ifdef SOMETHING
and where do you think the SOMETHING comes from for cases like:
* Is your getservbyname_r OSF/1- or Solaris-style?
* Does your getspnam_r take 4 or 5 arguments?
* Does your struct hostent have the field h_addr_list?
*Are you on a Linux system with a broken ?
I'll tell you; auto-conf doe some checks, possibly test-compiles, basically discovers the local landscape and s
Re:Solution to the Problem (Score:1)
#define FOO(a) (a)
#elif defined (__linux__) && defined(__GNUC__)
#define FOO(a) ((a)+3&~3)
#else
#error Your system sucks
#endif
Well,if you've got to build software for Crays ... (Score:3, Interesting)
Usually, the simplest way to deal with broken scripts/automake/autoconf tests, is to use a better shell. Take the bash, tcsh, or whichever shell works on Unicos, and run your autoconf tests throught that. If you think you've found a problem in autoconf itself, run the regression test suite and submit a bug report.
A quick google search over the autoconf mailing list archive shows that there were 0 posts on Unicos in the last two years. So chances are, that any bugs in autoconf itself in the last two years have not been tested, or that it has no bugs on Unicos
If your problem is autoconf's performance, then a) use a faster shell, b) use --cache-file, c) use ccache to run those myriads of little C tests faster. Or fix the tests in question.
A classic on slow platforms is the maximum shell length test. That one comes from libtool, not from autoconf. It's been vastly improved in libtool 1.5.6, for example. If your upstream doesn't use a recent version of libtool, convince them to do so.
Damn (Score:1)
Perl? (Score:1, Flamebait)
Re:Perl? (Score:1)
Re:Perl? (Score:2)
From Perl's configure.gnu:
I have a replacement (Score:5, Interesting)
Re:how about java? (Score:2, Interesting)
Hate to say it, but ... (Score:4, Insightful)
... Those who do not understand autoconf are doomed to reinvent it. Poorly.
Re:Hate to say it, but ... (Score:2)
And I thought autoconf was just a poor reinvention of portable makefiles because programmers are too lazy to give a damn about real portability and high-quality software. It seems that the most basic abstraction in software is beyond most programmers' grasp (yeah, let's write a precompiler precompiler...that's simply genius (famous last words)).
Re:Hate to say it, but ... (Score:2)
Re:Hate to say it, but ... (Score:1)
I wish, along with libtool and all the rest.
Autotools are a nightmare (Score:3)
The incredibly frustrating, and dare I say stupid thing is that the only thing I need to "update" on my machine is the damn autoconf tools! I actually have all the libraries and headers these things need. That is completely backwards! In fact due to autoconf they have pretty much said "this only compiles on the very newest experimental Linux system". Well in that case, you have eliminated the need for "autoconf" and you could send out Makefiles that work only on a new Linux system. That would probably be easier for somebody like me to edit and get working on an older system.
When you do try to fix this, you run into the horrifyingly bad syntax and rules of M4 and GMake. Supposedly this is because they want to be back-compatable and run on older systems. But they lie when they freely add new "autoconf" commands so that the newest version is needed. Why not scrap the whole thing and try a modern syntax?
My proposed solution: make ONE compiled program that does "configure" and "make" and "make depend" (and "install" and "uninstall" and "clean" and "dist" and all the other special-cased targets...). This program can use the existing automake/conf stuff so it can be compiled for multiple platforms. The program then reads one file, in editable text (no XML, and it should be trivial to add/remove a source file by adding/deleting a line). This file should be parsed in a procedural way, with "if" and "for" statements and functions (ie it is perl or something) and the result should be the dependencies tree and it can then run the programs (the result is extremely static and has actual filenames and commands, not templates or "rules"). Make it really easy to add and remove switches to the compiler. Make it save user answers to questions in a file so it can provide those answers again, and make a gui program that provides panels and checkboxes to change those user answers. Make it automatically check for dependencies in any C style source files by looking for "#include" without running the compiler, and save the results in a binary database with date stamps so it can run this instantly as needed. Any package dependenciies should be checked with "if" statements in the file, the program would have enough commands to do typical file system things like look for files or grep a file for something, and it is then trivial to write a file that checks for something in multiple places by using "if-else" statements.
Re:Autotools are a nightmare (Score:2)
Unless I misunderstand the problem, autotools is not to blame for your woes. The way I interpret your complaint is that you did not have a build environment that satisfies the build dependencies of cairo.
Now, you might have a valid complaint that cairo does not adequately document its build requirements, or that it has build requirements
Re:Autotools are a nightmare (Score:2)
You are right that more problems were probably due to pkgconfig than autoconf. However for the average person smart enough to type "make" these all look like an inpenetrable mess and are all the same thing.
Fix on wrong level (Score:1)
There is nothing wrong with autoconf, and there is nothing wrong with new releases of software depending on the latest {autoconf|make|libc|lib|.*} whatsoever.
Take gentoo for example. After installing a minimal OS i can type emerge gnome and it will pull roughly 200 packages and compile them all cleanly. I honestly don't have any idea which of those 200 unrelated projects require which version of autoconf or whatever. Gentoo knows and deals with
Re:Fix on wrong level (Score:2)
I am starting to think the same thing. I completely understand why it is happening though. Every time behavior changes in a commonly used library or other common dependency (commercial or open source) managed by the autotools, those version changes must be reflected in the autotools.
The thing is, if you want the latest and greatest packages built from source
The only real way out... (Score:2)
This, of course, limits you to systems on which the language has been implemented but it allows you to push the burden of portability onto somebody else.
Re:The only real way out... (Score:2)
Re:The only real way out... (Score:1, Insightful)
I speak from experience, having taken many odd projects and tried to get them to work on some even odder platforms. If you are writing code that needs to be widely used, say it implements a protocol or parses a file format you hope to be standard, C is your only choice.
If you are writing in perl or python, you are doing so because it is easier for you as the developer, not because it's easier or better for the person running it. In that case, one of two th
Re:The only real way out... (Score:1)
> bogged down in the mess of portability.
This is a solution people should seriously consider -- a lot of project code doesn't need to be in C because it isn't performance-sensitive on the level that C addresses. Using a language that has a high degree of portability and the ability to extend into C for the places where you need to explicitly optimize may be a valid alternative solution to a robust configuration system. Now if only there wasn't such a
Smake? (Score:2)
Does anyone have a summary of the differences of all the various *makes?
more general question (Score:1)
after you get the hang of it, is it comfortable enough to use with all your building? or is something you add on at the end when app/project is ready for export?
I'm good enough at makefiles to make them pretty portable (i.e. it'll work on the 2-3 platforms I really care about at the time), and just have never bit the bullet and learned use autconf.
still, if I download something, and install procedure is anything besides "./configure; make; make install", I c
Re:more general question (Score:2, Informative)
autoconf has two purposes:
Converting from a plain Makefile to configure.in+Makefile.in is straightforward if your Makefile already uses variables for binaries and directories.
The main reason to use autoconf is the second point above; when you write code that uses system calls (eg read(2), write(2)) and not libc calls (eg fread(3C), fwrite(3C)), that differ be
Re:more general question (Score:1)
I have to say yes. I just converted my latest project, htop [sf.net], to autoconf and automake, and don't regret a thing. I just followed the tutorial from the info pages (yes, not the manpages, the other ones, that nobody reads :) ), wrote two files (configure.ac and Makefile.am), and everything worked.
There is also a very cool program called autoscan
Write portable code. (Score:4, Interesting)
"checking for stdlib.h..." indeed. If you don't have an ISO-C environment, you're so screwed that there's nothing autoconf can do to save you: you don't know how the language works, so whether or not you're missing a few library functions isn't going to make any difference.
I once worked on a fairly large process control system, of which less than 1% was portability code. It ran on Solaris, AIX, HP-UX (this was pre-Linux). It also ran on VMS and WinNT. Most of the portability issues dealt with the entirely different models for process management and memory-mapped files, not with pipsqueek stuff like autoconf.
It's real simple: you read the docs. You determine what the standard actually requires, not what your development system happens to do. And you program to that, then test.
As for the autotools proclaimed ability to port to systems you weren't planning for, that's so much BS. If the system is sufficiently different that ANSI C and POSIX aren't sufficient, then you're going to have to update your code anyway.
Replacing autoconf with some other crutch isn't going to help. Just ditch it entirely.
Re:Write portable code. (Score:3, Insightful)
Yours is a rather myopic and provincial view of the problem, IMHO. The autotools are a necessary evil when one has more dependencies than just ISO C. What versions of libraries are installed? What odd bugs must I work around? Where are the headers for package foo located on this system? What compiler options should I pass?
Re:Write portable code. (Score:2)
I don't think you fully grasp the problems that the autotools actually do solve for developers.
If the autotools, did, in fact, solve the problems, then I'd have less of an objection. But they don't. They merely mask the problems in copious output, unreadable logs, and bad code. Autoconf is bad enough, but when you get the atrocious automake and libtool plastered on, it's pretty much undecipherable.
The gtk/gnome approach of the *-config script is a much cleaner way of dealing with optional subsystems. Le
Re:Write portable code. (Score:2)
Quite true. The only systems that I have ever seen that work across UNIX and non-UNIX systems are all custom-made. The autotools work best at solving UNIX compatibility issues. And I think it does a fine job if that's the target.
I also agree that the gtk/gnome approach is better than some of the autoconf stuff. But it doesn't solve all of the problems that the autotools solve, such as
I propose... (Score:2, Funny)
I am struck by the recursive nature of the situation.
Shortsighted design (Score:1)
Re:Autoconf is used too much (Score:1, Insightful)
- compile programs into libraries and executables
- install executables, libraries, configuration and data files
Knowing the fact that there is no standard for shared libraries support the few lines you wrote are already a nightmare
Damien
Translation (was Re:Ant) (Score:4, Funny)
${MYLANGROXORS}
${FSCKYOU}
PARENT UNFAIRLY MODDED (Score:2)
Frequently you'll see statements like this in the INSTALL documentation of an application: "I've tested this on the following OSes: Linux (Fedora Core 1), Solaris 9 (SPARC, not x86), OpenBSD, and Plan 9. I'
Re:PARENT UNFAIRLY MODDED (Score:2)
Oh, I completely agree. Until a package is actually built on a platform, one may not know what sort of things really need to be checked for or changed by the configure script. It's also quite likely that all of autotools macros haven't been te