You are here: home :: 2004 :: 12 :: 13

Mon, 13 Dec 2004

A collection of some remarks about running GNU Autotools (autoconf/automake/libtool) under Mingw. In summary, I succeeded in getting autuconf/automake/libtool to run with the Mingw compiler under Windows, along with pkg-config, shared libraries, and GTK+ 2.0. There are a few steps that I found problematic, and here's how to get past them.

First, install MSYS and the MSys Developer Toolkit.

Next, you need to install the GTK development environment; from here seems a very good place. In order to get things to work nicely with pkg-config, it is advisable to install it in the same directory MSYS was installed in.

Also, I think, though I'm not sure, I built my own pkgconfig because the one shipped with GTK didn't work too well for me. Go figure.

If you need intltool for Win32, that's a bit troublesome because it depends on an XML library for Perl so you'd want to have ActiveState Perl rather than the one shipped with Msys. I used the package from cygnome (edit the files in bin to set the prefix right), which didn't quite work but was enough to convince my configure script that it was actually there.

I edited the gtk+-2.0.pc file to add -mms-bitfields to the cflags, which is nessacary to get applications to run out-of-the-box without specific Win32 checks.

Also, you'll probably get an error like this:

Warning: linker path does not have real file for library ...
This seems to be a bug or problem in the Libtool ltmain.sh script. Selectively commenting things out probably should help though:
#if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
#   | ${SED} 10q \
#   | $EGREP "$file_magic_regex" > /dev/null; then
   newdeplibs="$newdeplibs $a_deplib"
   a_deplib=""
   break 2
#fi

Finally, if you get an error message that Windows requires all symbols to be resolved and thus only static libraries are built. Luckily, this is easily fixable as well, by adding -no-undefined to the LDFLAGS like this:

monitor_la_LDFLAGS = -module @FAM_LIBS@ -no-undefined
After takin these hurdles, you should be able to build fairly advanced Unix applications under Windows with the Autotools without problems. For examples, refer to the Posadis source code (particularly, the poslib, pos6, dnsquery2 and zoneedit repositories): CVS tree.

Posted at 22:57 - [/projects] - permanent link

A small follow-up to my previous story. Basically, in a story about the chances of Bush against Kerry for the presidency of the USA, a Dutch magazine claimed that succesful people often have surnames in the first half of the alphabet. I argued that a little investigation carried out by me does not support that theory.

First, my statitics were flawed. I feel pretty ashamed, being a mathematician and all, but I remembered that my hypothesis (the null hypothesis) should actually have been "There is no signifficant correlation...", and based in the proof I should have concluded there was no reason to doubt the truth of the null hypothesis. Still, the outcome would be the same.

Also, I discovered the likely source where this piece of misinformation in the Psychologie magazine came from: the Economist ran an article called "As easy as ZYX" in their print edition on August 30th 2001, apparently written by The Economist's Pam Woodall. Much anecdotical evidence there, but no real justification:

Can this merely be coincidence? One theory, dreamt up in all the spare time enjoyed by the alphabetically disadvantaged, is that the rot sets in early.
So without actually answering the question of coincidence, the article jumps to shaky psychological explanations of why it might be the case, where I say: yes, this is merely coincidence.

The story was propagated even further a day after its publication in the Economist, when the BBC carried the story both on their website and in Radio 4's Today programme. Funny quotes of people taking this just a bit too serious here:

It sounds fair, it sounds random, what it means is systematic discrimination against those at the bottom of the alphabet. [The only solution is to stop alphabetical order] in its tracks.

It would be interesting to know how much research Pam Woodall actually did on this, though it probably was just a bit of easy filler in the thin summer months. And besides, we are talking about economists here, whose whole job consists of applying statistics and other mathematics religiously in places it doesn't belong, and we're talking about the magazine whose essay competition's winning entry contains the following beautiful non-sentence:

Ingenuity will be given free rein and the syneries we so badly need to solve this international crisis can finally come together
Umm... right... ?

Posted at 22:29 - [/misc] - permanent link