Problems Installing and/or Building 2.0.20 on ubuntu 14.04

Hello!

I am having issues installing the 2.0.20 deb on Ubuntu 14.04. The original topic for this issue as well as some discussion on attempted fixes:

I have moved the discussion here by request of ArduPilot member billbonney

I am now working on a fresh installation of 14.04 and have added the QT 5.5.1 PPA as suggested by billbonney.


If I try to install the .deb I get the following output:

sudo dpkg -i apm_planner_2.0.20_ubuntu_trusty64.deb 
Selecting previously unselected package apmplanner2.
(Reading database ... 420984 files and directories currently installed.)
Preparing to unpack apm_planner_2.0.20_ubuntu_trusty64.deb ...
Unpacking apmplanner2 (2.0.20) ...
dpkg: dependency problems prevent configuration of apmplanner2:
 apmplanner2 depends on libflite1 (>= 1.4-release-9~); however:
   Version of libflite1:amd64 on system is 1.4-release-8ubuntu0.1.
 apmplanner2 depends on libqt5core5a (>= 5.4.0); however:
   Version of libqt5core5a:amd64 on system is 5.2.1+dfsg-1ubuntu14.3.
 apmplanner2 depends on libqt5gui5 (>= 5.3.0) | libqt5gui5-gles (>= 5.3.0); however:
   Version of libqt5gui5:amd64 on system is 5.2.1+dfsg-1ubuntu14.3.
  Package libqt5gui5-gles is not installed.
 apmplanner2 depends on libstdc++6 (>= 5.2); however:
   Version of libstdc++6:amd64 on system is 4.8.4-2ubuntu1~14.04.3.
dpkg: error processing package apmplanner2 (--install):
 dependency problems - leaving unconfigured`

Using apt-get -f install does not fix the dependency issues.

If I use gdebi to check dependencies it tells me:

This package is uninstallable
Dependency is not satisfiable: libflite1 (>= 1.4-release-9~)


After not making any progress on trying to install the .deb, Iā€™ve tried following the instructions on the github page to build from source.

When I try to run qmake qgroundcontrol.pro I get the following:

Project MESSAGE: Qt version 5.2.1
Project MESSAGE: Linux build x64_86
Project MESSAGE: Ubuntu Build
Project MESSAGE: Release flavor
Project MESSAGE: BASEDIR /home/swarmview/apm2-workspace/apm_planner DESTDIR /home/swarmview/apm2-workspace/apm_planner/release TARGET apmplanner2
Project MESSAGE: Skipping support for QUpgrade
Project MESSAGE: Using mavlink  + ardupilotmega
Project MESSAGE: Skipping support for OpenSceneGraph
Project MESSAGE: Skipping support for Google Earth
Project MESSAGE: Skipping support for Protocol Buffers
Project MESSAGE: Skipping support for libfreenect
Project MESSAGE: Adding ALGLIB /home/swarmview/apm2-workspace/apm_planner/libs/alglib
Project MESSAGE: Skipping support for XBee
Project MESSAGE: Skipping support for Magellan 3DxWare (manual override from command line)
Project MESSAGE: Skipping support for Opal-RT
Project MESSAGE: Skipping support for Google Earth
Project MESSAGE: Skipping support for Camera View
Project ERROR: Unknown module(s) in QT: quickwidgets

I am unable to run make after the qmake command. I see that the output message states that the Qt Version is 5.2, and in the github instructions it says it needs to be upgraded at least 5.4.2. Iā€™m guessing this might have something to do with the issue?

When I ran the apt-get commands to install qt components I had the 5.5.1 PPA added to my repositories (and I ran apt-get update), is there any additional configuration needed to make sure I am using the correct Qt version?

Sorry if these are trivial problems, but am a novice to linux and i am not sure how to proceed. I need to use Ubuntu 14.04 to run ROS Indigo.

No worries, we will get to the bottom of this.
Did you run sudo apt-get dist-upgrade after sudo apt-get update?

Thanks for layout this all out, I am having a similar problem.

The essence for me is that a released .deb should work on at least the current LTS Ubuntu release (14.04), and should not need fiddles to get it to install and run.

I get the following error now when I run it:

Unable to load ApmToolbar.qml. Please reinstall the application and try again. Errors are as follows:
file:///usr/share/APMPlanner2/qml/ApmToolBar.qml:17:1: module ā€œQtQuickā€ is not installed

apmplanner2 then runs, but the graphical toolbar is missing.

If you do:

sudo apt-get update
sudo apt-get install libflite1
dpkg -s libflite1

What version of libflite1 is installed?

@PeeBee Ubuntu 16.04 LTS (Xenial Xerus) is the current release. :slight_smile: We are trying to get away from 14.04 since the required Qt version is not easily available.

1 Like

@carpy
I had not yet run dist-upgrade, but after doing so I seem to receive the same errors.

@fnoop
The libflite1 that is installed is version 1.4-release-8ubuntu0.1. According to this: http://packages.ubuntu.com/trusty/libs/ that version is the most recent available on Trusty

Ok, 16 LTS has just been released. But 14.04 is supported until 2019, so its not cool to force an early upgrade on anyone who wants to use ApmPlanner

@Hidden_Markov
Hi, the package must have been built incorrectly somehow, these are the dependencies specified in the package metadata:

Depends: libasound2 (>= 1.0.16), libc6 (>= 2.14), **libflite1 (>= 1.4-release-9~)**, libgcc1 (>= 1:4.1.1), libqt5core5a (>= 5.4.0), libqt5gui5 (>= 5
.3.0) | libqt5gui5-gles (>= 5.3.0), libqt5network5 (>= 5.0.2), libqt5opengl5 (>= 5.0.2) | libqt5opengl5-gles (>= 5.0.2), libqt5printsupport5 (>=
 5.0.2), libqt5qml5 (>= 5.0.2), libqt5quick5 (>= 5.0.2) | libqt5quick5-gles (>= 5.0.2), libqt5script5 (>= 5.0.2), libqt5serialport5 (>= 5.1.0), 
libqt5sql5 (>= 5.0.2), libqt5svg5, libqt5test5 (>= 5.0.2), libqt5widgets5 (>= 5.2.0), libsdl2-2.0-0 (>= 2.0.0), libsndfile1 (>= 1.0.20), libssl1
.0.0 (>= 1.0.0), libstdc++6 (>= 5.2), zlib1g (>= 1:1.1.4), qtdeclarative5-qtquick2-plugin | qml-module-qtquick2

These arenā€™t in the project control file:
https://github.com/ArduPilot/apm_planner/blob/master/debian/control
So they must be added at packaging time on a machine with higher libflite version than standard, at a guess.

@fnoop The control file gets regenerated/modified at build/packaging time.

Ok, I finally had a chance to look at this problem closely.
Use this guy instead. He was built using Qt 5.4.2 static libs. (The VM that the apm_planner_2.0.20_ubuntu_trusty64.deb package was built on is gone, so itā€™s hard for me to troubleshoot.)

sudo apt-add-repository ppa:beineri/opt-qt542-trusty
sudo apt-get update
sudo apt-get install qt-latest
source /opt/qt54/bin/qt54-env.sh
sudo dpkg -i apm_planner_2.0.23-rc1_ubuntu_trusty64.deb
apmplanner2

@carpy

Thank you for the new build. Sorry for the late reply, I was away. I was able to install apmplanner2 using the instructions you posted, but unfortunately when I start apmplanner I receive this error message:

"Unable to load ApmToolbar.qml. Please reinstall the application and try again. Errors are as follows:
file:///usr/share/APMPlanner2/qml/ApmToolBar.qml:17:1: module "QtQuick" is not installed"

Line 17 is just ā€œimport QtQuick 2.0ā€

After the error message the rest of APM planner seems to launch okay, but I am missing the toolbars and the primary flight display.

A similar problem I found suggests installing qtdeclarative5-qtquick2-plugin, but I already have that installed and at the newest version (I believe install qt-latest installed this plugin).

@Hidden_Markov I got this same error when testing. Make sure you are setting the environment correctly so it points to Qt 5.4.2.

source /opt/qt54/bin/qt54-env.sh

@carpy
Hmm Iā€™ve made sure that I have been using that source command (Iā€™ve tried with and without --extend). Unfortunately I still receive the same error

Iā€™ve checked the paths that the .sh file add and it seems fine there.

echo $PATH
/opt/qt54/bin:/opt/ros/indigo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

echo $LD_LIBRARY_PATH
/opt/qt54/lib/x86_64-linux-gnu:/opt/qt54/lib:/opt/ros/indigo/lib

echo $PKG_CONFIG_PATH
/opt/qt54/lib/pkgconfig:/opt/ros/indigo/lib/pkgconfig

Edit1: I still cant get the .deb install to work properly, however I am now able to manually build and run apm_planner by using ā€œsource /opt/qt54/bin/qt54-env.shā€ before the qmake command in the build tutorial. When I run my own build, I no longer have the missing QtQuick module error.

Edit2: My problems are now basically solved, since I can now run my own build without issues. Iā€™ve been able to connect my erle-brain2 and pfxmini quads to APM and everything seemingly works (still havenā€™t flown yet).

Thank you very much @carpy for your help!

1 Like

Glad you got it going. Still a mystery regarding the PATH problemā€¦Iā€™ll so some digging when I can.

The easiest way to put APM Planner on Linux Ubuntu machine is to download the installer from here http://download.qt.io/official_releases/qt/ Qt5.4 or greater and then grab the code and build it in QtCreator or the command line.

It will work with 14.04LTS

The issue is building pre-built packages for 14.04 etcā€¦ This requires more effort and work and needs a ppa, or embedded qt binaries in the installer. If somebody wants to step up and build the needed ppa that would be great. In the meantime itā€™s the limited set of prebuilt packages.

We are maintaining compatibly at the code level with older distros, so you wonā€™t need an OS version update.

Hope that helps :slight_smile:

1 Like

Thanks billb. Hopefully that ā€˜somebodyā€™ will pick this up and create the embedded binaries or ppa! :slight_smile:

OMG, this is driving me crazy :pensive:
Trying to use @carpyā€™s DB solution, I get the same error as @Hidden_Markov about the toolbars.
And trying to follow the build tutorial using source /opt/qt54/bin/qt54-env.sh, as he suggested, ends in the following compilation error:
`In file included from /opt/qt54/include/QtGui/qopenglcontext.h:54:0,
from /opt/qt54/include/QtGui/QtGui:32,
from libs/opmapcontrol/src/mapwidget/mapgraphicitem.h:35,
from libs/opmapcontrol/src/mapwidget/gpsitem.h:34,
from libs/opmapcontrol/src/mapwidget/gpsitem.cpp:28:
/opt/qt54/include/QtGui/qopengl.h:122:21: fatal error: GL/gl.h: No existe el archivo o el directorio

include <GL/gl.h>

                 ^

compilation terminated.`

So Iā€™m a bit lost now (Iā€™m a newbie at both Linux and Ardupilot).

How did you finally solved this issue with the toolbar? I have had the same problem.
any help will be greatly appreciated thanks

How did you finally solved this issue with the APM toolbar? I have had the same problem.any help will be greatly appreciated thanks

Create a symbolic link with this command:
sudo ln -s /opt/qt54 /usr/local/Qt-5.4.2