How to build Qt submodules in linux
-
I have the Qt6 installed on my raspberry pi 4 running the latest OS Bullseye using this guide here
https://www.tal.org/tutorials/building-qt-62-raspberry-pi
The installation went successfully, i was able to build and run test projects.
Now in a project im working on im going to need the multimedia submodule, but im having errors installing it.
So according to the Building Qt submodules portion of the guide (bottom part) I first have to download the tarz. Which i did, placed it inside a folder in the desktop, opened terminal and cd into that folder.
I then did run
tar xf qtmultimedia-everywhere-src-6.2.3.tar.xz
It had no problem executing that. The error happens on the next step, the guide tells me to run
/opt/Qt/6.2.3-armv7l/bin/qt-configure-module .
And im getting an error of
Error: . is not a valid Qt module source directory. Usage: qt-configure-module <module-source-dir> [options] To display the available options for a Qt module, run qt-configure-module <module-source-dir> -help
Im not knowledgeable in Linux enough to understand what this error means, can anybody help me how to fix this ?
-
@drakejest
So --- bearing in mind I know nothing about this --- wouldn't you want to do eithercd qtmultimedia-everywhere-src-6.2.3 ; /opt/Qt/6.2.3-armv7l/bin/qt-configure-module . # or /opt/Qt/6.2.3-armv7l/bin/qt-configure-module qtmultimedia-everywhere-src-6.2.3
? I don't know, but it seems coomon sense to me, how would
/opt/Qt/6.2.3-armv7l/bin/qt-configure-module .
know to go down intoqtmultimedia-everywhere-src-6.2.3
sub-directory? Maybe it does, maybe you need to tell it..... -
I dont see it saying that. The instructions are:
Building Qt submodules
Qt submodules contains various extra features not included in the base package, for example QtQuick, support for Wayland, CAN-BUS and so forth. For most parts, building the submodules is quite straightforward:1. download the source for the submodule you require
2. extract the archive
tar xf submodule-version.tar.xz
3. configure sources
/opt/Qt/6.2.3-armv7l/bin/qt-configure-module .
4. build the sources
/opt/cmake/bin/cmake --build . --parallel 4
5. install the result
/opt/cmake/bin/cmake --install .
But i did that anyway, its still the same. Do note that the tar file is on a desktop folder i created. "qt modules" is the folder i created where i put all the tar qt modules i downloaded. Should i move the tar file elsewhere and do these commands there?
pi@raspberrypi:~/Desktop/qt modules $ tar xf qtmultimedia-everywhere-src-6.2.3.tar.xz pi@raspberrypi:~/Desktop/qt modules $ mkdir qtbasebuild && cd qtbasebuild pi@raspberrypi:~/Desktop/qt modules/qtbasebuild $ /opt/Qt/6.2.3-armv7l/bin/qt-configure-module . Error: . is not a valid Qt module source directory. Usage: qt-configure-module <module-source-dir> [options] To display the available options for a Qt module, run qt-configure-module <module-source-dir> -help pi@raspberrypi:~/Desktop/qt modules/qtbasebuild $
-
-
@drakejest said in How to build Qt submodules in linux:
I dont see it saying that.
You are right, I quoted from the wrong part. My bad.
~/Desktop/qt modules
: I would not create a directory with a space in it under Linux. There is a small chance that is upsetting the process.tar xf qtmultimedia-everywhere-src-6.2.3.tar.xz
After executing this, depending on what is in that
tar
file, does it create a top-level directory, like maybeqtmultimedia
, into which it has extracted the files, or does it extract everything straight into the directory you are in with files at the top-level? -
I removed the space and tried again. Sadly the error is still the same,
pi@raspberrypi:~/Desktop/qtmodules $ tar xf qtmultimedia-everywhere-src-6.2.3.tar.xz pi@raspberrypi:~/Desktop/qtmodules $ /opt/Qt/6.2.3-armv7l/bin/qt-configure-module . Error: . is not a valid Qt module source directory. Usage: qt-configure-module <module-source-dir> [options] To display the available options for a Qt module, run qt-configure-module <module-source-dir> -help pi@raspberrypi:~/Desktop/qtmodules $
@JonB said in How to build Qt submodules in linux:
After executing this, depending on what is in that tar file, does it create a top-level directory, like maybe qtmultimedia, into which it has extracted the files, or does it extract everything straight into the directory you are in with files at the top-level?
Yes it does, so upon executing tar, the qtmodules folder will now have another folder named "qtmultimedia-everywhere-src-6.2.3"
qtmodules - qtmultimedia-everywhere-src-6.2.3 - qtmultimedia-everywhere-src-6.2.3.tar.xz
-
@drakejest
So --- bearing in mind I know nothing about this --- wouldn't you want to do eithercd qtmultimedia-everywhere-src-6.2.3 ; /opt/Qt/6.2.3-armv7l/bin/qt-configure-module . # or /opt/Qt/6.2.3-armv7l/bin/qt-configure-module qtmultimedia-everywhere-src-6.2.3
? I don't know, but it seems coomon sense to me, how would
/opt/Qt/6.2.3-armv7l/bin/qt-configure-module .
know to go down intoqtmultimedia-everywhere-src-6.2.3
sub-directory? Maybe it does, maybe you need to tell it..... -
Sorry it took so long to reply, so what you have said worked perfectly ! I couldnt be more happier
I had to install pre-requisite modules which took so long to build but now qt creator is able to detect the multimedia module !
Thank you for you help !