So, I'm trying to compile up binutils today and I get "makeinfo not found".
Oh, crap. Check for packages. Oh, hey, I actually *do* have texinfo
installed. It's even on my default path.
Uh, oh.
Check the config.log. It finds makeinfo, and then promptly installs the
"can't find makeinfo" code into the makefile.
Ah, crap. Yes, I'm talking about autocrap^H^H^H^Htools. So, I dig
through multi-layers of crap upon crap and come up with:
case " $build_configdirs " in
*" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;;
*)
# For an installed makeinfo, we require it to be from texinfo 4.4 or
# higher, else we use the "missing" dummy.
if ${MAKEINFO} --version \
| egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
:
else
MAKEINFO="$MISSING makeinfo"
fi
;;
esac
So, what do we have here? We have a double failure.
First, see that MAKEINFO="$MISSING makeinfo"? Sure you do. But did the
idiot who wrote this think to actually put a statement in there that
says "HEY! Doofus! Your version of makeinfo is X and you need Y. The
test which says this is at line ZZZ?" You know, just so I might
actually be able to locate the failing configure test (which is always
the case). You know, just like every other bloody configure test. I
know, typing an echo statement is just so difficult. Of course, given
that this was probably copied from a different version check in the single
original m4 script written 200 years ago, it probably is.
However, the bug is actually in the egrep line.
Sure, you'd think that hunting for a pure version number rather than
text would be useful, but no, that's not the problem ...
And, you'd think maybe that hunting for say *makeinfo* rather than
texinfo might be a good idea, but no, that's not the problem...
No, may I direct your attention to the "([1-3][0-9]|4\.[4-9]|[5-9])"
That is a test that we're greater than version 4.4, right?
Wrong.
Of course, actually using a regular expression to generate two numbers
for major and minor version and stuffing them into variables isn't
something that True Hackers(tm) do. Oh, no. It's much spiffier to do
it in a single impenetrable regex that doesn't work. Oh, yes, feel the
burn.
So, which versions does that pass?
1.X -- fails - okay
2.X -- fails - fine
3.X -- fails - good
Um, nice version check folks, but wait, there's more ...
[5-9].X -- absolutely, no problem here
10-39.X -- okay, God help anybody when makeinfo passes version 39.X
Of course, the autotools will still be around and broken when that happens.
Now, the observant will notice that I skipped 4.X. Let's examine that,
shall we ...
4.0 -- fail -- nice
4.1 -- fail -- good
4.2 -- fail -- also good
4.3 -- fail -- ditto
4.4 -- pass -- fine, just as we expect
4.5 through 4.9 -- all pass -- nifty
So, what about version 4.10? FAIL
Oh, my. Regexes match lexicographically and that's a numeric compare.
And saving those 4 lines to stuff things into variables and do a numeric
test is just *sooooo* much bother.
And, so sorry that you found this, but we never actually test anything.
We're open source hackers, you see. Please file a bug report that we
will close arbitrarily because we're too afraid to actually touch an m4
script.
[EMAIL PROTECTED]&*()[EMAIL PROTECTED]&*()[EMAIL PROTECTED]&*()!!!!!!!!!!,
-a
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list