aarelovich
aarelovich

Reputation: 5556

Error compiling Octave in Centos 7

Here is a list of the steps that I did in order to attempt to install Octave 4.2.1 in Centos 7 (repo version is 3.8.2 which is really old now)

1)   yum update
2)   yum-builddep -y octave
3)   yum -y install qt-devel mercurial gcc-c++ lapack-devel libtool
4)   yum -y install epstool transfig pstoedit qscintilla-devel 

(NOTE: First problem was right here as there is NO pstoedit in Centos 7, as far as I know)

5) sudo yum install bzip2-devel atlas-devel libsndfile-devel portaudio-devel GraphicsMagick-c++-devel
6)  ln -s /usr/lib64/atlas/libtatlas.so /usr/lib64/libatlas.so (One of the tutorials recommended doing this to fix a place where a library was being searched for or something like that. It seemed harmless enough)
7) wget ftp://ftp.gnu.org/gnu/octave/octave-4.2.1.tar.gz 
8) tar-xvf octave-4.2.1.tar.lz
9) cd octave-4.2.1
10) export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
11) ./configure --prefix=/usr/local/octave/versions/4.2.1
12)  make -j4

It failed with this error:

In file included from libgui/src/settings-dialog.cc:31:0:
libgui/src/ui-settings-dialog.h:13:29: fatal error: QtWidgets/QAction: No such file or directory
 #include <QtWidgets/QAction>

Has anyone come up with this problem and has some workaround or solution? Thanks

Upvotes: 0

Views: 633

Answers (2)

Alex
Alex

Reputation: 2126

Or you can just use Flatpack to install the latest version of Octave without any hassle:

flatpak install flathub org.octave.Octave
flatpak run org.octave.Octave

CentOS 7 already comes with built-in Flatpack app, but your distro doesn't have one you can install it:

sudo yum install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Official website: https://flatpak.org/setup/

Upvotes: 0

Michael
Michael

Reputation: 5335

QtWidgets/QAction is specific to Qt5, and it seems that when you executed yum-builddep -y octave it got dependencies for Qt4. Configure octave with the option --with-qt=4. Another option is to install qt5 libraries and its devel files, configure --with-qt=5, and make.

Upvotes: 3

Related Questions