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

qmake and mkspec folder



  • Hi , I wanted to ask that where does qmake looks for mkspec folder. Is it hardcoded inside the qmake during compile time ?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You can query qmake for that information.

    See here for more information.



  • Thanks for the answer. To give more context, I am building qt with prefix option. After the build is completed it is moved to a different location.
    When i run qmake -query I get the following paths which are incorrect

    QT_SYSROOT:
    QT_INSTALL_PREFIX:/usr/local/platform009
    QT_INSTALL_ARCHDATA:/usr/local/platform009
    QT_INSTALL_DATA:/usr/local/platform009
    QT_INSTALL_DOCS:/usr/local/platform009/doc
    QT_INSTALL_HEADERS:/usr/platform009/include
    QT_INSTALL_LIBS:/usr/local/platform009/lib
    QT_INSTALL_LIBEXECS:/usr/local/platform009/libexec
    QT_INSTALL_BINS:/usr/local/platform009/bin
    QT_INSTALL_TESTS:/usr/local/platform009/tests
    QT_INSTALL_PLUGINS:/usr/local/platform009/plugins
    QT_INSTALL_IMPORTS:/usr/local/platform009/imports
    QT_INSTALL_QML:/usr/local/platform009/qml
    QT_INSTALL_TRANSLATIONS:/usr/local/platform009/translations
    QT_INSTALL_CONFIGURATION:/usr/local/platform009/etc/xdg
    QT_INSTALL_EXAMPLES:/usr/local/platform009/examples
    QT_INSTALL_DEMOS:/usr/local/platform009/examples
    QT_HOST_PREFIX:/usr/local/platform009
    QT_HOST_DATA:/usr/local/platform009
    QT_HOST_BINS:/usr/local/platform009/bin
    QT_HOST_LIBS:/usr/local/platform009/lib
    QMAKE_SPEC:linux-g++
    QMAKE_XSPEC:linux-g++
    QMAKE_VERSION:3.1
    QT_VERSION:5.12.10

    so running qmake on my project results in mkspec not found. If i set QMAKESPEC it works but it then fails at
    Project ERROR: Could not find feature force_asserts.


  • Lifetime Qt Champion

    Hi,

    For a relocatable Qt build, see this article.



  • Thanks. Is this feature available in 5.12.10 ? Also we compile qt with static and shared version
    Interestingly it used to work with 5.9.1



  • Apparently 5.12.10 it does not support the feature

    ERROR: Enabling/Disabling unknown feature 'relocatable'.

    can i get away by setting all the variables using qmake -set QT_INSTALL_PREFIX "something" -set .... ?


  • Lifetime Qt Champion

    As the blog article says, it has started with Qt 5.14.

    What is your current issue ?


Log in to reply