« Installing Gtk2Hs on MacOS | Main | Much Ado About Parentheses »

Compiling regex-posix in Haskell for Windows

WIth a coworker, I just had a problem with a fresh installation of Haskell Platform on Windows, for which we couldn't find a ready fix online. Here's what happened on how we fixed it, in hopes of helping others work around it.

The package regex-posix-0.94.2, which was installed as part of haskell-platform-2010.2.0.0, had a bug in its installation script where it didn't properly locate a dependent library (the libregex package) and so it would fail to link when it was loaded.

Mailing list traffic identified that this was the core problem, and it sounded well understood, so that a fix ought to have been made, although it wasn't obvious; I was able to see that regex-posix had a newer version, 0.94.4, and while unable to find a changelog for that package, I conjectured that this might have the fix. So I upgraded the regex-posix package, as follows:

cabal install regex-posix-0.94.4

Apparently, the cabal upgrade regex-posix command might have had the same effect.

Then we had to reinstall the packages that depended on it, which we were able to determine using the

ghc-pkg dot

output. In our case, the reinstall commands were as follows:

cabal install --reinstall test-framework
cabal install --reinstall test-framework-hunit
cabal install --reinstall test-framework-quickcheck2

It seems that, until we did this, these packages still depended on the old versions. Oddly, when we ran cabal install --reinstall regex-compat, it kept its dependency on the old regex-posix, even though regex-compat's .cabal file didn't have a version limitation barring the new version. Anyone know what's up with that?

Seemingly Haskell Platform should be point-released with a dependency on the newer regex-posix. I shall have to talk to Haskell Platform folks about whether this is the right thing.

Update Two further mailing-list posting about this: from Sept 2010 and Nov 2010.

Comments

Good day! I just want to offer you a big thumbs up for the excellent information you've got here on this post. I am coming back to your blog for more soon.

Post a comment