Debugging Configure
An anonymous reader writes "All too often, checking the README of a package yields only the none-too-specific "Build Instructions: Run configure, then run make." But what about when that doesn't work? In this article, the author discusses what to do when an automatic configuration script doesn't work -- and what you can do as a developer to keep failures to a minimum. After all, if your build process doesn't work, users are just as badly off as if your program doesn't work once it's built."
Well the danger with that, is the authors being deluged by people who just don't have the right dependancies installed.
Of course, it could be considered a bug if the configure script fails silently or ambiguously just because a dependancy was missing, but I see it a lot.
It'd really help if the authors would put very verbose missing dependancy messages, even as far as including a URL for the dependancies, if they aren't common.
One build that comes to mind that was total hell was Flightgear. That thing has dependancies all over the place, and not common things either.
I've had enough abrasive sigs. Kittens are cute and fuzzy.
If configure fails the first thing to do is rm -R <the sources dir>, unpack sources and try again.... this can clean up some bugs involving the temporary files and the cache configure creates when it's run.... especially if you've run configure inside that source tree before.
... :)
Infact I NEVER run configure in the same source tree twice (still smarting after bitter 2 days debugging experience that got resolved by doing exactly the above
Ah, an interesting example. You see, I recently tried to evaluate your BSDiff program. Not only could I not build it, I couldn't even figure out how to modify it to make it build - because you haven't even tried to write portable code.
For example, you rely on BSD make. That makes some sense for a BSD project, of course. But BSD make is not available on Cygwin. If you don't want to use the more widely available GNU make and its extensions, you could at least restrict your makefile to the subset of constructs that all make utilities support.
In short, I'm sticking with the portable binary diff utility, xdelta. I'm sure BSDiff is as much better as you claim, but as I can't use it, that's not much good to me, is it?
Would it be possible to have a program that read configure.in files directly, worked out what they were testing for etc, and just returned the right values?
This is what the pre-make-kit project (http://pmk.sf.net) is trying do to. The project aims to provide an alternative to autoconf. You should have a look.
The "code for checking" is all just a bunch of macros. Believe me, the slowdown you see isn't the shell reading a bunch of lines of text.
Some points that might speed things up:
You cannot apply a technological solution to a sociological problem. (Edwards' Law)