2015年10月6日火曜日

[Mac] OS X Yosemite にMacPortsを用いてOctaveをインストール

Mac OS X Yosemite にOctaveをインストールした(正確には,インストールできなかった)際のメモです(XCode, Command Line Tolls, gcc,gfortranがインストールされている前提です.MacPortsを用いたgccのインストールはこちら).

ターミナルから以下のように入力すると,パスワード入力を求められるので,入力するとインストールが始まります.
$ sudo port install octave +atlas
Password:

ズラズラと以下のようにインストールが始まり,"---> Building atlas"と表示された時点で,コメントが流れるのが止まります(ちなみに,Mac Book Airでは,ファンが回りつづけました).カーソルは点滅を続けます.
--->  Computing dependencies for octave
(この間に,様々なコメントが流れます)
--->  Building atlas

そして,長い時間をかけて,ビルドが続くのですが,エラーが出てしまいました(ちなみに,エラーが出るまでに6時間くらいかかります).

エラーは,以下のようなものです.
--->  Staging octave into destroot
Error: org.macports.destroot for port octave returned: command execution failed
Please see the log file for port octave for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_octave/octave/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port octave failed
$ octave
-bash: octave: command not found

当然,Octaveを起動しようとしても,起動しません.

Octave のwikiページ(Octave for MacOSX)で調べてみると,以下のような記載がありました.

MacPortsに関する記載によると,インストールできると書いてあります.

MacPorts[edit]

MacPorts, formerly called DarwinPorts, is a package management system that simplifies the installation of software on the Mac OS X and Darwin operating systems. It is a free/open source software project to simplify installation of other free/open source software. Similar in aim and function to Fink and the BSDs' ports collections, DarwinPorts was started in 2002 as part of the OpenDarwin project, with the involvement of a number of Apple Inc. employees including Landon Fuller, Kevin Van Vechten, and Jordan Hubbard.

Simple Installation Instructions[edit]

  • Install "XCode" via the Mac App Store and the "XCode Command Line Tools" as described at MacPorts' installation instructions.
  • If you had installed Mac Ports in the past already, update it first by typing sudo port selfupdate and sudo port upgrade outdated in the terminal.
  • MacPorts has good support for Octave. A list of what MacPorts has available for Octave is here. To install the most recent version of Octave, type sudo port install octave or if you want the experimental graphic user interface (GUI) sudo port install octave +gui at the Terminal's command line. Octave has many dependencies which will be downloaded and installed prior to Octave. The entire installation process can take a few hours.
  • Note that octave-devel has been replaced by octave, see MacPorts Revision 114034.
  • The variant installed may be important to the user's experience. The available variants for  octave are displayed by typing port variants octave. In MacPorts 2.3.3 the variants atlasgcc49 and glgui are installed by default (marked with '+' sign in port variants octave output). For the experimental GUI add variant +gui (see above). If you need Java support add the new Java variant (+java).
  • Octave depends on arpack. Unfortunately arpack is installed with the accelerate variant by default. The accelerate variant uses Apple's Vector Libraries which have some known bugs that can cause Octave to crash if using certain functions in arpack. To avoid this install arpack with the atlas instead of the accelerate variant sudo port install arpack -accelerate+atlas. You can even do this after you installed Octave. The new variant become active by default.
  • If Octave crashes when plotting use the Gnuplot graphic toolkit instead of FLTK. Type graphics_toolkit('gnuplot') in Octave before plotting. For using the nicer wxt-terminal of Gnuplot, type setenv("GNUTERM","wxt") in Octave. To make this the standard behavior append both commands in one of Octave's startup files e.g. your ~/.octaverc.

同じページ内を見ていると,Octaveを仮想マシンにインストールする方法に関しての記載もあります.
Yosemite対応のバイナリがアップデートされていないということなのでしょうか....

Octave server VM installer for OSX 10.10 Yosemite[edit]

Configuration files that cause Vagrant to automatically download and configure an Octave server VM under OS X including 10.10 Yosemite. The install process pulls down the latest stable Linux version of Octave at the time of installation. All software used in running this server VM is open source (Vagrant, VirtualBox, Octave). The Octave server will run headless, and display the Octave GUI and graphics on the host via the Mac's native X-windows server. The recommended configuration ensures that by default user files written by the GUI are in a folder shared with the Mac's filesystem, and the VM suspends automatically when the user quits the GUI. Any edited files then persist in the Mac's shared folder.


こちらのページによると,homebrewだと,インストールできるようなのですが,MacPortsと競合するらしいので,MacPortsをアンインストールすると,今までにMacPorts経由でインストールしたアプリケーション等も一緒にアンインストールされてしまう問題があり,とりあえず,放置することにしました.

0 件のコメント :

コメントを投稿