GNU Common Lisp

GNU Common LispをSolaris9(SPARC)にインストール。

GNUから拾ってきてサクッとインストール・・・のはずだったけど。。。



色々とトラブル多発。


gclを拾ってきて、さっくりインストールできると思ったけど・・・

./configureは問題ないのだけど、
makeではダメ、
gmakeではawkがエラーを吐く。
仕方ないので、gawkを拾ってきてインストール。
gmakeは動くようになったんだけど、次はbfd.hが無いとか言ってコンパイル途中で止まる。

調べてみたら、
/opt/sfw/includeにbfd.hがある。。。
色々調べたら、GNUbinutilsに含まれるヘッダファイルだってのが判って

# pkginfo | grep binutils
   SFWgbin         binutils - GNU binary utilities  (sparc) 2.11,REV=2003.02.08.23.10

ふ、古い。
せっかくだから入れ替えよう・・・という事で
sunfreeware.comからbinutilsを拾ってくると、今度は/usr/local/includeにインストールされた・・・。
これで大丈夫だろう、と思って再度コンパイル。

今度は
sfaslbfd.c:266: error: structure has no member named `_raw_size'
sfaslbfd.c:291: error: structure has no member named `_raw_size'
sfaslbfd.c:356: error: structure has no member named `_raw_size'
gmake[1]: *** [sfasl.o] Error 1
とか出やがるし。。。

未定義の構造体_raw_sizeを使ってる??何の?とか思って調べたら、、、
gclのページ
NEW! (20041124) Newer binutils don't define _raw_sizein their section structure. A patch is included on the errata page fixing this. The patch works with the older versions too.
とか言う記述が。新しいbinutilsでは_raw_sizeという構造体が定義されてないらしい・・・。

gcl-2.6.7のリリースが2005/8/10だから、

NEW! (20050810) GCL 2.6.7 is released. The release notes can be found here.

とっくに修正されてるはずだけど、、、。

viでsfaslbfd.cを開くと、確かに266行目、291行目、356行目で_raw_sizeを使ってる。

なんでえ??

もういい加減頭に来てたんで、直接ソースを書き換え。

# cd $SRC_DIR/o
# mv sfaslbfd.c sfaslbfd.c.bak
# cat sfaslbfd.c.bak | sed 's/_raw_size/rawsize' > sfaslbfd.c

次は無いだろとか思ったけど、、、
gcl-tk not made..missing include or lib
cd info && gmake
gmake[1]: Entering directory `/usr/local/src/gcl-2.6.2/info'
false gcl-tk.texi
gmake[1]: [gcl-tk.info] Error 1 (ignored)
false gcl-si.texi
gmake[1]: [gcl-si.info] Error 1 (ignored)
TEXINPUTS=.:$TEXINPUTS tex --interaction nonstopmode gcl-tk.texi || true
/bin/bash: tex: command not found
TEXINPUTS=.:$TEXINPUTS tex --interaction nonstopmode gcl-si.texi || true
/bin/bash: tex: command not found
makeinfo --html  gcl-si.texi
/bin/bash: makeinfo: command not found
gmake[1]: *** [gcl-si/index.html] Error 127
gmake[1]: Leaving directory `/usr/local/src/gcl-2.6.2/info'
gmake: *** [do-info] Error 2
甘かった。texinfoも必要なんか・・・orz。
SunfreewareからTexinfo拾ってきて、、と思ったけど、落としてきたらバイナリ壊れてやがんの。。。仕方無いから、GNUからソースで拾ってきてインストール。


ふぅ。



で、gclがやっとこさ動いてから気づいたんですが。。。
拾ってきたgclのバージョン。2.6.2でした。。。FSFのページでVersion 2.6.2になってた。
ページはキッチリ直してくれ!FSF!



という事で、gclは諦めて、clispを使ってみようと・・・。