Qt6, building linguist tools
-
I'm building Qt 6 from source because the app I'm building requires a specific Qt version not provided by the host OS (Ubuntu 24.04). I'm using these instructions: https://doc.qt.io/qt-6/linux-building.html. The application requires the translation tools (lrelease, etc), but those binaries aren't being build. I've tried adding '-feature-translation' and an explicit '-make tools' to the configure step, but no joy.
How do I get the tools in qttools/src/linguist to build?
-
Hi and welcome to devnet,
Check the configure logs to see what was missing that disabled the tools.
In between, you can use linguist from your distribution without any issue.
-
For the sake of completeness, you could also build the Linguist tools separatey, e.g. for Qt 6.7.3 like this:
Get the sources:
wget https://download.qt.io/official_releases/qt/6.7/6.7.3/submodules/qttools-everywhere-src-6.7.3.tar.xz tar -xvf qttools-everywhere-src-6.7.3.tar.xz mkdir qttools-everywhere-src-6.7.3/build cd qttools-everywhere-src-6.7.3/build
Then build the Linuist tools:
cmake -G Ninja \ -DCMAKE_PREFIX_PATH=~/Qt/6.7.3 \ -DCMAKE_INSTALL_PREFIX=~/Qt/6.7.3 \ -DFEATURE_assistant=OFF \ -DFEATURE_clang=OFF \ -DFEATURE_designer=OFF \ -DFEATURE_pixeltool=OFF \ -DFEATURE_qdbus=OFF \ -DFEATURE_qtattributionsscanner=OFF \ -DFEATURE_qtdiag=OFF \ -DFEATURE_qtplugininfo=OFF \ .. cmake --build . --parallel cmake --install .