QtQuick.Controls pinned to specific version 2.2?
tl;dr: Tried to build from source but couldn't get past a QtQuick versioning issue. Wrote a suggested README.md section for those building on Ubuntu which serves double duty: 1) sets context for my issue below and 2) helps the next person (maybe).
I tried to build linphone 09/28/2019 from sources with HEAD 4a43f00e3180b0699023bfe1a0d8f33eafaa851b
. I was eventually able to compile successfully and run the executable linphonec
but not linphone
.
Based on last night's exercise, I've written a "Ubuntu Troubleshooting" section for README.md
. Use it as your see fit. It also provides context for my error below.
I understand this is a long post, but I'm helping you to help me (to quote Jerry McGuire). Feel the quan.
For README.md
:
Ubuntu Troubleshooting
- Python3 is now the Ubuntu default python on Ubuntu 18.04 and
later (https://wiki.ubuntu.com/BionicBeaver/ReleaseNotes).
To run python2, you have two options. Install pyenv,
then install a python 2.7 and then set that
version locally in your local project root (which I personally think is a cleaner solution, but involves
more work). Or you can install python2 using
apt
. If you go theapt
route, then you (confusingly) makepython2
the system defaultpython
- Via
apt
:
# apt update && apt upgrade -y # prep python2 install
# apt install -y python2
# type python # bash
python is /usr/bin/python
# python -V
Python 2.7.16
# pip install --upgrade pip
# pip install six pystache graphviz
- Via
pyenv
:
$ pyenv --version # assume pyenv is installed, particular version doesn't matter
pyenv 1.2.5-111-geb68ec94
$ pyenv versions # `pyenv install 2.7.15` if it's not locally available
system
* 2.7.15 (set by /home/mcarifio/src/linphone-desktop/linphone-desktop/.python-version)
3.7.0
3.8-dev
$ pyenv local 2.7.15
$ pyenv local
2.17.15
-
Install build-essential, Qt5 and other build pre-requisites.
# apt update && apt upgrade -y # apt install build-essential qt5-default devenv # apt install yasm libv4l-dev libturbojpeg0-dev libglew-dev doxygen \ qtdeclarative5-dev qtquickcontrols2-5-dev libqt5svg5-dev qttools5-dev qml-module-qtquick-controls
<-- Note: I'm not sure what the definitive list of packages should be here. I kept installing til I finished a build -->
-
Configure
Qt5_DIR
andPATH
usingqtchooser
:$ eval "$(qtchooser -print-env)" # exports QTLIBDIR consistent with package `qt5-default` $ export PATH=${QTTOOLDIR}:$PATH $ export Qt5_DIR=${QTLIBDIR}/cmake/Qt5 $ type cmake cmake is hashed (/usr/bin/cmake) $ cmake --version cmake version 3.13.4 CMake suite maintained and supported by Kitware (kitware.com/cmake).
-
Finish the pre-build by cleaning the obsolete files and then run prepare.py and make again:
./prepare.py -c ./prepare.py -DENABLE_DOC=OFF make
-
"Smoketest" your build:
$ OUTPUT/desktop/bin/linphonec --version
version: 3.12.0
$ OUTPUT/desktop/bin/linphone --version
linphone 4.1.1-663-g4a43f00e
Now the actual issue: bristling with anticipation, I tried to fire up the qt5 app linphone
:
$ ./linphone
[11:23:34:015][0x55f3f4112570][Info]"Starting Linphone (bin: linphone)"
[11:23:34:015][0x55f3f4112570][Info]"Use locale: en_US"
[11:23:34:029][0x55f3f4112570][Info]"Running app..."
[11:23:34:029][0x55f3f41317f0][Info]"Launch async core creation."
[11:23:34:030][0x55f3f4112570][Info]"Activated selectors:" ("custom", "en_US", "unix", "linux", "ubuntu")
[11:23:34:030][0x55f3f4112570][Info]"Registering types..."
[11:23:34:030][0x55f3f4112570][Info]"Registering shared types..."
[11:23:34:031][0x55f3f4112570][Info]"Registering tool types..."
[11:23:34:031][0x55f3f4112570][Info]"Registering shared tool types..."
[11:23:34:054][0x55f3f4112570][Warning]"Errors found in `Notification` component 2:" (qrc:/ui/modules/Linphone/Notifications/NotificationReceivedCall.qml:57:11: Type ActionButton unavailable, qrc:/ui/modules/Common/Form/ActionButton.qml:2:1: module "QtQuick.Controls" version 2.2 is not installed)
Aborted
$ dpkg --list|grep -e 'qt5.*quick' # I think I've install QtQuick.Controls, wrong version?
ii libqt5quick5:amd64 5.12.2-2 amd64 Qt 5 Quick library
ii libqt5quickcontrols2-5:amd64 5.12.2+dfsg-1 amd64 Qt 5 Quick Controls 2 library
ii libqt5quickparticles5:amd64 5.12.2-2 amd64 Qt 5 Quick particles module
ii libqt5quicktemplates2-5:amd64 5.12.2+dfsg-1 amd64 Qt 5 Quick Templates 2 library
ii libqt5quicktest5:amd64 5.12.2-2 amd64 Qt 5 Quick Test library
ii libqt5quickwidgets5:amd64 5.12.2-2 amd64 Qt 5 Quick Widgets library
If there's a "versioning" workaround here, please suggest it. I'm a QT noob and I've already sunk a lot of time into this. I have to put it aside. But it would be wonderful if there's a "quick fix". Please advise. Thanks.