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

Error while doing gmake



  • Hello

    Im trying to install Qt5 on my centos 8 machine.

    I could execute the configure command and now im trying to do gmake.

    But i get the following error -
    gmake[5]: Leaving directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtsvg/src/plugins/iconengines/svgiconengine'
    gmake[4]: Leaving directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtsvg/src/plugins/iconengines'
    gmake[3]: Leaving directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtsvg/src/plugins'
    gmake[2]: Leaving directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtsvg/src'
    gmake[1]: Leaving directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtsvg'
    cd qtdeclarative/ && ( test -e Makefile || /home/mansi/Downloads/gengetopt-2.10/qt5/qtbase/bin/qmake -o Makefile /home/mansi/Downloads/gengetopt-2.10/qt5/qtdeclarative/qtdeclarative.pro ) && gmake -f Makefile
    sh: python: command not found
    Project ERROR: Building QtQml requires Python.
    gmake: *** [Makefile:338: module-qtdeclarative-make_first] Error 3
    [mansi@localhost qt5]$

    I have installed Python my machine -
    [mansi@localhost Python-3.8.1]$ ls
    aclocal.m4 Include Modules python
    build install-sh Objects Python
    CODE_OF_CONDUCT.md Lib Parser python-config
    config.guess libpython3.8.a PC python-config.py
    config.log LICENSE PCbuild python-gdb.py
    config.status m4 platform README.rst
    config.sub Mac profile-run-stamp setup.py
    configure Makefile Programs Tools
    configure.ac Makefile.pre pybuilddir.txt
    Doc Makefile.pre.in pyconfig.h
    Grammar Misc pyconfig.h.in
    [mansi@localhost Python-3.8.1]$ py
    pydoc2 pydoc3.8 python2-config python3-config
    pydoc2.7 python2 python3 pyvenv-3.6
    pydoc3 python2.7 python3.8
    pydoc3.6 python2.7-config python3.8-config
    [mansi@localhost Python-3.8.1]$ py

    please tell me how to proceed.

    thanks


  • Lifetime Qt Champion

    python needs to be in your PATH so the Makefile can find it. Why do you use a custom python installation at all instead using one provided by the distribution?



  • so what do you suggest now.
    I couldn't find any link for python provided by the distribution.


  • Lifetime Qt Champion

    Hi,

    What distribution are you using ?



  • Its QT5 that im trying to install.
    And i have python version 2.7 and higher installed on my machine



  • @MansiMS what happens if you type python and hit Enter in your command line?



  • [mansi@localhost Downloads]$ python
    python2 python2.7-config python3 python3.8-config
    python2.7 python2-config python3.8 python3-config

    [mansi@localhost Downloads]$ python2.7
    Python 2.7.15 (default, Oct 8 2019, 21:08:29)
    [GCC 8.2.1 20180905 (Red Hat 8.2.1-3)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.


  • Lifetime Qt Champion

    What version of Qt are you trying to build ?



  • Im building qt5 on my centos machine.

    I was getting a error related to python.
    So now, i used this command :

    [mansi@localhost qt5]$ alias python=/usr/lib/python3.6

    To make sure it takes in python command.

    Then again I try to build by using make -j4 command.
    I still get the following errors:
    sh: python: command not found
    Project ERROR: Building QtQml requires Python.
    make: *** [Makefile:338: module-qtdeclarative-make_first] Error 3
    make: *** Waiting for unfinished jobs....
    cd tinycan/ && ( test -e Makefile || /home/mansi/Downloads/gengetopt-2.10/qt5/qtbase/bin/qmake -o Makefile /home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus/src/plugins/canbus/tinycan/tinycan.pro ) && make -f Makefile
    make[5]: Entering directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus/src/plugins/canbus/passthrucan'
    make[5]: Nothing to be done for 'first'.
    make[5]: Leaving directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus/src/plugins/canbus/passthrucan'
    make[5]: Entering directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus/src/plugins/canbus/socketcan'
    make[5]: Nothing to be done for 'first'.
    make[5]: Leaving directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus/src/plugins/canbus/socketcan'
    make[5]: Entering directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus/src/plugins/canbus/peakcan'
    make[5]: Nothing to be done for 'first'.
    make[5]: Leaving directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus/src/plugins/canbus/peakcan'
    make[5]: Entering directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus/src/plugins/canbus/tinycan'
    make[5]: Nothing to be done for 'first'.
    make[5]: Leaving directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus/src/plugins/canbus/tinycan'
    make[4]: Leaving directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus/src/plugins/canbus'
    make[3]: Leaving directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus/src/plugins'
    cd tools/ && ( test -e Makefile || /home/mansi/Downloads/gengetopt-2.10/qt5/qtbase/bin/qmake -o Makefile /home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus/src/tools/tools.pro ) && make -f Makefile
    cd serialbus/doc/snippets/ && ( test -e Makefile || /home/mansi/Downloads/gengetopt-2.10/qt5/qtbase/bin/qmake -o Makefile /home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus/src/serialbus/doc/snippets/snippets.pro ) && make -f Makefile
    make[3]: Entering directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus/src/tools'
    cd canbusutil/ && ( test -e Makefile || /home/mansi/Downloads/gengetopt-2.10/qt5/qtbase/bin/qmake -o Makefile /home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus/src/tools/canbusutil/canbusutil.pro ) && make -f Makefile
    make[3]: Entering directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus/src/serialbus/doc/snippets'
    make[3]: Nothing to be done for 'first'.
    make[3]: Leaving directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus/src/serialbus/doc/snippets'
    make[4]: Entering directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus/src/tools/canbusutil'
    make[4]: Nothing to be done for 'first'.
    make[4]: Leaving directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus/src/tools/canbusutil'
    make[3]: Leaving directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus/src/tools'
    make[2]: Leaving directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus/src'
    make[1]: Leaving directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtserialbus'


  • Lifetime Qt Champion

    That doesn't answer my question: what exactly version of Qt 5 are you building ?

    By the way, your alias is wrong. You have aliased a folder.



  • I could solve the issue with python, but now I have another problem:

    I get the following error if i do make:

    In file included from ../../include/QtNetwork/5.12.6/QtNetwork/private/qtnetworkglobal_p.h:1,
    from access/qnetworkaccessauthenticationmanager_p.h:54,
    from access/qnetworkaccessauthenticationmanager.cpp:40:
    ../../include/QtNetwork/5.12.6/QtNetwork/private/../../../../../src/network/kernel/qtnetworkglobal_p.h:55:10: fatal error: QtCore/private/qglobal_p.h: No such file or directory
    #include <QtCore/private/qglobal_p.h>
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    make[3]: *** [Makefile:8910: .obj/qnetworkaccessauthenticationmanager.o] Error 1
    make[3]: Leaving directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtbase/src/network'
    make[2]: *** [Makefile:250: sub-network-make_first] Error 2
    make[2]: Leaving directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtbase/src'
    make[1]: *** [Makefile:51: sub-src-make_first] Error 2
    make[1]: Leaving directory '/home/mansi/Downloads/gengetopt-2.10/qt5/qtbase'
    make: *** [Makefile:85: module-qtbase-make_first] Error

    PLEASE HELP



  • To clarify about the version

    [mansi@localhost qt5]$ qmake-qt5 --version
    QMake version 3.1
    Using Qt version 5.11.1 in /usr/lib64


  • Lifetime Qt Champion

    Are you mixing your distribution provided Qt with the one you are trying to build ?


Log in to reply