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

QT 5.9.8 declarative fails to compile with "-no-opengl"



  • Hi All ,

    I am trying to compile QT (meta-qt version 5.9.8 ) without opengl support .
    by PACKAGECONFIG_append = " no-opengl" in qtbase_git.bbappend

    Due to this the qtdeclatrative fails to compile with below mentioned error :

    g .obj/qsgvertexcolormaterial.o:(.data.rel.ro+0x20): undefined reference to QSGMaterialShader::compile()' | .obj/qsgvertexcolormaterial.o:(.data.rel.ro+0x28): undefined reference toQSGMaterialShader::vertexShader() const'
    | .obj/qsgvertexcolormaterial.o:(.data.rel.ro+0x2c): undefined reference to QSGMaterialShader::fragmentShader() const' | .obj/qquickgraphicsinfo.o: In functionQQuickGraphicsInfo::updateInfo()':
    | /usr/src/debug/qtdeclarative/5.9.8+gitAUTOINC+145485bec9-r0.1/git/src/quick/items/qquickgraphicsinfo.cpp:264: undefined reference to `QOpenGLContext::format() const'
    | collect2: error: ld returned 1 exit status
    | make[2]: *** [Makefile:784: ../../lib/libQt5Quick.so.5.9.8] Error 1

    Can group member please provide any pointer .
    I was trying to get the QT compiled with "-no-opengl"
    Or let me know if i am missing any part here

    Thanks ,
    Ashish


  • Lifetime Qt Champion

    @Ashishx88 said in QT 5.9.8 declarative fails to compile with "-no-opengl":

    qtdeclatrative

    As far as I know OpenGL is hard requirement for this module. If you don't need it then disable it.



  • Thanks for sharing input jsulm !!

    Is there any way / mechanism / tool by which we can determine such dependencies for required modules.
    I checked the qtdeclarative recipe DEPENDS macro but could not see any dependency for opengl mentioned there.

    Hence can you let me know if there is any standard way to determine such dependency .

    Thanks
    Ashish


  • Moderators

    @Ashishx88 said in QT 5.9.8 declarative fails to compile with "-no-opengl":

    Is there any way / mechanism / tool by which we can determine such dependencies for required modules.
    I checked the qtdeclarative recipe DEPENDS macro but could not see any dependency for opengl mentioned there.

    Hence can you let me know if there is any standard way to determine such dependency .

    I'm not aware of any tool for checking such dependencies, but this documentation is a good place to start https://wiki.qt.io/Building_Qt_5_from_Git

    In a nutshell, qtdeclarative.git contains Qt's most advanced graphics features. In the past, OpenGL was the obvious choice for implementing cross-platform graphics -- that's why OpenGL is a hard dependency. However, more backends have become available recently so from Qt 6 onwards, OpenGL will become optional.


Log in to reply