# 2023-08-11 # # Compiling Octave (an oldish one that we happened to have) for Raspberry Pi .. in fact, a Raspberry Pi Zero W # # Wanted a minimal one for command-based interaction with data - no need even for plotting. # This record is in case needed packages, configure-options, or reminder of swap-requirement are needed on another such occasion. # increase swap, from the default 100 MB # without this, the compilation was killed for out-of-memory after 5h or so # vi /etc/dphys-swapfile # increase size to 2048 [MiB](as 32-bit system max, supposedly) /etc/init.d/dphys-swapfile restart # activate free Mem: 429 Swap: 2047 # add compiler + libraries required for the build # apt install gfortran apt install libblas-dev apt install liblapack-dev apt install libpcre++-dev libpcre2-dev apt install libreadline-dev readline-common # optional # get and unpack source # ssh 10.1.1.1 cat /home/public/sfw/unix_progs/octave/octave-5.1.0.tar.xz | xzcat -d | tar -xpf - cd octave-5.1.0 # configure with pretty-near nothing optional enabled (readline, and pcre since pcre is needed for the build anyway) # ./configure --prefix=/opt/octave/5.1.0 --enable-readline --enable-dependency-tracking --disable-option-checking --disable-largefile --disable-threads --disable-64 --disable-atomic-refcount --disable-openmp --disable-libtool-lock --disable-no-undefined --disable-cross-tools --disable-rpath --disable-jit --disable-fftw-threads --disable-java --disable-docs --disable-hg-id --disable-qhull --enable-pcre --without-z --without-bz2 --without-hdf5 --without-fftw3 --without-fftw3f --without-glpk --without-curl --without-sndfile --without-portaudio --without-x --without-framework-carbon --without-opengl --without-framework-opengl --without-freetype --without-fontconfig --without-q --without-qscintilla --without-fltk --without-qrupdate --without-suitesparseconfig --without-amd --without-camd --without-colamd --without-ccolamd --without-cholmod --without-cxsparse --without-umfpack --without-klu --without-sundials_nvecserial --without-sundials_ida --without-arpack # make # note ... the following is after already several hours of compilation that was stopped # when it ran out of memory (with about 450MB RAM and the default Raspbian 100MB swap) # 5 hours into the work; so it then, with 2048MB swap, took some 11h more to finish off! # swap useage went up to nearly 1GB at the peak (logged each few seconds) Octave successfully built. Now choose from the following: ./run-octave - to run in place to test before installing make check - to run the tests make install - to install (PREFIX=/opt/octave/5.1.0) HG ID for this build is "hg-id-disabled" real 670m50.592s user 539m44.209s sys 25m26.695s