Top/article/Recent-instantiation-of-octave-liboctave
English | Japanese
English | Japanese

Menu

  • Top
  • Akihiko Yamaguchi 山口 明彦
  • Project プロジェクト
  • Text テキスト
  • Recent articles 最近の記事
  • Articles 記事一覧 (a to z)
  • Search 検索

Tags タグ †

  • [c++][bash][python][latex][php]
  • [linux][windows][mac][android]
  • [math][algorithm][idea][trick]
  • [liboctave][opencv][git][ros]
  • [setting][bug][general]
↑

Recent articles 最近の記事 †

2019-07-02
  • article/Display-Unix-Time
  • article/Synchronize-Linux-Time-to-Remote
2018-09-27
  • article/python-multimode-singleton
2018-09-02
  • article/rosinstall-git-default-remote
2017-07-28
  • article/SubMenu
2017-03-05
  • article/Import-a-different-version-of-OpenCV-in-Python
2015-08-17
  • article/DRC-finals-2015
2015-01-05
  • article/Upgrade-Android-to-Lollipop
2015-01-01
  • article/Kernel-panic-of-Linux-when-using-Xtion
  • article/Do-not-skip-freeing-data-when-using-tri-mesh-in-ODE
Access: 2/2510 - Admin
These search terms have been highlighted:[liboctave]

Recent instantiation of octave and liboctave

最近の octave / liboctave インストール

[c++][liboctave]
2010-02-01

ここ最近の octave / liboctave のインストール方法についてメモ.(Debian / Ubuntu)

(追記@Feb.06,2010)共有ライブラリの指定について.

対象は Debian - lenny, squeeze あたり. Ubuntu 9.10 なども,同じ方法でよかったはず.

パッケージのインストール †

まずパッケージのインストール. octave3.0 系なら,

sudo apt-get -f install octave3.0 octave3.0-headers octave3.0-htmldoc

だけでよい. libatlas, libfftw3 などは自動で入るようになったようだ.

↑

共有ライブラリの指定 (updated at Feb. 06, 2010) †

共有ライブラリ liboctave.so はディレクトリ /usr/lib/octave-x.x.x に置かれており,普通はこのディレクトリに共有ライブラリを探しに行かない.このため, liboctave.so に依存するプログラムを実行すると,

./xxx.out: error while loading shared libraries: liboctave.so: cannot open shared object file: No such file or directory

というエラーが出る.または, ldd で共有ライブラリの対応関係を調べると, liboctave.so => not found と出力される.

よって以下のいずれかの対策が必要.

↑

リンカオプション rpath †

プログラムをコンパイルするときに(正確にはリンク段階で),

-Wl,-rpath /usr/lib/octave-`octave-config -v`

オプションをつけて g++ を実行する.すると,できあがったプログラムが探しに行く共有ライブラリの検索パスリストに /usr/lib/octave-x.x.x が加えられる. rpath (linking) - Wikipedia などを参照.

↑

環境変数 LD_LIBRARY_PATH †

環境変数 LD_LIBRARY_PATH に /usr/lib/octave-`octave-config -v` を加える.例えば tcsh なら ~/.cshrc に

setenv LD_LIBRARY_PATH /usr/lib:/usr/local/lib:/usr/lib/octave-`octave-config -v`

を加えておく.この方法は, Why LD_LIBRARY_PATH is bad - by David Barr などで述べられているように,トラブルのもとになりやすいらしい.(開発者ならともかく)ユーザが行うような設定ではないそうだ.

↑

ライブラリのシンボリックリンク †

/usr/lib に移動して,

 $ sudo ln -s libatlas.so{.3gf,}

を実効.これをしないと, liboctave を使ったプログラムのコンパイルなどで, latlas が存在しない! (/usr/bin/ld: cannot find -latlas) とか言われる.

以上.




Last-modified:2015-01-01 (Thu) 09:13:33 (3804d)
Site admin: Akihiko Yamaguchi.
Written by: Akihiko Yamaguchi.
System: PukiWiki 1.5.0. PHP 5.2.17. HTML conversion time: 0.058 sec.