id:m-hiyama:20050708:1120794311の件。HOLをWindowsで動かしたい、なんて人がそういるとは思えないから、「檜山用メモ」。
一番の問題は、僕が"winNT"と書くべき所を"WinNT"と書いてしまったこと。OS名がcase-sensitiveに判断されるので、変なビルドプロセスが実行されてしまった。
それ以外に、Moscow MLのCインターフェースを使うところで失敗していたのを調べると:
config.h:
#elif defined(WIN32) #include "../config.w32/m.h" #include "../config.w32/s.h"
と書いてあるが、../config.w32/ なんてない。Peter Sestoftにメールで問い合わたところ:
It is a mistake that they are not included in the binary.
だそうだから、すぐに直るだろう。念のため、Windows(WIN32)用のm.hとs.hは:
#undef MOSML_BIG_ENDIAN #undef ALIGNMENT
#define HAS_MEMMOVE #define HAS_BCOPY #define sighandler_return_type void /* #define BSD_SIGNALS */ #define HAS_RENAME /* #define HAS_UTIMES */ #define HAS_DUP2 #define HAS_SELECT /* #define HAS_SYMLINK */ /* #define HAS_WAITPID */ #define HAS__SETJMP
C言語を使う部分を捨てれば、Cコンパイラなどは不要。build.smlを見て、
fun build_dir dir = let val _ = FileSys.chDir dir val _ = print ("Working in directory "^dir^"\n") in case #file(Path.splitDirFile dir) of "muddyC" => (* ゴニョゴニョ *) | "smv.2.4.3" => (* ゴニョゴニョ *) | _ => Holmake dir end (* ゴニョゴニョ *)
caseの"muddyC"と"smv.2.4.3"を落としてしまう。または、val SRCDIRS0 =
の定義から、"muddyC"と"smv.2.4.3"を削除しておく。
僕は、Prosper(http://www.dcs.gla.ac.uk/prosper/toolkit/)からHOLを使うつもりだから、どうせCインターフェースを使うだろうと、一応Cコンパイラも準備。MinGW+MSYSにしました、結局。GNU makeを別途調達(e.g. http://www.steve.org.uk/Software/make/)するなら、MSYSはなくても大丈夫。
んで、4度目のビルドで:
C:\Installed\hol\tools>..\bin\build > buildlog-4.txt /bin/sh.exe: bison: command not found mv: cannot stat `grammar.tab.c': No such file or directory "make": *** [grammar.c] Error 1 C:\Installed\hol\tools>
あうー、bisonは入れてなかった。bison/flexはたしかhttp://gnuwin32.sourceforge.net/packages.html にあったような。
でも、HOL自体は動いてます。Prosperのサイトがここんとこ落ちているので、F-Developer(http://kt.jaist.ac.jp/project/FOAM/Fdeveloper/)でも試してみようか。