タンスの肥やしは多いほうがいいかもしれない件

hugを使っているのだが、ここにきてコンパイルの必要が生じ、泣く泣くVistaにGHCをインストールする(やや大げさ)。

ところが、

> ghc foo.hs -o foo

などとやると、

gcc: installation problem, cannot exec `as': No such file or directory

と怒られる。なんだそりゃ。GHCの最新バージョンはさすがに安定してないのかなあ、などと、ひとつ前のバージョン(6.6)に戻したりしたものの、状況は変わらず。

エラー表示をそのままぐーぐる様にお供えしたところ、「lang.haskell.glasgow.bugs」を示していただいた。ありがたいありがたい。

このMLのアーカイブによると、なんのことはない、ghcに含まれている(!?)gccのライブラリを環境変数PATHに与えてやらなければならないのだった。ははは。VistaのRC1、RC2から発見されているバグみたいなんだけど、これはいまだに(最新バージョンは2007年の4月26日リリース)修正されていないわけか。うむむむ。

というわけで、VistaでHaskellしてみようというヒトは、ghcのPATHを設定する際に忘れずにgcc-libも一緒に設定するとよいことがあるような気がする。

で、なにしろ、gccまで放り込まれるってのはどういうこと? とディレクトリを覗いていたら、gccだけじゃなくて、perlまで放り込まれていたのことよ。

> cd c:\bin\ghc
> perl --version

This is perl, v5.6.1 built for MSWin32-x86

Copyright 1987-2001, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.

> gcc --version
gcc (GCC) 3.4.5 (mingw special)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

いやはや。