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. Could not create shader pogram when cross-compiling for Raspbery Pi 3.

Could not create shader pogram when cross-compiling for Raspbery Pi 3.

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 3 Posters 907 Views
  • 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.
  • S Offline
    S Offline
    Szustarol
    wrote on last edited by
    #1

    Hello.
    I have recently set up my Qt Creator to build and deploy on raspberry Pi.
    I have used these configure options to set up my build:

    ./configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v -no-use-gold-linker -skip qtlocation -skip qtspeech -skip qtwebengine -skip qtandroidextras -skip qtgamepad -skip qtlocation -skip qtpurchasing -skip qtsvg -skip qtwebchannel -skip qtwebsockets -skip qtwebview -skip qtmultimedia -no-harfbuzz -skip qtwayland -no-cups -skip qtscript -skip qtscxml
    

    Then I ran make and make install. It all went smooth.
    Now, when I build and run the program in Qt Creator I get the following errors:

    QOpenGLShaderProgram: could not create shader program
    QOpenGLShader: could not create shader
    Could not link shader program:
     ""
    

    And the RPi screen goes dark. I can still control the process and stop it. I use SSH key pair to connect.

    Strange thing is, when I run the app from within Raspberry Pi it runs just fine, without any issues.
    This leads me to believe that there are some issues with the connection. Any ideas to solve this problem?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Where does your shader come from ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Szustarol
        wrote on last edited by
        #3

        Well I'm not really sure to be honest. I have just compiled QT from it's source and configured it to run on raspberry pi. It's not a custom shader or something like this.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What version of gcc are you using for the cross-compilation ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Szustarol
            wrote on last edited by Szustarol
            #5

            This is the output of --version:

            arm-linux-gnueabihf-g++ (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03) 4.8.3 20140303 (prerelease)
            Copyright (C) 2013 Free Software Foundation, Inc.
            This is free software; see the source for copying conditions.  There is NO
            warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
            
            1 Reply Last reply
            0
            • J Offline
              J Offline
              jmg227
              wrote on last edited by jmg227
              #6

              I just had the same problem. I was using https://wiki.qt.io/RaspberryPi2EGLFS for instructions on how to do the cross-compiling. It turns out that I had forgotten to do:
              step 13, update the ld config on the Raspberry Pi so that it could find the libraries, and
              step 14, Fix the EGL/GLES libraries.

              One thing I had done differently is that I did update the qmake.conf file to use the Broadcom drivers as recommended at https://bugreports.qt.io/browse/QTBUG-62216. The qmake.conf file that I modified was for linux-rasp-pi-g++

              I was building Qt 5.12.3 for a Raspberry Pi 3B running Raspbian Buster. Once I completed these two steps, my application runs without problems.

              1 Reply Last reply
              2

              • Login

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