Skip to content

Qt compilation

Dean Brettle edited this page Jul 30, 2024 · 21 revisions

This page explains how to recompile the Qt dependency on every platforms.

Windows

On Windows, Qt is provided as a MSYS2 pacman package and is automatically installed when installing the msys dependencies.

Linux

Qt Pre-compiled binaries

Download and Install Qt binaries

Download https://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run and run it:

curl -L -O https://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run 
chmod +x ./qt-unified-linux-x64-online.run
./qt-unified-linux-x64-online.run

Install Qt in $(HOME)/QtX.XX.0(default directory) with at least these items selected:

- Qt
| - Qt X.XX.0
| | - Desktop gcc 64-bit

Install and Create the Qt Package for Webots

cd ~/webots/scripts/install
./qt_linux_installer.sh

Mac

Install Qt 6.XX.X

Download Qt 6.XX.X for macOS (https://download.qt.io/official_releases/online_installers) and install it in $(HOME)/Qt6.XX.X (default directory) with at least these items selected:

- Qt 6.XX.X
| - Qt 6.XX.X
| | - macOS
| | - QtWebSocket

Error and troubleshooting

When building a distribution, if you get an error like:

Dependency error:
- File: bin/qt/lupdate
- Dependency: @rpath/QtNetwork.framework/Versions/A/QtNetwork

You may need to modify the scripts/install/qt_mac_installer.sh file to fix the rpath.

Install in Webots and make installation package

cd ~/webots/scripts/install/
# Optional: edit the 2 first paths of ./qt_mac_installer.sh
./qt_mac_installer.sh
Clone this wiki locally