How to build with Qt

Haha, yes, I have now! The cobbler’s children, you know…

2 Likes

Hello, I’m trying to build Seamly2D under Debian 10.3. I’ve checked out the latest from git, and have installed the requirements (AFAICT), but when I run qmake I get

tingo@kg-vm4:~/work/seamly2d/Seamly2D$ QT_SELECT=5 qmake "CONFIG += noTests noRunPath no_ccache noDebugSymbols" Seamly2D.pro -r
Project MESSAGE: Seamly2D.pro: Unknown GCC configuration
Reading /zs/work/seamly2d/Seamly2D/src/src.pro
 Reading /zs/work/seamly2d/Seamly2D/src/libs/libs.pro
  Reading /zs/work/seamly2d/Seamly2D/src/libs/qmuparser/qmuparser.pro
  Reading /zs/work/seamly2d/Seamly2D/src/libs/vpropertyexplorer/vpropertyexplorer.pro
  Reading /zs/work/seamly2d/Seamly2D/src/libs/ifc/ifc.pro
Project ERROR: Unknown module(s) in QT: xmlpatterns

It is likely that I’m missing a package or something, but I’m unable to figure that out. Here are the qt* packages installed on my Debian machine:

tingo@kg-vm4:~$ sudo apt list qt* --installed
Listing... Done
qt5-gtk-platformtheme/stable,now 5.11.3+dfsg1-1+deb10u3 amd64 [installed,automatic]
qt5-qmake-bin/stable,now 5.11.3+dfsg1-1+deb10u3 amd64 [installed,automatic]
qt5-qmake/stable,now 5.11.3+dfsg1-1+deb10u3 amd64 [installed,automatic]
qtbase5-dev-tools/stable,now 5.11.3+dfsg1-1+deb10u3 amd64 [installed,automatic]
qtbase5-dev/stable,now 5.11.3+dfsg1-1+deb10u3 amd64 [installed]
qtchooser/stable,now 66-2 amd64 [installed,automatic]
qtdeclarative5-dev-tools/stable,now 5.11.3-4 amd64 [installed]
qttranslations5-l10n/stable,now 5.11.3-2 all [installed,automatic]
qtxmlpatterns5-dev-tools/stable,now 5.11.3-2 amd64 [installed]

what am I missing? Thanks in advance.

2 Likes

@tingo, I have only built the code from the repository on Ubuntu. If you give me the information on your Debian installation I am willing to create a test install on my Pentium I7 machine (which I keep for creating test installs). I for one do not know enough to attempt to help with building in an environment where I can not duplicate your results. This said, I am willing to generate the environment and give it a try.

I know others have done builds on with other configurations. If anybody reading this is able to be more helpful, please feel free to speak up and do so.

@tingo, feel free to PM me if you wish. I will post coherent advice I may have in this group, but at this time I am unable to help further without additional information on your configuration

2 Likes

No idea which of these helped with a very unstable build on the debian that comes with Chrome these days, but here’s what I get when I list my qt installs.

apt list qt* --installed
Listing... Done
qt5-default/oldstable,now 5.7.1+dfsg-3+deb9u2 amd64 [installed]
qt5-gtk-platformtheme/oldstable,now 5.7.1+dfsg-3+deb9u2 amd64 [installed,automatic]
qt5-qmake/oldstable,now 5.7.1+dfsg-3+deb9u2 amd64 [installed]
qt5-style-plugins/oldstable,now 5.0.0+git16.g7aa4764-1 amd64 [installed,automatic]
qtbase5-dev/oldstable,now 5.7.1+dfsg-3+deb9u2 amd64 [installed,automatic]
qtbase5-dev-tools/oldstable,now 5.7.1+dfsg-3+deb9u2 amd64 [installed,automatic]
qtchooser/oldstable,now 63-g13a3d08-1 amd64 [installed,automatic]
qttools5-dev-tools/oldstable,now 5.7.1-1 amd64 [installed]
qttranslations5-l10n/oldstable,now 5.7.1~20161021-1 all [installed,automatic]
qtxmlpatterns5-dev-tools/oldstable,now 5.7.1~20161021-3 amd64 [installed]

It’s magic I tell ya’! Pure, crazy MAGIC!!! :crazy_face:

:unicorn:

2 Likes

I don’t really know what information you want. This is a standard Debian install, amd64 / x86_64, currently at 10.3:

tingo@kg-vm4:~$ cat /etc/debian_version 
10.3
tingo@kg-vm4:~$ uname -a
Linux kg-vm4 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux

I’m using Xfce4 as the desktop (not that it matters at this stage), everything is installed via apt from Debian standard repositories, or from buster-backports

1 Like

Hi @tingo, sorry for the late response. I’ve been on vacation. Debian doesn’t natively install xmlpatterns of the Qt development package with Qt anymore. (Lost in the python 2.7 to python3 transition?) Not sure what has happened here but it’s been a problem for some time. Xmlpatterns is required for Qt’s debug engine. This article may help you find the right xmlpatterns library package for your Debian distribution: https://packages.debian.org/sid/python-pyqt5.qtxmlpatterns-dbg

I have the following qt5 xml packages installed already:

tingo@kg-vm4:~$ sudo apt list --installed *qt5xml*
Listing... Done
libqt5xml5/stable,now 5.11.3+dfsg1-1+deb10u3 amd64 [installed,automatic]
libqt5xmlpatterns5/stable,now 5.11.3-2 amd64 [installed,automatic]

and I also installed the python bindings (for both python2 and python3, testing after each one) in case that matters

tingo@kg-vm4:~$ sudo apt list --installed *pyqt5*
Listing... Done
python-pyqt5-dbg/stable,now 5.11.3+dfsg-1+b3 amd64 [installed,automatic]
python-pyqt5.qtxmlpatterns-dbg/stable,now 5.11.3+dfsg-1+b3 amd64 [installed]
python-pyqt5.qtxmlpatterns/stable,now 5.11.3+dfsg-1+b3 amd64 [installed]
python-pyqt5/stable,now 5.11.3+dfsg-1+b3 amd64 [installed,automatic]
python3-pyqt5-dbg/stable,now 5.11.3+dfsg-1+b3 amd64 [installed,automatic]
python3-pyqt5.qtxmlpatterns-dbg/stable,now 5.11.3+dfsg-1+b3 amd64 [installed]
python3-pyqt5.qtxmlpatterns/stable,now 5.11.3+dfsg-1+b3 amd64 [installed]
python3-pyqt5/stable,now 5.11.3+dfsg-1+b3 amd64 [installed,automatic]

but still I get

tingo@kg-vm4:~/work/seamly2d/Seamly2D$ QT_SELECT=5 qmake PREFIX=/usr/local  Seamly2D.pro -r CONFIG+=noDebugSymbols CONFIG+=no_ccache
Info: creating stash file /zs/work/seamly2d/Seamly2D/.qmake.stash
Project MESSAGE: Seamly2D.pro: Unknown GCC configuration
Reading /zs/work/seamly2d/Seamly2D/src/src.pro
 Reading /zs/work/seamly2d/Seamly2D/src/libs/libs.pro
  Reading /zs/work/seamly2d/Seamly2D/src/libs/qmuparser/qmuparser.pro
  Reading /zs/work/seamly2d/Seamly2D/src/libs/vpropertyexplorer/vpropertyexplorer.pro
  Reading /zs/work/seamly2d/Seamly2D/src/libs/ifc/ifc.pro
Project ERROR: Unknown module(s) in QT: xmlpatterns

so there must be something else / more that is missing from my system.

1 Like

You fixed the XMLPatterns error, which uncovered the next error condition: Unknown GCC compiler configuration in QtCreator.

Check 4 items:

  1. Gcc configuration: In QtCreator click on ‘Tools’ in the top bar menu and select ‘Options’ at the bottom of the picklist. In the right side area of the wIndow, select the ‘compiler’ tab and select an auto-discovered compiler, write down the compiler’s path. Then select ‘Kit’ (compiler kit) tab and confirm that you’ve selected the auto-detected gcc compiler.

  2. Permanantly add the gcc compiler path to your Debian operating system PATH environment variable (with Bash.rc?)

  3. Permanently add the path to qmake to the PATH environment variable

  4. Permanently add the path to the Qt bin directory to the PATH environment variable

1 Like

Err… no. If you check my first post about this, you will see that the error message about GCC was there already. Don’t get hung up on it - it’s just a red herring (it’s just because the project files doesn’t "know about " GCC 8.xx).

  1. QtCreator isn’t involved here - I haven’t used it (and there is no need to, IMHO).
  2. gcc is already in PATH:
tingo@kg-vm4:~/work/seamly2d/Seamly2D$ which gcc
/usr/bin/gcc
tingo@kg-vm4:~/work/seamly2d/Seamly2D$ gcc --version
gcc (Debian 8.3.0-6) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  1. qmake is already in the PATH:
/usr/bin/qmake
tingo@kg-vm4:~/work/seamly2d/Seamly2D$ QT_SELECT=5 qmake -v
QMake version 3.1
Using Qt version 5.11.3 in /usr/lib/x86_64-linux-gnu
  1. qmake and a bunch of other Qt programs are in /usr/bbin, which already is in PATH
tingo@kg-vm4:~/work/seamly2d/Seamly2D$ ll /usr/bin/q*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qcollectiongenerator -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qdbus -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qdbuscpp2xml -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qdbusviewer -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qdbusxml2cpp -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qdoc -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qdoc3 -> qtchooser*
-rwxr-xr-x 1 root root  1876288 Jan 30 21:28 /usr/bin/qemu-img*
-rwxr-xr-x 1 root root  1831744 Jan 30 21:28 /usr/bin/qemu-io*
-rwxr-xr-x 1 root root  1832064 Jan 30 21:28 /usr/bin/qemu-nbd*
-rwxr-xr-x 1 root root   726440 Jan 30 21:28 /usr/bin/qemu-pr-helper*
-rwxr-xr-x 1 root root 13390976 Jan 30 21:28 /usr/bin/qemu-system-i386*
-rwxr-xr-x 1 root root 13425664 Jan 30 21:28 /usr/bin/qemu-system-x86_64*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qgltf -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qhelpconverter -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qhelpgenerator -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qlalr -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qmake -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qml -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qml1plugindump -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qmlbundle -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qmlcachegen -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qmleasing -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qmlimportscanner -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qmljs -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qmllint -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qmlmin -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qmlplugindump -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qmlprofiler -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qmlscene -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qmltestrunner -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qmlviewer -> qtchooser*
-rwxr-xr-x 1 root root    23184 Oct  5  2018 /usr/bin/qpdldecode*
-rwxr-xr-x 1 root root    10368 Jan 30  2016 /usr/bin/qrttoppm*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qtattributionsscanner -> qtchooser*
-rwxr-xr-x 1 root root    47752 May  3  2019 /usr/bin/qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qtconfig -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qtdiag -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qtpaths -> qtchooser*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qtplugininfo -> qtchooser*
-rwxr-xr-x 1 root root    11003 Aug 30  2019 /usr/bin/querybts*
-rwxr-xr-x 1 root root      421 Jan 19  2019 /usr/bin/quodlibet*
lrwxrwxrwx 1 root root        9 May  3  2019 /usr/bin/qvkgen -> qtchooser*

(iqnore qemu and stuff - obviously not a part of Qt) but maybe I’m missing something else?

1 Like

Hey @tingo Sorry I missed the XMLpatterns message and focused on the compiler configuration message.

The XMLPatterns bug report on the Qt site mentions that it’s a problem for Debian distributions of Qt5.9 through Qt5.11. XMLPatterns becomes depricated with Qt5.12 so if you use their latest release it’s no longer an issue for Debian Qt users.

I’m on Windows 10, using QtCreator 4.11.1, building with Qt 5.9.9 and MinGW 5.3.0 34-bit. I don’t get any build errors. I’m building the code right now.

2 Likes

So I installed qtcreator and a few more qt packages. The installed list now is

tingo@kg-vm4:~$ sudo apt list --installed qt*
Listing... Done
qt3d5-doc/stable,now 5.11.3+dfsg-2 all [installed,automatic]
qt5-assistant/stable,now 5.11.3-4 amd64 [installed,automatic]
qt5-doc/stable,now 5.11.3-1 all [installed,automatic]
qt5-gtk-platformtheme/stable,now 5.11.3+dfsg1-1+deb10u3 amd64 [installed,automatic]
qt5-qmake-bin/stable,now 5.11.3+dfsg1-1+deb10u3 amd64 [installed,automatic]
qt5-qmake/stable,now 5.11.3+dfsg1-1+deb10u3 amd64 [installed,automatic]
qt5-qmltooling-plugins/stable,now 5.11.3-4 amd64 [installed,automatic]
qtbase5-dev-tools/stable,now 5.11.3+dfsg1-1+deb10u3 amd64 [installed,automatic]
qtbase5-dev/stable,now 5.11.3+dfsg1-1+deb10u3 amd64 [installed]
qtbase5-doc/stable,now 5.11.3+dfsg1-1+deb10u3 all [installed,automatic]
qtcharts5-doc/stable,now 5.11.3-2 all [installed,automatic]
qtchooser/stable,now 66-2 amd64 [installed,automatic]
qtconnectivity5-doc/stable,now 5.11.3-2 all [installed,automatic]
qtcreator-data/stable,now 4.8.2-1 all [installed,automatic]
qtcreator-doc/stable,now 4.8.2-1 all [installed,automatic]
qtcreator/stable,now 4.8.2-1 amd64 [installed]
qtdeclarative5-dev-tools/stable,now 5.11.3-4 amd64 [installed]
qtdeclarative5-dev/stable,now 5.11.3-4 amd64 [installed]
qtdeclarative5-doc/stable,now 5.11.3-4 all [installed,automatic]
qtgraphicaleffects5-doc/stable,now 5.11.3-2 all [installed,automatic]
qtlocation5-doc/stable,now 5.11.3+dfsg-2 all [installed,automatic]
qtmultimedia5-doc/stable,now 5.11.3-2 all [installed,automatic]
qtquickcontrols2-5-doc/stable,now 5.11.3+dfsg-2 all [installed,automatic]
qtquickcontrols5-doc/stable,now 5.11.3-2 all [installed,automatic]
qtscript5-doc/stable,now 5.11.3+dfsg-3 all [installed,automatic]
qtsensors5-doc/stable,now 5.11.3-2 all [installed,automatic]
qtserialport5-doc/stable,now 5.11.3-2 all [installed,automatic]
qtsvg5-doc/stable,now 5.11.3-2 all [installed,automatic]
qttools5-dev-tools/stable,now 5.11.3-4 amd64 [installed,automatic]
qttools5-dev/stable,now 5.11.3-4 amd64 [installed]
qttools5-doc/stable,now 5.11.3-4 all [installed,automatic]
qttranslations5-l10n/stable,now 5.11.3-2 all [installed,automatic]
qtvirtualkeyboard5-doc/stable,now 5.11.3+dfsg-2 all [installed,automatic]
qtwayland5-doc/stable,now 5.11.3-2 all [installed,automatic]
qtwebchannel5-doc/stable,now 5.11.3-2 all [installed,automatic]
qtwebengine5-doc/stable,now 5.11.3+dfsg-2+deb10u1 all [installed,automatic]
qtwebsockets5-doc/stable,now 5.11.3-5 all [installed,automatic]
qtwebview5-doc/stable,now 5.11.3-2 all [installed,automatic]
qtx11extras5-doc/stable,now 5.11.3-2 all [installed,automatic]
qtxmlpatterns5-dev-tools/stable,now 5.11.3-2 amd64 [installed]
qtxmlpatterns5-doc/stable,now 5.11.3-2 all [installed,automatic]

and qmake still errors out as before. Maybe I should look at the qt5* packages that I haven’t installed yet.

1 Like

What Debian OS distribution are you using?

2 Likes

Debian. Debian 10 “Buster”, with xfce as the desktop.

2 Likes

Yeah I have no experience with that. Sorry :sob:

2 Likes

Wow, here’s an exact duplicate of your errors from 2017 on Arch Linux building Valentina!

[SOLVED] Valentino Project ERROR: Unknown module(s) in QT: xmlpatterns / AUR Issues, Discussion & PKGBUILD Requests / Arch Linux Forums

It was solved by installing Arch linux’s qt5-xmlpatterns library from here:

Arch Linux - qt5-xmlpatterns 5.15.12-1 (x86_64)

I thought it a weird coincidence, but then realized that there are not many open source C++ programs which utilize XML heavily and build on Qt ;). Open source means that it will be compiled on numerous permutations of OS and Qt versions, so we’ll see the problems where a proprietary development team would not.

2 Likes

Yep. Unfortunately, that library is already installed:

tingo@kg-vm4:~$ dpkg-query -L libqt5xmlpatterns5
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libQt5XmlPatterns.so.5.11.3
/usr/share
/usr/share/doc
/usr/share/doc/libqt5xmlpatterns5
/usr/share/doc/libqt5xmlpatterns5/changelog.Debian.gz
/usr/share/doc/libqt5xmlpatterns5/copyright
/usr/lib/x86_64-linux-gnu/libQt5XmlPatterns.so.5
/usr/lib/x86_64-linux-gnu/libQt5XmlPatterns.so.5.11

along with

tingo@kg-vm4:~$ dpkg-query -L qtxmlpatterns5-dev-tools
/.
/usr
/usr/lib
/usr/lib/qt5
/usr/lib/qt5/bin
/usr/lib/qt5/bin/xmlpatterns
/usr/lib/qt5/bin/xmlpatternsvalidator
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/qt5
/usr/lib/x86_64-linux-gnu/qt5/bin
/usr/share
/usr/share/doc
/usr/share/doc/qtxmlpatterns5-dev-tools
/usr/share/doc/qtxmlpatterns5-dev-tools/changelog.Debian.gz
/usr/share/doc/qtxmlpatterns5-dev-tools/copyright
/usr/lib/x86_64-linux-gnu/qt5/bin/xmlpatterns
/usr/lib/x86_64-linux-gnu/qt5/bin/xmlpatternsvalidator

I’m out of ideas for now. Putting this on the backburner, getting back to it some day.

2 Likes

Ah! I found it (well, one “it” anyway): I was missing libqt5xmlpatterns5-dev package.

3 Likes

Ok I’ll update the README on github

2 Likes

This afternoon I built Seamly2D on another Debian 10 machine, and took advantage of that to figure out which Qt5 packages are really needed, since my previous installation was more of an “I don’t know so let me try every Qt5 package until it works” thing. Here are the minimum Qt5 packages on a Debian 10 machine, in order for qmake to do it’s job without complaints:

qtbase5-dev, qttools5-dev, libqt5xmlpatterns5-dev, libqt5svg5-dev.

after qmake finished, I ran ‘make’ and ‘sudo make install’ and the programs are installed and working.

3 Likes

Thank you @tingo!!!

2 Likes