Objective-C Swarmのインストール

Swarm

Swarmについて基本的なことは以下のページに既にまとめられているので
このエントリではObjective-C SwarmをLinuxにインストールする手順を中心に書きます
http://www.unfindable.net/swarm/

インストール先

VirtualBox上のCentOS 5.6 32bitにインストールします。
64bitでも動作はすると思いますが、サンプルのコンパイルがうまくできず断念しました。

インストール

必要なライブラリなどをyumからインストールしたいので
リポジトリを追加します。

EPELリポジトリの追加
# wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# rpm -ivh epel-release-5-4.noarch.rpm
CentOS Plusの有効化(もしかしたら不要かも)
# vi /etc/yum.repos.d/CentOS-Base.repo
...
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
...

のenabled=0をenabled=1にします。

ライブラリのインストール
# yum install -y tcl tcl-devel
# yum install -y tk tk-devel
# yum install -y blt blt-devel
# yum install -y hdf5 hdf5-devel
# yum install -y gcc-objc
# cd /usr/lib
# ln -s libXpm.so.4 libXpm.so
Swarmのインストール
# wget http://pj.freefaculty.org/software/Centos/5/i386/Swarm-nojava/swarm-2.4.1-1nojava.i386.rpm
# rpm -ivh swarm-2.4.1-1nojava.i386.rpm
サンプルのダウンロード・コンパイル

ここではheatbugsモデルをコンパイルしています。

$ wget http://ftp.swarm.org/pub/swarm/apps/objc/sdg/swarmapps-objc-2.2-3.tar.gz
$ tar -zxf swarmapps-objc-2.2-3.tar.gz
$ cd swarmapps-objc-2.2-3/
$ cd heatbugs/
$ make
$ ./heatbugs