13
edits
m (Fixed Typos.) |
m (Changed numbering.) |
||
Line 3: | Line 3: | ||
This page is both concise and self-contained to allow beginners to quickly develop code for Octave. The libraries and instructions have been tested in Ubuntu 20.04. | This page is both concise and self-contained to allow beginners to quickly develop code for Octave. The libraries and instructions have been tested in Ubuntu 20.04. | ||
= VirtualBox = | = VirtualBox = | ||
# Download VirtualBox from [https://www.virtualbox.org/ virtualbox.org], install. | : 1. Create VM. | ||
# Download Ubuntu Desktop iso from [https://ubuntu.com/download/desktop ubuntu.com] | ## Download VirtualBox from [https://www.virtualbox.org/ virtualbox.org], install. | ||
## Download Ubuntu Desktop iso from [https://ubuntu.com/download/desktop ubuntu.com]. | |||
## Start VirtualBox. In 'Oracle VM VirtualBox Manager', Select: Machine -> New. In Name, put: OctaveDev; Type: Linux; Version: Ubuntu (64-bit). Adjust 'Memory size' to half of what is available. For example, if 16384 MB are available, type 8192. In 'Hard disk', select: 'Create a virtual hard disk now'. Click Create. | ## Start VirtualBox. In 'Oracle VM VirtualBox Manager', Select: Machine -> New. In Name, put: OctaveDev; Type: Linux; Version: Ubuntu (64-bit). Adjust 'Memory size' to half of what is available. For example, if 16384 MB are available, type 8192. In 'Hard disk', select: 'Create a virtual hard disk now'. Click Create. | ||
## In 'Create Virtual Hard Disk' window, under 'File size': 50 GB; 'Hard disk file type': VDI; 'Storage on physical hard disk': Dynamically allocated. Click Create. | ## In 'Create Virtual Hard Disk' window, under 'File size': 50 GB; 'Hard disk file type': VDI; 'Storage on physical hard disk': Dynamically allocated. Click Create. | ||
Line 11: | Line 11: | ||
## Double click the newly created VM to start it. Follow the prompts to install the operating system. Don't forget to add a username and a password. This tutorial has the username as 'ubuntuuser'. | ## Double click the newly created VM to start it. Follow the prompts to install the operating system. Don't forget to add a username and a password. This tutorial has the username as 'ubuntuuser'. | ||
= Dependencies = | = Dependencies = | ||
: | : 2. Install dependencies. | ||
In the Ubuntu system, open a terminal by pressing {{key press|Ctrl|Alt|t}}. Issue the following commands (tested only on Ubuntu 20.04): | In the Ubuntu system, open a terminal by pressing {{key press|Ctrl|Alt|t}}. Issue the following commands (tested only on Ubuntu 20.04): | ||
$sudo apt-get update | $sudo apt-get update | ||
$sudo apt-get install build-essential mercurial gcc g++ gfortran make libblas-dev liblapack-dev epstool transfig libglpk-dev libreadline-dev llvm-dev lpr texinfo pstoedit liboctave-dev libqhull-dev libqrupdate-dev libsuitesparse-dev texlive libxft-dev autoconf automake bison flex gperf gzip icoutils libtool perl rsync tar libpcre3-dev libarpack2-dev libcurl4-openssl-dev libfftw3-dev libfltk1.3-dev libfontconfig1-dev libfreetype6-dev libgl2ps-dev gnuplot-x11 libgraphicsmagick++1-dev libhdf5-dev libsndfile1-dev libgl1-mesa-dev libosmesa6-dev portaudio19-dev zlib1g-dev libegl1-mesa-dev libgles2-mesa-dev libwayland-client0 libwayland-cursor0 libwayland-dev libwayland-egl1 libwayland-egl1-mesa libwayland-server0 libwayland-bin libwayland-client0 texlive-plain-generic librsvg2-bin openjdk-14-jdk openjdk-14-jre openjdk-14-jre-headless openjdk-14-jdk-headless qttools5-dev-tools qtbase5-dev qtbase5-dev-tools qttools5-dev libqscintilla2-qt5-dev libqt5sql5-sqlite libqt5webchannel5 libqt5webkit5 libqt5concurrent5 libqt5designer5 libqt5designercomponents5 libqt5help5 libqt5positioning5 libqt5quickwidgets5 libqt5sensors5 libqt5sql5 qt5-assistant qt5-qmake qt5-qmake-bin libqt5core5a libqt5network5 libqt5gui5 libqt5opengl5 libqt5opengl5-dev git rapidjson-dev libsundials-dev doxygen texlive-latex-extra graphviz | $sudo apt-get install build-essential mercurial gcc g++ gfortran make libblas-dev liblapack-dev epstool transfig libglpk-dev libreadline-dev llvm-dev lpr texinfo pstoedit liboctave-dev libqhull-dev libqrupdate-dev libsuitesparse-dev texlive libxft-dev autoconf automake bison flex gperf gzip icoutils libtool perl rsync tar libpcre3-dev libarpack2-dev libcurl4-openssl-dev libfftw3-dev libfltk1.3-dev libfontconfig1-dev libfreetype6-dev libgl2ps-dev gnuplot-x11 libgraphicsmagick++1-dev libhdf5-dev libsndfile1-dev libgl1-mesa-dev libosmesa6-dev portaudio19-dev zlib1g-dev libegl1-mesa-dev libgles2-mesa-dev libwayland-client0 libwayland-cursor0 libwayland-dev libwayland-egl1 libwayland-egl1-mesa libwayland-server0 libwayland-bin libwayland-client0 texlive-plain-generic librsvg2-bin openjdk-14-jdk openjdk-14-jre openjdk-14-jre-headless openjdk-14-jdk-headless qttools5-dev-tools qtbase5-dev qtbase5-dev-tools qttools5-dev libqscintilla2-qt5-dev libqt5sql5-sqlite libqt5webchannel5 libqt5webkit5 libqt5concurrent5 libqt5designer5 libqt5designercomponents5 libqt5help5 libqt5positioning5 libqt5quickwidgets5 libqt5sensors5 libqt5sql5 qt5-assistant qt5-qmake qt5-qmake-bin libqt5core5a libqt5network5 libqt5gui5 libqt5opengl5 libqt5opengl5-dev git rapidjson-dev libsundials-dev doxygen texlive-latex-extra graphviz | ||
: | : 3. Mercurial. | ||
From the page [[Mercurial]], follow the steps under the section 'Example Mercurial configuration'. | From the page [[Mercurial]], follow the steps under the section 'Example Mercurial configuration'. | ||
= Build Directory = | = Build Directory = | ||
: | : 4. Setup the build directory. | ||
$ mkdir -p /home/ubuntuuser/projects/octave_src | $ mkdir -p /home/ubuntuuser/projects/octave_src | ||
$ cd /home/ubuntuuser/projects/octave_src | $ cd /home/ubuntuuser/projects/octave_src | ||
Line 25: | Line 25: | ||
$ ./bootstrap --force | $ ./bootstrap --force | ||
$ mkdir -p bld_dir; cd bld_dir; | $ mkdir -p bld_dir; cd bld_dir; | ||
: | : 5. Configure. | ||
$ rm * -r -f; date; ../configure -v --prefix=/home/ubuntuuser/projects/octave_src/octave_install >& configure.out; date; paplay /usr/share/sounds/gnome/default/alerts/glass.ogg | $ rm * -r -f; date; ../configure -v --prefix=/home/ubuntuuser/projects/octave_src/octave_install >& configure.out; date; paplay /usr/share/sounds/gnome/default/alerts/glass.ogg | ||
To check if any library has not been found by the configure script: | To check if any library has not been found by the configure script: | ||
$ grep -i "library not found" configure.out | $ grep -i "library not found" configure.out | ||
: | : 6. Make. | ||
$ date; make -j -l2 V=1 >& make.out; date; paplay /usr/share/sounds/gnome/default/alerts/glass.ogg | $ date; make -j -l2 V=1 >& make.out; date; paplay /usr/share/sounds/gnome/default/alerts/glass.ogg | ||
= Debug = | = Debug = | ||
: | : 7. Debugging. | ||
Note: The option ‘--enable-address-sanitizer-flags’ breaks the build, so it was removed. | Note: The option ‘--enable-address-sanitizer-flags’ breaks the build, so it was removed. | ||
From [[Debugging Octave]]: | From [[Debugging Octave]]: | ||
Line 51: | Line 51: | ||
(gdb) thread apply all break variable-editor-model.cc:928 | (gdb) thread apply all break variable-editor-model.cc:928 | ||
= Save and Patch = | = Save and Patch = | ||
: | : 8. Save your work and send patch. | ||
To save your changes to a single file: | To save your changes to a single file: | ||
$ cd /home/ubuntuuser/projects/octave_src/octave | $ cd /home/ubuntuuser/projects/octave_src/octave |
edits