chikuchikugonzalezの雑記帳

趣味とか日記とかメモとか(∩゚д゚)

CygwinでGHCを使おうとして挫折した話

タイトル通り、挫折しました(´・ω・`)

ビルドできねぇとかどうしろと(´・ω・`)

先に結論

д゚) つ Haskell Platform

とりあえず

最新版をconfigureするとまぁ、こうなります

$ ./configure --disable-hc-boot
checking for gfind... no
checking for find... /usr/bin/find
checking for sort... /usr/bin/sort
checking for ghc... no
configure: error: GHC is required unless bootstrapping from .hc files.

しかたないので

GHCのサイト (The Glasgow Haskell Compiler) を参考に

  • GHC 7.6.2
  • GHC 7.0.4
    • 7.6.2 のビルドに必要
  • GHC 6.10.4
    • 7.0.4 のビルドに必要
  • GHC 6.6.1
    • 6.10.4 のビルドに(ry
  • GHC 5.04.3
    • 6.6.1 の(ry
  • GHC 4.08.2
    • 5.04 (ry
    • これは単独でconfigureできる(`・ω・´)

のソースを取得します

4.08 をconfigureしてみよう

configure結果*1

$ ./configure --disable-hc-boot

*** The top of your build tree is: /home/Kenichi/ghc/ghc-4.08.2
checking host system type... i686-pc-cygwin
checking target system type... i686-pc-cygwin
checking build system type... i686-pc-cygwin
Canonicalised to: i386-unknown-cygwin32

~~~ ずらずらとchecking hogehoge が~~~

creating ./config.status
creating ghc.spec

************************************************
*** NOW DO: gmake boot followed by gmake all
***         (where gmake == GNU make)
************************************************

キタ━(゚∀゚)━! とマジで思いました。

さぁ、ビルド(`・ω・´)

$ make boot
~~ ビルドログが色々出る ~~
$ make all
~~ ビルドログが ~~
gcc -I../../../includes    -c main.c -o main.o
In file included from main.c:32:0:
cgprof.h:81:14: 警告: built-in function ‘log’ declared as non-function
gcc -I../../../includes    -c cgprof.c -o cgprof.o
In file included from daVinci.h:24:0,
                 from cgprof.c:25:
cgprof.h:81:14: 警告: built-in function ‘log’ declared as non-function
cgprof.c: In function ‘readRawProfile’:
cgprof.c:1186:15: 警告: " 文字での終端を欠いています
cgprof.c:1186:3: error: " 文字での終端を欠いています
cgprof.c:1187:11: error: stray ‘\’ in program
cgprof.c:1187:13: 警告: " 文字での終端を欠いています
cgprof.c:1187:11: error: " 文字での終端を欠いています
cgprof.c:1187:12: error: ‘n’ undeclared (first use in this function)
cgprof.c:1187:12: note: each undeclared identifier is reported only once for each function it appears in
cgprof.c:1189:3: error: expected ‘)’ before ‘free_cc_matrix’
cgprof.c:1190:1: error: expected ‘;’ before ‘}’ token
../../../../mk/suffix.mk:127: recipe for target `cgprof.o' failed
make[4]: *** [cgprof.o] Error 1
../../../mk/target.mk:84: recipe for target `all' failed
make[3]: *** [all] Error 1
../../mk/target.mk:84: recipe for target `all' failed
make[2]: *** [all] Error 1
../mk/target.mk:84: recipe for target `all' failed
make[1]: *** [all] Error 1
mk/target.mk:84: recipe for target `all' failed
make: *** [all] Error 1

( ゚д゚)

んで、

諦めました(ノ`Д´)ノ彡┻━┻゛:∴

いやー、コンパイルエラー直す気にはならんわー

これ見た後だとrubyのビルドは楽なんじゃないかとか思うわ、割りと本気で

ちなみに私のHaskell歴は↓の本の前半くらいです

ふつうのHaskellプログラミング ふつうのプログラマのための関数型言語入門

ふつうのHaskellプログラミング ふつうのプログラマのための関数型言語入門

*1:なお、実はconfigureスクリプトの835行目付近のi[3456]86-*-cygwin32* を i[3456]86-*-cygwin* に書き換えてます