Editing Building on Ubuntu Virtual Machine

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 12: Line 12:
## Back to 'Oracle VM VirtualBox Manager', select OctaveDev, click on Settings. In System, select Processor tab. Adjust the number of CPUs to half of what is available, since this will speed up the compilation and responsiveness of the VM. For example, if you have 8 cores, select 4. In Storage, under 'Controller: IDE', select Empty. Under Attributes, click on the disk icon (shown on the right), then select 'Choose a disk file ...'. Browse and select the iso file previously downloaded. Click OK.
## Back to 'Oracle VM VirtualBox Manager', select OctaveDev, click on Settings. In System, select Processor tab. Adjust the number of CPUs to half of what is available, since this will speed up the compilation and responsiveness of the VM. For example, if you have 8 cores, select 4. In Storage, under 'Controller: IDE', select Empty. Under Attributes, click on the disk icon (shown on the right), then select 'Choose a disk file ...'. Browse and select the iso file previously downloaded. Click OK.
## 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'.
## After the installation procedure is finished: restart the Ubuntu system, open a terminal by pressing {{key press|Ctrl|Alt|t}}. Issue the following commands : $ sudo apt-get update; $sudo apt-get install gcc make perl
## After the installation procedure is finished: restart the Ubuntu system, open a terminal by pressing {{key press|Ctrl|Alt|t}}. Issue the following commands : $sudo apt-get update; $sudo apt-get install gcc make perl
## In the VirtualBox window select Devices, then 'Insert Guest Additions CD Image...', and follow the prompts. After the installation is finished, restart the Ubuntu system.
## In the VirtualBox window select Devices, then 'Insert Guest Additions CD Image...', and follow the prompts. After the installation is finished, restart the Ubuntu system.
= Dependencies =
= Dependencies =
: 2. Install 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-16-jdk openjdk-16-jre openjdk-16-jre-headless openjdk-16-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-16-jdk openjdk-16-jre openjdk-16-jre-headless openjdk-16-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.
: 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'.
Line 30: Line 30:
     $ mkdir -p bld_dir; cd bld_dir;
     $ mkdir -p bld_dir; cd bld_dir;
: 5. Configure.
: 5. Configure.
     $ rm * -r -f; ../configure -v --prefix=/home/ubuntuuser/projects/octave_src/octave_install >& configure.out;
     $ 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.
: 6. Make.
     $ make -j 4 V=1 >& make.out
     $ date; make -j 4 V=1 >& make.out; date; paplay /usr/share/sounds/gnome/default/alerts/glass.ogg
= Debug =
= Debug =
: 7. Debugging.
: 7. Debugging.
Line 41: Line 41:
     $ cd /home/ubuntuuser/projects/octave_src/octave
     $ cd /home/ubuntuuser/projects/octave_src/octave
     $ mkdir -p dbg_bld_dir; cd dbg_bld_dir;
     $ mkdir -p dbg_bld_dir; cd dbg_bld_dir;
     $ rm * -r -f; ../configure -v --prefix=/home/ubuntuuser/projects/octave_src/octave_install_dbg FFLAGS=-g CFLAGS=-g CXXFLAGS=-g >& configure.out
     $ rm * -r -f; date; time ../configure -v --prefix=/home/ubuntuuser/projects/octave_src/octave_install_dbg FFLAGS=-g CFLAGS=-g CXXFLAGS=-g >& configure.out; date; paplay /usr/share/sounds/gnome/default/alerts/glass.ogg
     $ make -j 4 V=1 >& make.out
     $ date; time make -j 4 V=1 >& make.out; date; paplay /usr/share/sounds/gnome/default/alerts/glass.ogg
     $ echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
     $ echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
     $ ./run-octave --gui
     $ ./run-octave --gui
Please note that all contributions to Octave may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Octave:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)