Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Error QOpenGLShader: could not create shader
Forum Updated to NodeBB v4.3 + New Features

Error QOpenGLShader: could not create shader

Scheduled Pinned Locked Moved Solved Mobile and Embedded
3 Posts 2 Posters 3.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    abdussalam
    wrote on last edited by
    #1

    Hi,
    I am new to qt and I just set-up cross-compilation on my raspberry pi using the below guide.
    https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/
    After this I tried to run a simple widget program and it gave me below error :
    '''
    QOpenGLShader: could not create shader
    Could not link shader program:
    ""
    QOpenGLShaderProgram: could not create shader program
    QOpenGLShader: could not create shader
    QOpenGLShaderProgram::uniformLocation(texture): shader program is not linked
    QOpenGLShaderProgram::uniformLocation(mat): shader program is not linked
    '''
    And the raspberry pi screen goes blank instead of showing the simple label it had . Any guidance as to what this error is related to and how to solve it would be grately appreciated.
    I am using Raspberry Pi 3 running raspbian stretch, and im compiling qt 5.12.3 using ubuntu 16.04 .

    1 Reply Last reply
    0
    • A Offline
      A Offline
      abdussalam
      wrote on last edited by abdussalam
      #2

      Problem Solved . Found it in one of the comments of the same site:
      https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/

      Typing it again .
      It seems like the lib /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 is wrong.
      The right lib is /opt/vc/lib/libbrcmGLESv2.so
      So, make a backup of /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 then
      rm /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2

      and :

      ln -s /opt/vc/lib/libbrcmGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2
      
      I can now run my cross compiled app from Qt Creator on Rasp.
      
      S 1 Reply Last reply
      2
      • A abdussalam

        Problem Solved . Found it in one of the comments of the same site:
        https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/

        Typing it again .
        It seems like the lib /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 is wrong.
        The right lib is /opt/vc/lib/libbrcmGLESv2.so
        So, make a backup of /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 then
        rm /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2

        and :

        ln -s /opt/vc/lib/libbrcmGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2
        
        I can now run my cross compiled app from Qt Creator on Rasp.
        
        S Offline
        S Offline
        Stevenm
        wrote on last edited by
        #3

        @abdussalam Thank you ! Really !

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved