Compile Octave on openSUSE 11.3 [Update 2]

Update: The science package for openSUSE contains a recent and working Octave package, see this blog post. It is not necessary to compile your own package.

There is no adequate octave package for openSUSE with SuiteSparse support, therefore one has to compile it manually. The following steps will install all dependencies for Octave 3.2.4, then compile octave, create a rpm package and install it on openSUSE 11.3.

1. add some additional sources (if not already available)
zypper ar http://download.opensuse.org/repositories/home:/zacarias/openSUSE_11.3/ zacarias
zypper ar http://download.opensuse.org/repositories/home:/ars3niy:/octave/openSUSE_11.1/ ars3niy

2. we will need the following packages incl. some devel packages; install:
zypper in automake bison build fftw3 fftw3-devel flex fltk \
fltk-devel libfltk1 libftgl2 ftgl ftgl-devel \
gcc-c++ gcc-fortran glpk glpk-devel libglpk0 libtool \
gmp-devel libgmp3 gnuplot gperf ImageMagick \
ImageMagick-devel libGraphicsMagick++3 libGraphicsMagick++-devel \
libbz2 libbz2-devel libcurl libcurl-devel \
hdf5 hdf5-devel libltdl3 make ncurses ncurses-devel \
pcre pcre-devel readline readline-devel texinfo zlib zlib-devel
and from the zacarias repository
zypper in arpack-X3 libqhull5 libqhull5-devel libqrupdate1 \
libqrupdate1-devel qhull-2003 suitesparse suitesparse-devel

3. install octave source package from the ars3niy repository
sudo zypper source-install octave

4. edit /usr/src/packages/SPECS/octave.spec and add an additional entry to the “%files” section
%{_datadir}/applications/

5. compile the package according to the spec file
cd /usr/src/packages/SPECS
sudo rpmbuild -ba octave.spec

6. install the packages (this depends on your architecture, e.g. for x86_64)
cd /usr/src/packages/RPMS/x86_64
sudo rpm --install octave*.rpm

3 Responses to “Compile Octave on openSUSE 11.3 [Update 2]”


Comments are currently closed.