Build Qt Static Make Error - [SOLVED]



  • Hi guys!
    I'm trying make qt from source and this error occurs:

    In file included from debugger/qqmldebugconnector.cpp:34:0:
    debugger/qqmldebugconnector.cpp: In function ‘QList<QJsonObject> metaDataForQQmlDebugConnector()’:
    debugger/qqmldebugpluginmanager_p.h:65:34: error: temporary of non-literal type ‘QJsonObject’ in a constant expression
             return QList<QJsonObject();\
                                      ^
    debugger/qqmldebugconnector.cpp:49:1: note: in expansion of macro ‘Q_QML_DEBUG_PLUGIN_LOADER’
     Q_QML_DEBUG_PLUGIN_LOADER(QQmlDebugConnector)
     ^
    In file included from /home/lays/qt5/qtbase/include/QtCore/qjsonobject.h:1:0,
                     from /home/lays/qt5/qtbase/include/QtCore/QtCore:58,
                     from ../../include/QtQml/QtQmlDepends:3:
    /home/lays/qt5/qtbase/include/QtCore/../../src/corelib/json/qjsonobject.h:52:21: note: ‘QJsonObject’ is not literal because:
     class Q_CORE_EXPORT QJsonObject
                         ^
    /home/lays/qt5/qtbase/include/QtCore/../../src/corelib/json/qjsonobject.h:52:21: note:   ‘QJsonObject’ has a non-trivial destructor
    In file included from debugger/qqmldebugconnector.cpp:34:0:
    debugger/qqmldebugpluginmanager_p.h:65:34: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class QList’
             return QList<QJsonObject();\
                                      ^
    debugger/qqmldebugconnector.cpp:49:1: note: in expansion of macro ‘Q_QML_DEBUG_PLUGIN_LOADER’
     Q_QML_DEBUG_PLUGIN_LOADER(QQmlDebugConnector)
     ^
    debugger/qqmldebugpluginmanager_p.h:65:34: error:   expected a type, got ‘QJsonObject()’
             return QList<QJsonObject();\
                                      ^
    debugger/qqmldebugconnector.cpp:49:1: note: in expansion of macro ‘Q_QML_DEBUG_PLUGIN_LOADER’
     Q_QML_DEBUG_PLUGIN_LOADER(QQmlDebugConnector)
     ^
    debugger/qqmldebugconnector.cpp: In function ‘QList<QJsonObject> metaDataForQQmlDebugService()’:
    debugger/qqmldebugpluginmanager_p.h:65:34: error: temporary of non-literal type ‘QJsonObject’ in a constant expression
             return QList<QJsonObject();\
                                      ^
    debugger/qqmldebugconnector.cpp:52:1: note: in expansion of macro ‘Q_QML_DEBUG_PLUGIN_LOADER’
     Q_QML_DEBUG_PLUGIN_LOADER(QQmlDebugService)
     ^
    debugger/qqmldebugpluginmanager_p.h:65:34: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class QList’
             return QList<QJsonObject();\
                                      ^
    debugger/qqmldebugconnector.cpp:52:1: note: in expansion of macro ‘Q_QML_DEBUG_PLUGIN_LOADER’
     Q_QML_DEBUG_PLUGIN_LOADER(QQmlDebugService)
     ^
    debugger/qqmldebugpluginmanager_p.h:65:34: error:   expected a type, got ‘QJsonObject()’
             return QList<QJsonObject();\
                                      ^
    debugger/qqmldebugconnector.cpp:52:1: note: in expansion of macro ‘Q_QML_DEBUG_PLUGIN_LOADER’
     Q_QML_DEBUG_PLUGIN_LOADER(QQmlDebugService)
     ^
    debugger/qqmldebugconnector.cpp: In function ‘QList<QJsonObject> metaDataForQQmlDebugConnector()’:
    debugger/qqmldebugpluginmanager_p.h:66:5: warning: control reaches end of non-void function [-Wreturn-type]
         }
         ^
    debugger/qqmldebugconnector.cpp:49:1: note: in expansion of macro ‘Q_QML_DEBUG_PLUGIN_LOADER’
     Q_QML_DEBUG_PLUGIN_LOADER(QQmlDebugConnector)
     ^
    debugger/qqmldebugconnector.cpp: In function ‘QList<QJsonObject> metaDataForQQmlDebugService()’:
    debugger/qqmldebugpluginmanager_p.h:66:5: warning: control reaches end of non-void function [-Wreturn-type]
         }
         ^
    debugger/qqmldebugconnector.cpp:52:1: note: in expansion of macro ‘Q_QML_DEBUG_PLUGIN_LOADER’
     Q_QML_DEBUG_PLUGIN_LOADER(QQmlDebugService)
     ^
    Makefile:51704: recipe for target '.obj/qqmldebugconnector.o' failed
    make[3]: *** [.obj/qqmldebugconnector.o] Error 1
    make[3]: Leaving directory '/home/lays/qt5/qtdeclarative/src/qml'
    Makefile:49: recipe for target 'sub-qml-make_first-ordered' failed
    make[2]: *** [sub-qml-make_first-ordered] Error 2
    make[2]: Leaving directory '/home/lays/qt5/qtdeclarative/src'
    Makefile:45: recipe for target 'sub-src-make_first' failed
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory '/home/lays/qt5/qtdeclarative'
    Makefile:223: recipe for target 'module-qtdeclarative-make_first' failed
    make: *** [module-qtdeclarative-make_first] Error 2
    
    

    To ./configure i use this:
    ./configure -prefix QtNew -release -opensource -confirm-license -static -no-qml-debug -qt-xcb -no-glib -no-pulseaudio -no-alsa -opengl

    Whats missing?
    Thanks!


  • Lifetime Qt Champion

    Hi,

    What version of Qt ? Where did you get the sources ? What distribution are you using ?



  • @SGaist Qt 5.5 clone from git link http://code.qt.io/qt/qt5.git .
    Debian 8


  • Lifetime Qt Champion

    Can you retry without -no-qml-debug ?



  • @SGaist The result: error again =/

    /home/lays/qt5/qtdeclarative/lib/libQt5Qml.a(qqmldebugconnector.o):qqmldebugconnector.cpp:function _GLOBAL__sub_I_qqmldebugconnector.cpp: error: undefined reference to 'qt_static_plugin_QQmlDebuggerServiceFactory()'
    collect2: error: ld returned 1 exit status
    Makefile:105: recipe for target 'chatserver' failed
    make[4]: *** [chatserver] Error 1
    make[4]: Leaving directory '/home/lays/qt5/qtwebchannel/examples/webchannel/chatserver-cpp'
    Makefile:47: recipe for target 'sub-chatserver-cpp-make_first' failed
    make[3]: *** [sub-chatserver-cpp-make_first] Error 2
    make[3]: Leaving directory '/home/lays/qt5/qtwebchannel/examples/webchannel'
    Makefile:42: recipe for target 'sub-webchannel-make_first' failed
    make[2]: *** [sub-webchannel-make_first] Error 2
    make[2]: Leaving directory '/home/lays/qt5/qtwebchannel/examples'
    Makefile:69: recipe for target 'sub-examples-make_first' failed
    make[1]: *** [sub-examples-make_first] Error 2
    make[1]: Leaving directory '/home/lays/qt5/qtwebchannel'
    Makefile:483: recipe for target 'module-qtwebchannel-make_first' failed
    make: *** [module-qtwebchannel-make_first] Error 2
    lays@lays:~/qt5$ 
    
    


  • One more make error on Ubuntu 15.04

    /usr/bin/ld.gold: .obj/moc_qm3uhandler.o: previous definition here
    /usr/bin/ld.gold: error: /home/lays/qt5/qtmultimedia/plugins/playlistformats/libqtmultimedia_m3u.a(moc_qm3uhandler.o): multiple definition of 'QM3uPlaylistPlugin::staticMetaObject'
    /usr/bin/ld.gold: .obj/moc_qm3uhandler.o: previous definition here
    /usr/bin/ld.gold: error: /home/lays/qt5/qtmultimedia/plugins/playlistformats/libqtmultimedia_m3u.a(moc_qm3uhandler.o): multiple definition of 'QM3uPlaylistPlugin::qt_metacast(char const*)'
    /usr/bin/ld.gold: .obj/moc_qm3uhandler.o: previous definition here
    /usr/bin/ld.gold: error: /home/lays/qt5/qtmultimedia/plugins/playlistformats/libqtmultimedia_m3u.a(moc_qm3uhandler.o): multiple definition of 'QM3uPlaylistPlugin::qt_metacall(QMetaObject::Call, int, void**)'
    /usr/bin/ld.gold: .obj/moc_qm3uhandler.o: previous definition here
    collect2: error: ld returned 1 exit status
    Makefile:115: recipe for target 'tst_qmediaplaylist' failed
    make[6]: *** [tst_qmediaplaylist] Error 1
    make[6]: Leaving directory '/home/lays/qt5/qtmultimedia/tests/auto/unit/qmediaplaylist'
    Makefile.multimedia:400: recipe for target 'sub-qmediaplaylist-make_first' failed
    make[5]: *** [sub-qmediaplaylist-make_first] Error 2
    make[5]: Leaving directory '/home/lays/qt5/qtmultimedia/tests/auto/unit'
    Makefile:42: recipe for target 'sub-multimedia-pro-make_first' failed
    make[4]: *** [sub-multimedia-pro-make_first] Error 2
    make[4]: Leaving directory '/home/lays/qt5/qtmultimedia/tests/auto/unit'
    Makefile:44: recipe for target 'sub-unit-make_first' failed
    make[3]: *** [sub-unit-make_first] Error 2
    make[3]: Leaving directory '/home/lays/qt5/qtmultimedia/tests/auto'
    Makefile:42: recipe for target 'sub-auto-make_first' failed
    make[2]: *** [sub-auto-make_first] Error 2
    make[2]: Leaving directory '/home/lays/qt5/qtmultimedia/tests'
    Makefile:94: recipe for target 'sub-tests-make_first' failed
    make[1]: *** [sub-tests-make_first] Error 2
    make[1]: Leaving directory '/home/lays/qt5/qtmultimedia'
    Makefile:299: recipe for target 'module-qtmultimedia-make_first' failed
    make: *** [module-qtmultimedia-make_first] Error 2
    lays@lays:~/qt5$ 
    
    

    With this configure: ./configure -prefix QtNew -release -developer-build -opensource -confirm-license -qt-xcb -opengl -static
    Am I doing something wrong?



  • If i try to make from qt everywere open source from source code on qt.io i receive this message on terminal:

    lays@lays:~$ cd qt-everywhere/
    lays@lays:~/qt-everywhere$ ./configure -prefix QtNew -release -developer-build -opensource -confirm-license -qt-xcb -opengl -static
    bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory
    lays@lays:~/qt-everywhere$ gedit configure
    lays@lays:~/qt-everywhere$ ./configure -prefix QtNew -release -developer-build -opensource -confirm-license -qt-xcb -opengl -static
    + cd qtbase
    + /home/lays/qt-everywhere/qtbase/configure -top-level -prefix QtNew -release -developer-build -opensource -confirm-license -qt-xcb -opengl -static
    ./configure: 49: exec: /home/lays/qt-everywhere/qtbase/configure: not found
    lays@lays:~/qt-everywhere$ cd qtbase/
    lays@lays:~/qt-everywhere/qtbase$ ./configure 
    bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory
    lays@lays:~/qt-everywhere/qtbase$ gedit configure
    lays@lays:~/qt-everywhere/qtbase$ cd ..
    lays@lays:~/qt-everywhere$ ./configure -prefix QtNew -release -developer-build -opensource -confirm-license -qt-xcb -opengl -static
    + cd qtbase
    + /home/lays/qt-everywhere/qtbase/configure -top-level -prefix QtNew -release -developer-build -opensource -confirm-license -qt-xcb -opengl -static
    You don't seem to have 'make' or 'gmake' in your PATH.
    Cannot proceed.
    lays@lays:~/qt-everywhere$ 
    
    

    After i edit the configre files for encode Unix.


  • Lifetime Qt Champion

    Don't build the examples nor the tests.

    And if you try to call configure again without cleaning the sources, it will fail.

    Do out of source builds, that way you can just nuke the failed build folder before trying again.



  • @SGaist When i try to make again, i download again the source from git, just in case. I dont try configure 2 or more time. Just one indeed. I just want to build qt static with opengl, what type of configuration do you indicate?
    Because this type of configuration worked for me before, i dont know whats happening now.


  • Lifetime Qt Champion

    ./configure -prefix QtNew -release -opensource -confirm-license -static -qt-xcb -no-glib -no-pulseaudio -no-alsa -opengl desktop -nomake examples -nomake tests

    [edit: Fixed option name SGaist]



  • @SGaist Thanks, its finally work!



  • Sorry for bumping old topic, but this one that first shown in google search.

    If someone stumbled upon something like:

    + qt-everywhere-opensource-src-5.9.1/qtbase/configure -top-level -static -no-make examples
    Creating qmake...
    .Done.
    ERROR: Invalid value 'no' supplied to command line option 'make'.
    
    ERROR: Invalid command line parameter 'examples'.
    

    The correct command is -nomake not -no-make


  • Lifetime Qt Champion

    Typos typos... Thanks, I've fixed them.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.