Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Trying to build Qt 5.12.0 top-level build on Linux, does not recognize documented command line arguments



  • Hi all,

    I'm trying to build Qt 5.12.0 from the source code on CentOs 7.4. I did this on Windows without these issues with the exact same command. Here are the steps I've taken and the errors I'm seeing.

    Created the directory structure:

    • source
    • build
    • install

    Downloaded Qt 12.0 source: wget http://download.qt.io/official_releases/qt/5.12/5.12.0/single/qt-everywhere-src-5.12.0.tar.xz

    Extracted the code to the source directory: tar xJvf qt-everywhere-src-5.12.0.tar.xz -C source/

    Entered the build directory: cd build

    And tried to configure: ../source/configure -prefix ../install -release -platform linux-g++-32 -nomake examples -nomake tests -skip qtx11extras -skip qtwebview -skip qtwebsockets -skip qtwebglplugin -skip qtwebengine -skip qtwebchannel -skip qtwayland -skip qtvirtualkeyboard -skip qttranslations -skip qtspeech -skip qtserialport -skip qtserialbus -skip qtsensors -skip qtscript -skip qtremoteobjects -skip qtquickcontrols2 -skip qtquickcontrols -skip qtpurchasing -skip qtnetworkauth -skip qtmultimedia -skip qtmacextras -skip qtlocation -skip qtgamepad -skip qtdoc -skip qtdeclarative -skip qtdatavis3d -skip qtconnectivity -skip qtcharts -skip qtandroidextras -skip qtactiveqt -opensource -confirm-license -no-opengl

    The configure script adds -top-level into the command right before prefix, this shows up on the screen. The configure script seems to run, I get the output:

    • cd qtbase
    • <full_path>/source/qtbase/configure -top-level -prefix <full_path>/install -release -platform linux-g++-32 -nomake examples -nomake tests -skip qtx11extras -skip qtwebview -skip qtwebsockets -skip qtwebglplugin -skip qtwebengine -skip qtwebchannel -skip qtwayland -skip qtvirtualkeyboard -skip qttranslations -skip qtspeech -skip qtserialport -skip qtserialbus -skip qtsensors -skip qtscript -skip qtremoteobjects -skip qtquickcontrols2 -skip qtquickcontrols -skip qtpurchasing -skip qtnetworkauth -skip qtmultimedia -skip qtmacextras -skip qtlocation -skip qtgamepad -skip qtdoc -skip qtdeclarative -skip qtdatavis3d -skip qtconnectivity -skip qtcharts -skip qtandroidextras -skip qtactiveqt -opensource -confirm-license -no-opengl
    • Preparing build tree...
    • Creating qmake...
    • ............................................................................................Done.
    • Info: creating super cache file <full_path>/build/.qmake.super
    • Info: creating cache file /<full_path>/build/.qmake.cache
    • Project ERROR: -skip command line argument used with non-existent module 'qtx11extras'.

    I've tried removing all the skip commands and it tells me ERROR: Unknown command line option '-prefix'.

    When I remove that, it flags -release, etc. until I've removed everything and have just the configure command, at which point it will run to completion, but I don't need that type of build.

    Can anyone see anything obvious I'm doing incorrectly or what I can try to get it to understand the commands I pass in?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    That's indeed pretty surprising however, since it seems you only want to build qtbase, why not directly called configure in it ?



  • There's a few other modules I need besides base. I can't remember them off the top of my head but a few are qtsvg, qtimageformats, qtxmlpatterns. Can I build the ones I need individually?


  • Lifetime Qt Champion

    Yes, without any problem. You can start by qtbase and then build them on a "need to use" basis.



  • Just replying for anyone running into this in the future. The workaround did solve my issue. I was able to call the configure command from the qtbase dir:

    • qtbase/configure -prefix ../install -release -platform linux-g++ -nomake examples -nomake tests -opensource -confirm-license -no-opengl
    • gmake -j 8
    • gmake install

    Which installed to the ../install directory. Then you make the few other modules you need by referencing the qmake you just build with the .pro files in their source directory:

    • ../install/bin/qmake -makefile ../source/qttools/qttools.pro
    • gmake -j 8
    • gmake install

    Repeat for every module you need, it will install the finished results into the same install directory.


Log in to reply