Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
README.md | 2021-07-01 | 9.5 kB | |
wsjtx_log_config.ini | 2021-06-27 | 850 Bytes | |
Totals: 2 Items | 10.4 kB | 0 |
Building Qt 5.15.2 Native for your Debian-based Distribution
Qt is a "Swiss Army Knife". Some authors recommend that it is best to supply it with as many libraries to use as possible.
Many prefer to use Qt 5.15.2 as the standard for JT-ware. Your Debian distro may or may not deliver libraries and compilers for this version.
This guide is customised from https://doc.qt.io/qt-5/linux.html and https://www.linuxfromscratch.org/blfs/view/svn/x/qt5.html for natively building Qt 5.15.2 for the Debian-based distribution Ubuntu 20.04 LTS.
Pull the source package from: https://www.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/5.15/5.15.2/single/ . This bypasses slow .cn mirrors and **uses funet.fi ** .
Be forewarned that the process is VERY LONG and quite complex.
Pre-Requisites
These are in addition to the basics on a Ubuntu 20.04 LTS Deployment. i.e.
- Deploy the "basics":
sudo apt install -y build-essential gfortran cmake autoconf automake manpages-dev
- Deploy the required libraries and tools:
** Note:** It is recommended to use these commands in small sets just in case something breaks. Fault identification is made easier.
sudo apt install -y bison gperf flex ruby ruby-dev python2 python3 libbz2-dev libcap-dev libcups2-dev libdrm-dev libwebp-dev
sudo apt install -y libegl1-mesa-dev libgcrypt-dev libnss3-dev libpci-dev libpulse-dev libxtst-dev gyp libxcomposite-dev
sudo apt install -y libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev
sudo apt install -y libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev
sudo apt install -y libxcb-util-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render0-dev libxcb-xinerama0
sudo apt install -y libpthread-workqueue-dev libfontconfig-dev libfreetype-dev libsm-dev libglib2.0-dev libxcb-render-util0-dev
sudo apt install -y libxcb-xinerama0-dev libxkbcommon-dev libxkbcommon-x11-dev libfontconfig1 libfontconfig1-dev libproxy-dev
sudo apt install -y libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad libice-dev
sudo apt install -y gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x libgssglue-dev
sudo apt install -y gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-pulseaudio libpthread-stubs0-dev libssl-dev
sudo apt install -y libxcursor-dev libxdamage-dev libxrandr-dev x11proto-randr-dev libxss-dev libsrtp2-dev x11proto-fonts-dev
sudo apt install -y libjsoncpp-dev libopus-dev libminizip-dev libavutil-dev libavformat-dev libavcodec-dev libdbus-1-dev
sudo apt install -y libvpx-dev libsnappy-dev libre2-dev libprotobuf-dev lksctp-tools libsctp-dev protobuf-compiler ninja-build
sudo apt install -y clang libclang-dev portaudio19-dev libjack-dev x11-xfs-utils libfs-dev libgirepository1.0-dev libxml2-utils
sudo apt install -y libopenal-dev libevent-dev libatspi2.0-dev
Recommended Additional Packages for Wayland Support
As of Ubuntu 21.04 it is anticipated that Wayland server support is to be turned on by default. It may be advantageous to build Qt with Wayland support.
sudo apt install -y libwayland-bin libwayland-dev libmirwayland-dev
Construction
Preparation
- Set an environment variable QT5PREFIX to set the deployment directory:
sudo su
export QT5PREFIX=/opt/qt5
- Create the directory structure to hold the deployment:
sudo mkdir /opt/qt-5.15.2
sudo ln -sfnv qt-5.15.2 /opt/qt5
The Build Process
- In a Terminal, change to the root of the source directory:
cd ~/qt-everywhere-src-5.15.2
- Make a build directory and change into that directory:
mkdir build
cd build
- Run the configure script. Follow any prompts as required.
sudo su
../configure --prefix=$QT5PREFIX -confirm-license -opensource -nomake examples -skip qtwebengine
Note: Experiment with the -bundled-xcb-xinput switch if you get runtime errors with your build.
- build the environment:
make -j4
** Note: You can add -jx** with x being the number of "threads" to allocate to possibly speed up the build. See https://askubuntu.com/questions/1295713/make-use-of-j-option .
** * Note that the build process MAY TAKE SEVERAL HOURS. **
Deployment
Most steps here are based off the resource https://www.linuxfromscratch.org/blfs/view/svn/x/qt5.html .
Some packages could possibly deliver "fragments" of the Ubuntu 20.04 Qt 5.12.8 deployment.
- You may need to issue the following command to remove references to these from your system:
sudo apt purge *qt5*
- Perform the actual install to $QT5PREFIX :
sudo make install
- Remove references to the build directory from installed library dependency (prl) files:
sudo find $QT5PREFIX/ -name \*.prl \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
- Create the /etc/ld.so.conf file - which updates the dynamic linker's run-time cache file:
sudo su
cat >> /etc/ld.so.conf << EOF
# Begin Qt addition
/opt/qt5/lib
# End Qt addition
EOF
ldconfig
Environment variables have to be set. We are pre-appending to the path so that no other "residual" tools are picked up first.
- Execute the following commands:
sudo su
cat > /etc/profile.d/qt5.sh << "EOF"
# Begin /etc/profile.d/qt5.sh
QT5DIR=/opt/qt5
PATH=$QT5DIR/lib/pkgconfig:$PATH
PATH=$QT5DIR/bin:$PATH
export PATH
export QT5DIR
# End /etc/profile.d/qt5.sh
EOF
It is advisiable to reboot your system now.
Building Hamlib and WSJTX
- Refer to the documents at https://sourceforge.net/projects/hamlib-sdk/files/Linux/ for your system.
Issues
Summary
- Having to use the "purge" statement before the "make install" line. This removes any residual Qt 5.12.8 - built components that could conflict and interfere with Qt 5.15.2 operation.
- Steps here will BUILD Hamlib and WSJT-X as of v2.5.rc1. This is ** not guaranteed to build WSJT-X that will actually run ** .
- Complexity aven across different codebases. See https://forum.qt.io/topic/125582/qt-5-15-2-do-not-build-libqxcb-so-but-at-the-same-time-qt-5-14-0-successfully-build-libqxcb-so .
Debugging Runtime Issues - Generic
The article https://askubuntu.com/questions/308128/failed-to-load-platform-plugin-xcb-while-launching-qt5-app-on-linux-without provides a number of great techniques that can be used to debut grue causes of "plugin" issues. The most useful command is:
sudo export QT_DEBUG_PLUGINS=1
-
Restart your system
-
Execute the application throwing exceptions from the command line.
Reading the extended messages often indicates a cause - i.e. app or library - that may require installation or even reinstallation.
Debugging Runtime Issues - WSJT-X
The following file has been placed into this directory:
Place this file into the SAME location as your wsjtx.ini configuration file. It may provide the information that you need to debug your deployment.
(Thanks Mike W9MDB)
References
- https://www.ics.com/blog/how-compile-qt-source-code-linux
- https://www.linuxfromscratch.org/blfs/view/svn/x/qt5.html
- https://doc.qt.io/qt-5/linux.html
- https://gstreamer.freedesktop.org/documentation/installing/on-linux.html?gi-language=c
- https://wiki.qt.io/QtWebEngine/How_to_Try
- https://askubuntu.com/questions/1295713/make-use-of-j-option
Reference for fixing "xcb" issues
- https://askubuntu.com/questions/308128/failed-to-load-platform-plugin-xcb-while-launching-qt5-app-on-linux-without
- https://forum.qt.io/topic/125582/qt-5-15-2-do-not-build-libqxcb-so-but-at-the-same-time-qt-5-14-0-successfully-build-libqxcb-so
Disclaimer
All rights and credits here go to the Amateur Radio focussed contributors.
This is not of merchantable quality; licenses of many tools preclude commercial use and insist on code released open-source. There is no warranty nor claims possible - nor will be accepted - against any contributor.
Use of this resource is at your own risk.