1,848
edits
(Remove categories to avoid likeliness of getting here.) |
|||
(12 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Warning|This page is outdated (October 2019). For more recent information, see [[Octave for macOS]].}} | |||
== Caveats == | == Caveats == | ||
Line 21: | Line 23: | ||
===Install an Octave Port=== | ===Install an Octave Port=== | ||
MacPorts' Octave port includes the non-GPL [http://glaros.dtc.umn.edu/gkhome/views/metis METIS]. To avoid license violations do not bundle Metis with Octave and then distribute to others. In order to eliminate the Metis dependency, a local portfile may be used, and edited to remove metis. A second motivation to use a local portfile is that the portfiles for the 3.4.x and 3.6.x series did not include all dependencies for the <code>print</code> feature. The missing dependencies are [http://www.macports.org/ports.php?by=name&substr=epstool epstool], [http://www.macports.org/ports.php?by=name&substr=pstoedit pstoedit], and [http://www.macports.org/ports.php?by=name&substr=transfig transfig]. A third motivation for a local portfile is to provide additional flexibility in resolving problems with creating an Octave DMG using the <code>port mdmg ...</code> command . | MacPorts' Octave port includes the non-GPL [http://glaros.dtc.umn.edu/gkhome/views/metis METIS]. To avoid license violations do not bundle Metis with Octave and then distribute to others. In order to eliminate the Metis dependency, a local portfile may be used, and edited to remove metis. A second motivation to use a local portfile is that the portfiles for the 3.4.x and 3.6.x series did not include all dependencies for the <code>print</code> feature. The missing dependencies are [http://www.macports.org/ports.php?by=name&substr=epstool epstool], [http://www.macports.org/ports.php?by=name&substr=pstoedit pstoedit], and [http://www.macports.org/ports.php?by=name&substr=transfig transfig]. A third motivation for a local portfile is to provide additional flexibility in resolving problems with creating an Octave DMG using the <code>port mdmg ...</code> command. For macports 2.1.3, having the <code>xorg-libx11</code> as a dependency for Octave has been found to cause the <code>port mdmg octave-local ...</code> command to fail. The <code>xorg-libx11</code> dependency may be avoided by specifying <code>-x11+no_x11-docs</code> as variants and by dropping the dependence to <code>transfig</code> (which has <code>xpm</code> as a dependency and <code>xpm</code> depends upon several <code>xorg-*</code> ports. | ||
A [[Prototype MacPorts PortFile|prototype portfile]] which does not depend upon METIS and does depend upon <code>epstool</code>, <code>pstoedit</code> | A [[Prototype MacPorts PortFile|prototype portfile]] has been prepared, which does not depend upon METIS and does depend upon <code>epstool</code>, and <code>pstoedit</code> (there is no <code>transfig</code> dependency since it generates an <code>xorg-libx11</code> dependency). After [http://guide.macports.org/chunked/development.local-repositories.html creating a local portfile repository] an Octave portfile may be added to the local repository using the commands below. | ||
<nowiki>mkdir -p ~/ports/math/octave-local | <nowiki>mkdir -p ~/ports/math/octave-local | ||
cp ~/Desktop/portfile ~/ports/math/octave-local</nowiki> | cp ~/Desktop/portfile ~/ports/math/octave-local</nowiki> | ||
Line 32: | Line 34: | ||
<nowiki>sudo port install octave-local @3.6.4+atlas+fltk+gcc47</nowiki> | <nowiki>sudo port install octave-local @3.6.4+atlas+fltk+gcc47</nowiki> | ||
The use of the <code>+atlas</code> variant is encouraged as bugs exist for Apple's accelerate framework in both MacOS 10.6 and 10.7. Octave's developers have included a fix for MacOS 10.6, but the fix does not work for MacOS 10.7. There is some commentary on this in various developers discussion forums. For example, see [https://github.com/mxcl/homebrew/issues/6649 this Homebrew thread (Octave 3.4 fails on lion)], [https://stat.ethz.ch/pipermail/r-sig-mac/2011-September/008564.html this R-Sig-Mac thread (R 2.13.1-patched, vecLib problem on Lion)], and [http://list.coin-or.org/pipermail/ipopt/2011-October/002610.html the COIN-OR thread (Ipopt - problems on OS X 10.7 Lion)]. Use of Apple's accelerate framework should also be avoided for <code>arpack</code> and <code>qrupdate< | The use of the <code>+atlas</code> variant is encouraged as bugs exist for Apple's accelerate framework in both MacOS 10.6 and 10.7. Octave's developers have included a fix for MacOS 10.6, but the fix does not work for MacOS 10.7. There is some commentary on this in various developers discussion forums. For example, see [https://github.com/mxcl/homebrew/issues/6649 this Homebrew thread (Octave 3.4 fails on lion)], [https://stat.ethz.ch/pipermail/r-sig-mac/2011-September/008564.html this R-Sig-Mac thread (R 2.13.1-patched, vecLib problem on Lion)], and [http://list.coin-or.org/pipermail/ipopt/2011-October/002610.html the COIN-OR thread (Ipopt - problems on OS X 10.7 Lion)]. Use of Apple's accelerate framework should also be avoided for <code>arpack</code> and <code>qrupdate</code>. To install the recommended variants, use the <code>port</code> commands below. | ||
<nowiki>port install arpack +atlas+gcc47 | <nowiki>port install arpack +atlas+gcc47 | ||
Line 55: | Line 57: | ||
<pre>sudo port mdmg octave-devel @3.6.4+atlas+fltk+gcc47-x11+no_x11-metis+llvm32+ssl+qt</pre> | <pre>sudo port mdmg octave-devel @3.6.4+atlas+fltk+gcc47-x11+no_x11-metis+llvm32+ssl+qt</pre> | ||
<span style="color: green;"> If run from a fresh macports installation (i.e. no ports have yet been installed), then this command should complete with no errors.</span> If ports have already been installed, then errors during the execution of this command are likely and may be resolved by modifying the variant(s) of installed packages, and/or modifying the list of variants used to produce the <code>octave-local</code> DMG. <span style="color: red;">One of Octave's dependencies, <code>transfig</code>, requires port <code>xpm</code>, which requires many xorg ports that may cause the <code>port mdmg ...</code> command to fail. To alleviate this problem, the <code>transfig</code> port can be eliminated as a run-time dependency for Octave </span> (can the <code>transfig</code> portfile be modified to eliminate the <code>xpm</code> dependency?). | |||
==Create the MacOS X App Bundle== | ==Create the MacOS X App Bundle== | ||
Line 67: | Line 69: | ||
<nowiki>sudo port mdmg octave-devel @3.6.4+atlas+fltk+gcc47-x11+no_x11-metis+llvm32+ssl+qt</nowiki> | <nowiki>sudo port mdmg octave-devel @3.6.4+atlas+fltk+gcc47-x11+no_x11-metis+llvm32+ssl+qt</nowiki> | ||
In the event errors such as the one below are encountered, the ports implicated ( | In the event errors such as the one below are encountered, the ports implicated (<code> gtk2 </code> in this case) must be clean prior to creating the dmg. | ||
<nowiki> | <nowiki> | ||
Line 82: | Line 84: | ||
<pre>Portfile changed since last build; discarding previous state.</pre> | <pre>Portfile changed since last build; discarding previous state.</pre> | ||
The DMG will be placed in the port's | The DMG will be placed in the port's <code>work</code> directory. If a local portfile is used, a symbolic link to the <code>work</code> directory will be placed in the directory containing the portfile. In this instance the DMG can be found in <code>~/ports/math/octave-local/work</code>. | ||
The DMG produced using the [http://www.octave.org/wiki/index.php?title=Prototype_MacPorts_PortFile prototype portfile's] does not include everything needed for Octave. Both <code>macros.texi</code>, <code>octave.info</code>, and the <code>octave.info-#</code> files are missing. Until the cause for these missing files is identified and resolved, they will have to be copied manually to the App bundle (one possibility is that the <code>+docs</code> variant is not used. Including the <code>+docs</code> variant would bundle | The DMG produced using the [http://www.octave.org/wiki/index.php?title=Prototype_MacPorts_PortFile prototype portfile's] does not include everything needed for Octave. Both <code>macros.texi</code>, <code>octave.info</code>, and the <code>octave.info-#</code> files are missing. Until the cause for these missing files is identified and resolved, they will have to be copied manually to the App bundle (one possibility is that the <code>+docs</code> variant is not used. Including the <code>+docs</code> variant would bundle <code>texlive</code> port as well as <code>xorg-libx11</code> and several other <code>xorg-*</code> ports. | ||
===Create an Application Template for Octave=== | ===Create an Application Template for Octave=== | ||
Line 329: | Line 331: | ||
** This will allow for a fully automatic build of an App bundle from a shell script. | ** This will allow for a fully automatic build of an App bundle from a shell script. | ||
* Also use an AppleScript to record the creation of a MacOS X Octave icon. | * Also use an AppleScript to record the creation of a MacOS X Octave icon. | ||
[[Category: | |||
[[Category:Outdated pages]] |