アフィリエイト広告を利用しています

2024年05月31日

システム管理: Gauche をインストールする

Gauche (Scheme Scripting Engine) をインストールしたい.
以前 Gauche 0.9.12pre-p1 をインストールしたきりで, その後のアップデートを行っていない.

スクリプト言語として, あらためて Gauche を使っていきたいので一からインストールする.
まず最新版の Gauche 0.9.15 をインストールし, それを用いて開発版 Gauche をコンパイル・インストールする.

Gauche のインストールスクリプト get-gauche.sh を取得する.

$ curl https://raw.githubusercontent.com/shirok/get-gauche/master/get-gauche.sh \
-o get-gauche.sh

get-gauche.sh の中で GNU tar を使用しているので, 次のように変更する.

--- get-gauche.sh.orig Fri May 31 11:11:06 2024
+++ get-gauche.sh Fri May 31 11:11:18 2024
@@ -368,7 +368,7 @@ function do_fetch_and_cd {
echo "Failed URL:" $API/$desired_version.tgz
exit 1
fi
- tar xf Gauche-$desired_version.tgz
+ gtar xf Gauche-$desired_version.tgz
rm Gauche-$desired_version.tgz
# The actual directory name may differ when $version is latest or snapshot
cd Gauche-*

現在インストールしてある旧バージョンの Gauche (手元の環境の場合は 0.9.12pre-p1) をアンインストールする.

$ bash ./get-gauche.sh --uninstall --sudo

スクリプトの実行がうまく行った場合 /usr/local 以下に変更を加えるので, 念のため '--sudo' オプションを指定している.

Gauche を ダウンロード・インストール する.

$ bash ./get-gauche.sh --keep-builddir

ここでは, スクリプトによるインストールが途中で失敗した時に後から対応しやすいように '--keep-builddir' オプションを指定している.

実行するとスクリプトから gmake check が実行される際にエラー:

Signals delivery fails constantly at GC #4
Signals delivery fails constantly
Abort trap (core dumped)
・ ・ ・ ・
Total: 39480 tests, 39473 passed, 7 failed, 2 aborted.

が発生する.
インストールプログラムはエラーで終了した (core が生成される).

残しておいた作業ディレクトリーに移動し, コマンドラインで

$ cd builddir/Gauche-0.9.15/
$ ./configure --prefix=/usr/local --mandir=/usr/local/share/man --infodir=/usr/local/info
$ gmake
$ gmake check
$ doas gmake install

を実行し, Gauche をインストールする.

以上の準備の元で, 開発版 Gauche をインストールする.

$ git clone https://github.com/shirok/Gauche.git
$ cd ./Gauche
$ ./DIST gen
$ AUTOCONF_VERSION="2.71" AUTOMAKE_VERSION="1.16" \
./configure --prefix=/usr/local --mandir=/usr/local/share/man \
--infodir=/usr/local/info

ここで, configure スクリプト実行時に,

checking thread type...
configure: WARNING: Gauche with pthread on OpenBSD has unresolved issues.
We recommend you to build without threads (--disable-threads)
unless you're trying to fix the issues.
See https://github.com/shirok/Gauche/issues/276 and
https://github.com/shirok/Gauche/issues/334 .

という警告が出るが, 現在の Gauche では configure スクリプトの '--disable-threads' オプションは無くなっているようなので, そのまま gmake を実行する. スレッドは pthread ライブラリが使用されるが, これは後で gmake check によるテスト時にエラーとなる.

$ gmake
$ gmake check -k
・ ・ ・ ・
Total: 39549 tests, 39546 passed, 3 failed, 2 aborted.
$ doas gmake install

これで Gauche のコンパイル・インストールが完了する.

$ gosh -V
Gauche scheme shell, version 0.9.15-p1 [utf-8,pthreads], x86_64-unknown-openbsd7.4
(version "0.9.15-p1")
(command "gosh")
(scheme.id gauche)
(languages scheme r5rs r7rs)
(encodings utf-8)
(website "https://practical-scheme.net/gauche")
(build.platform "x86_64-unknown-openbsd7.4")
(build.configure "--prefix=/usr/local" "--mandir=/usr/local/share/man" "--infodir=/usr/local/info")
(scheme.path "/usr/local/share/gauche-0.98/site/lib" "/usr/local/share/gauche-0.98/0.9.15-p1/lib")
(threads pthreads)
(gauche.net.tls)
この記事へのコメント
コメントを書く

お名前:

メールアドレス:


ホームページアドレス:

コメント:

この記事へのトラックバックURL
https://fanblogs.jp/tb/12572471

この記事へのトラックバック
ファン
検索
<< 2024年06月 >>
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30            
最新記事
最新コメント
眼科の定期検査 〜 散歩 by コトタマ (02/15)
眼科の定期検査 by 三文字寄れば文殊のヒフミヨ (09/21)
本を読んで過ごす by 底彦 (12/13)
本を読んで過ごす by ねこ (12/12)
数学の計算をする by 底彦 (12/04)
タグクラウド
カテゴリアーカイブ
仕事(59)
社会復帰(22)
(40)
コンピューター(203)
(1381)
借金(8)
勉強(7)
(12)
数学(97)
運動(8)
日常生活(1337)
(201)
健康(34)
読書(20)
プロフィール

ブログランキング・にほんブログ村へ
にほんブログ村
にほんブログ村 メンタルヘルスブログ うつ病(鬱病)へ
にほんブログ村
にほんブログ村 科学ブログ 数学へ
にほんブログ村
にほんブログ村 IT技術ブログ プログラム・プログラマーへ
にほんブログ村