Ubuntu8.04にGauche-readlineをインストール

Posted by mito Wed, 17 Dec 2008 12:50:00 GMT

Ubuntu8.04にGauche-readlineをソースからインストールしたのでログを残しておきます.

インストール手順

基本的には以下のページに書いてある手順通りなのですが,途中でエラーが出てしまいました.

第2回 Gaucheでプログラミング

% wget http://www.netlab.cs.tsukuba.ac.jp/~yokota/archive/Gauche-readline-20070707.tar.gz
% tar xzf Gauche-readline-20070707.tar.gz
% cd Gauche-readline-20070707
% ./configure
checking for gosh... /usr/bin/gosh
checking for gauche-config... no
checking for gauche-package... no
checking for gauche-install... no
checking for gauche-cesconv... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
./configure: line 3066: --so-suffix: command not found
./configure: line 3067: --object-suffix: command not found
./configure: line 3068: --executable-suffix: command not found
./configure: line 3073: --prefix: command not found
./configure: line 3075: --pkgincdir: command not found
./configure: line 3077: --pkglibdir: command not found
./configure: line 3078: --pkgarchdir: command not found
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking readline/history.h usability... yes
checking readline/history.h presence... yes
checking for readline/history.h... yes
checking for readline in -lreadline... yes
checking for rl_basic_quote_characters... yes
configure: creating Gauche-readline.gpd
./configure: line 4032: make-gpd: command not found
configure: creating ./config.status
config.status: creating Makefile

configureすると途中でいくつかcommand not foundが出ています. ここで無視してmakeするとやっぱりエラーで止まってしまいました.

% make
compile \
                --verbose \
                --cflags="-g -O2" \
                --cppflags="-DPACKAGE_NAME=\"Gauche-readline\" -DPACKAGE_TARNAME=\"gauche-readline\" -DPACKAGE_VERSION=\"20070707\" -DPACKAGE_STRING=\"Gauche-readline\ 20070707\" -DPACKAGE_BUGREPORT=\"yokota-at-netlab.cs.tsukuba.ac.jp\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_READLINE_READLINE_H=1 -DHAVE_READLINE_HISTORY_H=1 -DHAVE_LIBREADLINE=1 -DHAVE_RL_BASIC_QUOTE_CHARACTERS=1 " \
                --libs="-lreadline -lncurses" \
                readline readline.c readlinelib.stub
/bin/bash: line 1: compile: command not found
make: *** [readline.] エラー 127

このエラーはどうやらgauche-devが無いことが原因らしいのでインストールしてからもう一度試してみます.

% sudo aptitude install gauche-dev
% ./configure
% make
% make check
/usr/bin/gosh -I. test.scm > test.log
passed.
% sudo make install
/usr/bin/gauche-install -m 644 -T /usr/share/gauche/site/lib readline.scm
/usr/bin/gauche-install -m 755 -T /usr/lib/gauche/site/0.8.12/i486-pc-linux-gnu readline.so
/usr/bin/gauche-install -m 644 -T /usr/share/gauche/site/lib/.packages Gauche-readline.gpd
/usr/bin/gauche-install -m 755 --shebang=/usr/bin/gosh gosh-rl.scm /usr/bin/gosh-rl
% gosh-rl
gosh> (+ 1 2)
3

うまくいきました. 標準で入るgoshは入力した式の履歴をたどれないのが不便でしたが,これで快適に使うことが出来ます.

Posted in  | Tags