Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[SOLVED] Some modules are not available in configure
Eyeless last edited by Eyeless
I'm trying to build Qt with configure. But configure "doesn't know" some modules. For example, when I try to run configure with these parameters:
~/Qt/5.5/Src/qtbase/configure -qml -quick -multimedia -platform linux-g++ -debug-and-release
I get these errors:
-qml: invalid command-line switch
-quick: invalid command-line switch
-multimedia: invalid command-line switch
Qml, quick and multimedia modules are not even mentioned in configure --help. But there no problems with, for example widgets module. So, how can I enable all necessary modules in configure? Thank you for your answers!
Hi and welcome to devnet,
Because there's no such options. If you want to build a set of Qt modules you have to call configure from Src not qtbase, otherwise you'll be only building qtbase. That's not a problem, you can always build other modules afterward.
If you only want 3 modules, then just build qtbase and then use the qmake + make combo otherwise you have to add as much
-skip module_namestatement as modules you don't want to build.
Hope it helps
Eyeless last edited by
@SGaist Thank you very much for your advice. I've run configure from Src directory. There were same problems with invalid command-line switches and I was not able to build project with qml, quick and multimedia modules using qmake, that was built by configure. So, as I have understood, I need to build these modules manually. But how can I do this? I've tried to build them using qmake built by configure, but I received error messages about absence of some other modules. After this, I've tried to build modules using qmake that was installed by Qt default installer and then to copy all built files to the directory, where I created Qt-build by configure. But after copying all those files I still got module absence errors when trying to build projects by this new qmake using, for example, Multimedia module.
I feel a bit uneasy to ask you about this, but can you please give me just a short tutorial how to build Qt correctly? I've decided to build it because I needed EGL or GLX enabled to run my little QML app on PCs without Qt (I have successfully enabled GLX by installing all dependencies from xcb readme file). Now all I want is to build Qt with all modules, that default version has. Of course, my app doesn't use all of them, but I may need them in the future, so I would like to have them built. But I'm trying to build Qt with these modules enabled for several days using different tutorials from the Internet without any success. So, if you would be so kind to give me a short step-by-step instruction, I would be very grateful.
I've run configure from Src directory. There were same problems with invalid command-line switches and I was not able to build project with qml, quick and multimedia modules using qmake, that was built by configure.
Could you copy and paste the exact error messages here? They contain valuable clues to solving your problem.
So, as I have understood, I need to build these modules manually.
I don't think that's right. You should be able to build the entire Qt framework using only a few lines (shown below).
I've tried to build them using qmake built by configure,
Do not run qmake manually.
can you please give me just a short tutorial how to build Qt correctly?
First, ensure that your build tree is 100% clean. The files generated in your previous attempts need to be completely removed.
Here's how I build mine, using only 4 lines:
> cd ~/Qt/5.5/Src/ > configure -prefix "~/Qt/Custom/5.5.0/gcc492_x64" -opensource -confirm-license -nomake examples -nomake tests -opengl desktop > make -j 5 > make install
Here's an explanation for the 4 steps above:
- Go to the top-level directory
prefixsets the installation directory (DO NOT move/copy any files manually).
nomakesaves compilation time -- it avoids building the examples and test files. Remove these options if you want to build those files.
- Replace the
opengloption with your own choice
jtells Make to use multiple threads, to speed up compilation
- Install the files into your
prefix(DO NOT move/copy any files manually)
musimbate last edited by
does anything weird happen when you copy/move the binaries manually?
Yes. The installation paths are built into the compiled libraries themselves. If you move them manually, your development libraries will contain the wrong paths. Things might still work (sometimes)... but this scenario not supported.
Eyeless last edited by
@JKSH Thank you very much for your answer, I've successfully built Qt using your tutorial!