CentOS 4でoctaveインストール

Post date: 2010/02/28 7:59:28

1.octave-3.0.5.tar.gzを入手

2./configure --prefix=/home/xxx/anagix_tools を実行

以下のメッセージは出るがコンパイルはするので無視

To compile Octave, you will need a recent versions of

* the following software:

*

* GNU Make (a recent version)

*

* g++ (preferably a recent 4.x version, though later

* 3.x versions may also work)

*

* flex (2.5.4 or a more recent version) -- required if

* you need to recreate lex.cc from lex.l

*

* bison (1.31 or a more recent version) -- required if

* you need to recreate parse.cc from parse.y

*

* gperf (3.0.1 or a more recent version) -- required if

* you need to recreate oct-gperf.h from octave.gperf

make & make_install

3. gem install octave-ruby -- --with-octave-include=/home/anagix/anagix_tools/include/octave-3.0.5/octave --with-octave-lib=/home/anagix/anagix_tools/lib/octave-3.0.5 --with-dep-include=/home/anagix/anagix_tools/include/octave-3.0.5

これでインストールOK

以下は、3.2.4での失敗談

1.octave-3.2.4.tar.gz を入手

2. g++ version 3.4.6 will probably fail to compile Octaveとしかられたので

yum install gcc4 と yum install gcc4-c++ を実行

3../configure --prefix=/home/xxx/anagix_tools を実行

注意:その前に環境変数を 以下のように設定する必要あり

export CC=gcc4

export CXX=g++4

4. 続いてoctave-rubyのインストールに取りかかったところ

gem install octave-ruby -- --with-octave-include=/home/moriyama/anagix_tools/include/octave-3.2.4/octave --with-octave-lib=~/an

agix_tools/lib/octave-3.2.4 --with-dep-include=~/anagix_tools/include/octave-3.2.4

で以下のエラー

octave-ruby.cpp: In function 'void recover_from_exception()':

octave-ruby.cpp:20: error: 'octave_allocation_error' was not declared in thi\

s scope

octave-ruby.cpp: In function 'VALUE or_feval(VALUE, VALUE)':

octave-ruby.cpp:44: error: 'curr_sym_tab' was not declared in this scope

octave-ruby.cpp:44: error: 'top_level_sym_tab' was not declared in this scop\

e

make: *** [octave-ruby.o] Error 1

gem install octave-ruby

yum install lapackの必要あり?

(2013.8.1追記) Ubuntu 13.04に、gem installすると、octave/config.hがないというエラー。octaveをソースからコンパイルしても結果は同じ。

octave/config.h missingなどでgoogleすると、そもそもinstallしたinclude directoryに確かに config.hが存在しない。ソースからコピーすれば

良かった。config.hを添付するが、どのようにconfigureしたかで異なるに違いない。よって、ソースからコンパイルするしかないか。

gem installは以下で問題なかった。

gem install octave-ruby --no-ri --no-rdoc -- --with-octave-include=/usr/local/anagix_tools/include/octave-3.6.4/octave --with-octave-lib=/usr/local/anagix_tools/lib/octave-3.6.4 --with-dep-include=/usr/local/anagix_tools/include/octave-3.6.4

Building native extensions. This could take a while...

Successfully installed octave-ruby-2.0.3

1 gem installed