Build Ubuntu 24 04 3 - Maproom/qmapshack GitHub Wiki
Prev (Fedora) | Home | Manual | Index | (OSX) Next
Table of contents
Compile and build QMapShack for Ubuntu 24.04.03
(contributed by Torsten Metzner, Karl Karsten and ChrisZero, tested on a fresh Ubuntu v24.04.3 VM)
System preparation
sudo apt update
sudo apt upgrade
sudo apt install g++ make cmake cmake-curses-gui git
sudo reboot
QT 6.10 installation
-
Register for a Qt Account and download the Qt Maintenance Tool at https://doc.qt.io/qt-6/qt-online-installation.html
-
Make the Qt Maintenance Tool executable:
chmod u+x qt-online-installer-linux-x64-4.10.0.run -
Install following packages required by the installer:
sudo apt install libxcb-cursor0 libxcb-cursor-dev -
Start the
Qt Maintenance Tool:./qt-online-installer-linux-x64-4.10.0.run -
Select QT install directory at
/opt/QT -
Select the
Custom Installation, because in addition to the standard installation, the following objects are needed:- Qt 5 Compatibility module
- Qt WebChannel
- Qt Positioning
- Qt WebEngine Extension.
Additional packages installation
sudo apt install default-libmysqlclient-dev sqlite3 libsqlite3-dev libtiff-dev libghc-bzlib-dev libgdal-dev libroutino-dev libalglib-dev libquazip1-qt6-dev libcups2-dev
Unpack source code and prepare build directory
cd ~/QMS
unzip -x ~/qmapshack-dev.zip
mkdir build_QMapShack
cd build_QMapShack
Configure, build then install
cmake ../qmapshack-dev -DCMAKE_PREFIX_PATH=/opt/QT/6.10.1/gcc_64/ -DCMAKE_INSTALL_PREFIX=/usr
make -j6 #here 6 processors are used
sudo make install
Run QMapShack
bin/qmapshack
Remarks
-
The used QT version (6.10) is different to the one which comes with Ubuntu 24.04.3 (6.4)
-
./bin/qmapshackis using the correct QT libraries, e.g.:$ ldd ./bin/qmapshack | egrep 'Qt6Core.so|quazip' libquazip1-qt6.so.1 => /lib/x86_64-linux-gnu/libquazip1-qt6.so.1 (0x00007ecca2b25000) libQt6Core.so.6 => /opt/QT/6.10.1/gcc_64/lib/libQt6Core.so.6 (0x00007ecc91c00000)But system libraries, e.g.
libquazipare linked against the QT libraries from the system$ ldd /usr/lib/x86_64-linux-gnu/libquazip1-qt6.so | grep libQt6Core.so libQt6Core.so.6 => /lib/x86_64-linux-gnu/libQt6Core.so.6 (0x000073e611a00000) -
It is possible to use the script below to indicate what libraries to use:
sudo tee /usr/local/bin/qmapshack-qt610 >/dev/null <<'EOF' #!/usr/bin/env bash export LD_LIBRARY_PATH=/opt/QT/6.10.1/gcc_64/lib export QT_PLUGIN_PATH=/opt/QT/6.10.1/gcc_64/plugins export QML2_IMPORT_PATH=/opt/QT/6.10.1/gcc_64/qml exec /usr/bin/qmapshack "$@" EOF sudo chmod +x /usr/local/bin/qmapshack-qt610Then run QMapShack using
qmapshack-qt610