Preferred ubuntu version for a dev VM?

setting up a linux virtualbox VM, wasn’t sure if there was a preferred or ‘to be avoided for now’ version of Ubuntu to use? I noticed that Octave for Debian systems - Octave lists depenency one-liners that are version specific but only go up to v20.04, while has prebuild Ubuntu VMs for 21.10 and 22.04. I seem to also recall someone mentioning difficulty upgrading from an older version to v22(?) and wasn’t sure if there might still be a reason to avoid the latest one.

I have ubuntu 22.04 on x86_64 laptop and arm64 (Raspberry PI) board and do not see any particular problems.

I’ve also updated to Ubuntu 22.04 without issues.

Is it expected that the 20.04 one liner will still work as is for later versions or are their any obvious additions/changes?

It probably is missing some deps. I did this one-liner and then kept adding some stuff manually until all
dependencies are satisfied. It is a good first approximation.

I was looking at something on my long overdue to-do list about a Windows-centric newbie setting up a linux build environment, and seeing how well the dev/build docs instructions guided you through.

I gave up on WSL until I move to Win 11, so instead I setup a VM with the latest Ubuntu and started playing around, but I didn’t really keep track of what i was doing, upgrading, etc. When I got around to trying to build instructions, ./bootstrap wouldn’t even complete. So I decided to restore to a vanilla install and keep better track of things on round two. Thought I’d ask this question before I dove back in and ran into any problems.

The ‘adding stuff manually’ when starting sorta blind may be biggest hurdle. the instructions appear really simple, until they don’t work, then you’re off googling for clues with no hints provided if you aren’t already fairly familiar with autotools.

When bootstrap fails it usually tells you what is missing. So you just install those.
I think the one-liner is to build from tarball not from mercurial snapshots, so some tools are probably missing.

p.s. dvipng and dvisvgm appears to be missing, those are run-time deps for latex plotting.

I think the one-liner is to build from tarball not from mercurial snapshots

Ahh. Building - Octave doesn’t make that distinction. I’ll try to keep a running list for 22.04 and see if I can compile a full list.

The dependencies that are installed in the rule for the CI on GitHub should be pretty complete. At least they are enough to build and run the test suite in a pretty vanilla Ubuntu …

Edit: Link to the commands that installs the packages on Ubuntu in the CI build rule:
octave: 74d97efb7573 .github/workflows/make.yaml (
That is currently:

          sudo apt -qq update
          sudo apt install -y $COMPILER_PKGS autoconf automake bison ccache \
            dvipng epstool fig2dev flex gfortran gnuplot-x11 gperf gzip \
            icoutils libarpack2-dev libblas-dev libcurl4-gnutls-dev \
            libfftw3-dev libfltk1.3-dev libfontconfig1-dev libfreetype6-dev \
            libgl1-mesa-dev libgl2ps-dev libglpk-dev libgraphicsmagick++1-dev \
            libhdf5-dev liblapack-dev libosmesa6-dev libpcre3-dev \
            libqhull-dev libqscintilla2-qt5-dev libqrupdate-dev \
            libreadline-dev librsvg2-bin libsndfile1-dev libsuitesparse-dev \
            libsundials-dev libtool libxft-dev make openjdk-8-jdk \
            perl portaudio19-dev pstoedit qtbase5-dev qttools5-dev \
            qttools5-dev-tools rapidjson-dev rsync tar texinfo \
            texlive-latex-extra xvfb zlib1g-dev

COMPILER_PKGS is either gcc g++ or clang depending on whether you like to build with one or the other.

I think you also need dvisvgm. It is not a critical error (compile and check will finish), but some
tests will be skipped.

p.s. I just checked – it is needed for proper “make doc”. Without it I see:

  GEN      doc/interpreter/spcholperm.pdf
sh: line 1: dvisvgm: command not found
warning: latex_renderer: a run-time test failed and the 'latex' interpreter has been disabled.
warning: called from
    text at line 218 column 10
    plotimages at line 107 column 7

But it is not a fatal error.

That seems to get pulled in by one of the other packages:
maint: Merge stable to default. · gnu-octave/octave@ddbbd60 (

The following additional packages will be installed:
  aglfn avahi-daemon ca-certificates-java cmake cmake-data dh-elpa-helper
  dvisvgm fltk1.3-doc fluid fonts-droid-fallback fonts-lmodern fonts-mathjax

When I upgraded to 22.04 I did

apt-get build-dep octave

to have the Ubuntu distribution automatically calculate the required dependencies. I think this is better than using one of the 1-line rules which may not have have been updated yet (as you found). I think I still needed to add a package or two after that, but the build messages were clear about what was missing.

That is probably a good start. But the list in the build rules for the CI might be a bit more up-to-date (especially if there are new dependencies, e.g., when building the default branch).

from a fresh minimal install of Ubuntu 22.10, after just doing post-install updates, apt-get build-dep octave wants to intstall:

aglfn autoconf automake autopoint autotools-dev binutils binutils-common
binutils-x86-64-linux-gnu bison build-essential ca-certificates-java cmake
cmake-data debhelper debugedit default-jdk default-jdk-headless default-jre
default-jre-headless dh-autoreconf dh-elpa-helper dh-strip-nondeterminism
dpkg-dev dwz epstool fig2dev flex fonts-lmodern fonts-mathjax g++ g++-11
gawk gcc gcc-11 gettext gfortran gfortran-11 gnuplot-data gnuplot-nox gperf
hdf5-helpers ibverbs-providers icoutils icu-devtools imagemagick-6-common
intltool-debian java-common libaec-dev libaec0 libamd2 libaom-dev libaom3
libarchive-zip-perl libarpack2 libarpack2-dev libasan6 libasound2-dev
libatomic1 libbinutils libblas-dev libblas3 libbrotli-dev libbtf1
libbz2-dev libc-dev-bin libc6-dev libc6-i386 libcamd2 libcc1-0 libccolamd2
libcholmod3 libclang1-14 libcolamd2 libcombblas1.16.0 libcrypt-dev
libctf-nobfd0 libctf0 libcurl4-gnutls-dev libcxsparse3 libdav1d-dev
libdav1d6 libde265-0 libde265-dev libdebhelper-perl libdeflate-dev
libdouble-conversion3 libdpkg-perl libegl-dev libemf1 libevent-2.1-7
libevent-core-2.1-7 libevent-dev libevent-extra-2.1-7
libevent-openssl-2.1-7 libevent-pthreads-2.1-7 libexif-dev libexpat1-dev
libfabric1 libfftw3-bin libfftw3-dev libfftw3-double3 libfftw3-long3
libfftw3-mpi-dev libfftw3-mpi3 libfftw3-quad3
libfile-stripnondeterminism-perl libflac-dev libfltk-cairo1.3
libfltk-forms1.3 libfltk-gl1.3 libfltk-images1.3 libfltk1.3 libfltk1.3-dev
libfontconfig-dev libfontconfig1-dev libfreetype-dev libfreetype6-dev
libgcc-11-dev libgfortran-11-dev libgfortran5 libgl-dev libgl2ps-dev
libgl2ps1.4 libglpk-dev libglpk40 libglu1-mesa-dev libglx-dev libgmp-dev
libgmpxx4ldbl libgraphicsmagick++-q16-12 libgraphicsmagick++1-dev
libgraphicsmagick-q16-3 libgraphicsmagick1-dev libhdf5-103-1
libhdf5-cpp-103-1 libhdf5-dev libhdf5-fortran-102 libhdf5-hl-100
libhdf5-hl-cpp-100 libhdf5-hl-fortran-100 libhdf5-mpi-dev
libhdf5-openmpi-103-1 libhdf5-openmpi-cpp-103-1 libhdf5-openmpi-dev
libhdf5-openmpi-fortran-102 libhdf5-openmpi-hl-100
libhdf5-openmpi-hl-cpp-100 libhdf5-openmpi-hl-fortran-100 libheif-dev
libheif1 libhwloc-dev libhwloc-plugins libhwloc15 libhypre-2.23.0
libhypre-dev libibverbs-dev libibverbs1 libice-dev libicu-dev libitm1
libjack-jackd2-dev libjbig-dev libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev
libjs-jquery libjs-jquery-ui libjs-mathjax libjsoncpp25 libklu1
liblapack-dev liblapack3 liblcms2-dev libldl2 libllvm14 liblqr-1-0 liblsan0
libltdl-dev liblua5.4-0 liblzma-dev libmagick++-6.q16-8
libmagickcore-6.q16-6 libmagickwand-6.q16-6 libmd4c0 libmetis5 libmongoose2
libmumps-5.4 libmumps-dev libmumps-headers-dev libncurses-dev
libncurses5-dev libnetpbm11 libnl-3-dev libnl-route-3-dev libnsl-dev
libnuma-dev libogg-dev libopenmpi-dev libopenmpi3 libopus-dev libpcre16-3
libpcre2-16-0 libpcre3-dev libpcre32-3 libpcrecpp0v5 libpetsc-real-dev
libpetsc-real3.16 libpetsc-real3.16-dev libpetsc3.16-dev-common libplot2c2 libpmix-dev libpmix2 libpng-dev libportaudio2 libportaudiocpp0
libpsm-infinipath1 libpsm2-2 libpstoedit0c2a libptexenc1
libpthread-stubs0-dev libptscotch-7.0 libptscotch-dev libqhull-dev
libqhull-r8.0 libqhull8.0 libqhullcpp8.0 libqrupdate-dev libqrupdate1
libqscintilla2-qt5-15 libqscintilla2-qt5-dev libqscintilla2-qt5-l10n
libqt5concurrent5 libqt5core5a libqt5dbus5 libqt5designer5
libqt5designercomponents5 libqt5gui5 libqt5help5 libqt5network5
libqt5opengl5 libqt5opengl5-dev libqt5positioning5 libqt5printsupport5
libqt5qml5 libqt5qmlmodels5 libqt5quick5 libqt5quickwidgets5 libqt5sensors5
libqt5sql5 libqt5sql5-sqlite libqt5test5 libqt5webchannel5 libqt5webkit5
libqt5widgets5 libqt5xml5 libquadmath0 librbio2 librdmacm1 libreadline-dev
librhash0 librsvg2-bin libscalapack-mpi-dev libscalapack-openmpi-dev
libscalapack-openmpi2.2 libscotch-7.0 libscotch-dev libsigsegv2 libsliplu1
libsm-dev libsndfile1-dev libspqr2 libssl-dev libstdc++-11-dev
libsub-override-perl libsuitesparse-dev libsuitesparseconfig5
libsundials-arkode3 libsundials-cvode4 libsundials-cvodes4 libsundials-dev
libsundials-ida4 libsundials-idas3 libsundials-kinsol4
libsundials-nvecparallel-hypre4 libsundials-nvecparallel-mpi4
libsundials-nvecparallel-openmp4 libsundials-nvecparallel-petsc4
libsundials-nvecparallel-pthread4 libsundials-nvecserial4
libsundials-sunlinsol2 libsundials-sunmatrix2 libsuperlu-dev
libsuperlu-dist-dev libsuperlu-dist7 libsuperlu5 libsz2 libteckit0
libtexlua53-5 libtexluajit2 libtext-unidecode-perl libtiff-dev libtiffxx5
libtirpc-dev libtool libtrilinos-amesos-13.2 libtrilinos-aztecoo-13.2
libtrilinos-aztecoo-dev libtrilinos-epetra-13.2 libtrilinos-epetraext-13.2
libtrilinos-galeri-13.2 libtrilinos-ifpack-13.2 libtrilinos-kokkos-13.2
libtrilinos-ml-13.2 libtrilinos-ml-dev libtrilinos-teuchos-13.2
libtrilinos-trilinosss-13.2 libtrilinos-trilinosss-dev
libtrilinos-triutils-13.2 libtrilinos-zoltan-13.2 libtrilinos-zoltan-dev
libtsan0 libubsan1 libucx0 libumfpack5 libvorbis-dev libvulkan-dev
libwebp-dev libwmf-dev libx11-dev libx265-199 libx265-dev libxau-dev
libxcb-xinerama0 libxcb-xinput0 libxcb1-dev libxdmcp-dev libxext-dev
libxft-dev libxml-libxml-perl libxml-namespacesupport-perl
libxml-sax-base-perl libxml-sax-perl libxml2-dev libxnvctrl0 libxrender-dev
libyaml-dev libzip4 libzstd-dev libzzip-0-13 linux-libc-dev
lto-disabled-list m4 make mpi-default-bin mpi-default-dev netpbm
ocl-icd-libopencl1 ocl-icd-opencl-dev opencl-c-headers opencl-clhpp-headers
openjdk-11-jdk openjdk-11-jdk-headless openjdk-11-jre
openjdk-11-jre-headless openmpi-bin openmpi-common petsc-dev pkg-config
po-debconf portaudio19-dev pstoedit qdoc-qt5 qhelpgenerator-qt5
qt5-assistant qt5-qmake qt5-qmake-bin qtattributionsscanner-qt5 qtbase5-dev
qtbase5-dev-tools qtchooser qttools5-dev qttools5-dev-tools rapidjson-dev
rpcsvc-proto t1utils tex-common texinfo texlive-base texlive-binaries
texlive-fonts-recommended texlive-latex-base texlive-plain-generic
trilinos-dev uuid-dev valgrind valgrind-mpi x11proto-dev xorg-sgml-doctools
xtrans-dev zlib1g-dev

haven’t stumbled through the next part yet because I’m trying to make virtualbox shared folder permissions behave.

1 Like

circling back to this. I’d had a problem where virtualbox wanted it’s host/guest shared folder to be unchangeabley owned by root. Then spent a while trying to understand why it it would regularly hang at the login screen, and periodically freeze. Coming from a fresh ubuntu install on fairly generic hardware, it’s a bit disappointing.

So I gave up and jumped over to VMWare. I may go back and troubleshoot in the Vbox forums later.

After getting the VMWare with a fresh Ubuntu 22.04 to let me my user profile own and manage the cloned octave source, I allowed the OS to complete any post install updates, then did a sudo apt upgrade, installed git and mercurial, then ran sudo apt-get build-dep octave. Same package install list as above.

So, Linux neophyte, following the steps at Building - Octave, ./bootstrap on an up-to-date clone errors out. Ran the 22.04 one-liner from Octave for Debian systems - Octave and got the same bootstrap output. It appears i have all dependencies listed on the build page.

./bootstrap output attached.

I’m seeing a lot of ‘Consider adding…’ ‘don’t forget to’ … lines in the boostrap output, and the main error is that it failed to create a symbolic link as operation not permitted. (sudo makes no difference, and i believe shouldn’t be needed.)

Before I start making the suggested changes, are these warnings indicative of having missed an earlier step? I can just start doing things it says i should ‘consider doing’ blindly, but would like to document the why.

bootstrap-output.txt (21.1 KB)

You should not need to do any of the things that are displayed at the end of the bootstrap run.

We should only be calling gnulib functions from our own wrappers and those files in liboctave/wrappers should already be using the necessary include files to ensure that they use the gnulib replacement functions if necessary.

The Makefile variables should already be used where needed and the “Don’t for get to” things should already be done.

But it is possible that we have missed something or added a new gnulib module and forgotten to add the necessary flags, so if you’d like to verify that we are up to date that would be helpful.

I’m not sure why you are seeing the error at the end about creating a link to the move-if-change script.

well. that’s interesting. I created a new octave source clone in a non-shared location ( ~/sources/octave, vs before in ~/shared/dev where dev is a VM guest/host shared folder). despite being fairly certain it was mounted as a folder with full user permissions, putting it in the new location made the difference. bootstrap runs with no problem in the new location. I had gotten the exact same permission problem under both virtualbox and vmware. so… we’ll call this lesson #1. (running through the rest of the steps now. if anything isn’t straightforward, will update.)

Maybe it happens because the shared location is a Windows filesystem that doesn’t support symbolic links?

that would make a lot of sense. it’s ntfs which i think should be okay, but both VBx and VMW mount it with some nonstandard driver (VMW: vghgfs-fuse, VBx: not sure but i think does it as a virtual network share)

I did just find the following, though:

Oracle VM VirtualBox shared folders also support symbolic links, also called symlinks, under the following conditions:

  • The host operating system must support symlinks. For example, a Mac OS X, Linux, or Oracle Solaris host is required.

  • Currently only Linux and Oracle Solaris Guest Additions support symlinks.

  • For security reasons the guest OS is not allowed to create symlinks by default. If you trust the guest OS to not abuse the functionality, you can enable creation of symlinks for a shared folder as follows:
    VBoxManage setextradata "VM name" VBoxInternal2/SharedFoldersEnableSymlinksCreate/sharename 1

I might set that up again and give it a try, and look for something similar with VMW.

It’s probably a good move that you now build on a native file system (even if inside the VM). Using a Windows network share as the build or source directory would probably go and bite you in multiple ways.