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. Cross compile Qt 5.12.5 for raspberry pi 4

Cross compile Qt 5.12.5 for raspberry pi 4

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
7 Posts 6 Posters 4.5k 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.
  • J Offline
    J Offline
    Jcaeiro
    wrote on last edited by Jcaeiro
    #1

    Hi,

    After a lot of head banging trying to make this work, I've managed to compile QT 5.12.5 on an Ubuntu VM, and successfully deploy & Run code from QT Creator into RPI4.

    I'm using QT Creator 4.11.0 which I've installed directly from QT website binaries.

    My Raspberry PI 4 is running Raspbian GNU/Linux 10 (buster).
    My Ubuntu is 18.04.3 LTS.

    I've compiled QT 5.12.5 using the following Configure command:
    ./configure -release -opengl es2 -device linux-rasp-pi-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 -skip qtwayland -skip qtlocation -skip qtscript -make libs -make examples -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -no-use-gold-linker -v -no-gbm

    I've followed a tutorial which advised to substitute all references to -lEGL and -LGLESv2 for -lbrcmEGL and -lbrcmGLESv2, respectively in file ./qtbase/mkspecs/devices/linux-rasp-pi-g++/qmake.conf, before compiling, which I did.

    The odd thing is, GUI programs don't show any output when running from QT Creator. Creator reports no error, and I can see a process for the program in question running on the remote machine, but no output is generated in either host or remote machine.
    If I walk to the remote machine and run the program directly it works without issues.
    My RPI is connected to a 10" HDMI screen.

    I've used raspi-config to set the GL driver to Legacy, since the "GL (fake KMS) Open GL Desktop driver" would result in error "failed to add service - Allready in use?" in QT Creator.

    I've tested X11 output between Windows 10 and RPI, using putty and xming.
    I can successfully launch any application, except the ones generated in QT Creator, which again, run but produce no output.
    Non-QT Project / Plain C Application, successfully runs and shows appropriate output in QT Creator/Application Output tab.

    What might be the problem?

    Many thanks in advance.
    José Caeiro

    1 Reply Last reply
    0
    • I Offline
      I Offline
      isdsi
      wrote on last edited by
      #2

      Do you mean 'no output' is 'lcd hdmi display'?
      Did you try to run console application?
      I am wondering about the life of the process and a debug message from rpi.

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jcaeiro
        wrote on last edited by
        #3

        Hi isdsi,

        I've built a small Qt Console Application which seems to run fine. Output appears in QT Creator "Application Output" tab. (not really sure if I'm supposed to see any output in the remote system).

        1 Reply Last reply
        0
        • M Offline
          M Offline
          MajidKamali
          wrote on last edited by
          #4

          Try running application in RPI with --platform eglfs and see if the problem exists. I think Qt creator automatically adds this argument to ssh-deployed program

          1 Reply Last reply
          0
          • J Offline
            J Offline
            JoeBot
            wrote on last edited by
            #5

            Can you please provide a link to the tutorial regarding the substitution of " -lEGL and -LGLESv2 for -lbrcmEGL and -lbrcmGLESv2, respectively in file ./qtbase/mkspecs/devices/linux-rasp-pi-g++/qmake.conf"

            Pablo J. RoginaP 1 Reply Last reply
            0
            • J JoeBot

              Can you please provide a link to the tutorial regarding the substitution of " -lEGL and -LGLESv2 for -lbrcmEGL and -lbrcmGLESv2, respectively in file ./qtbase/mkspecs/devices/linux-rasp-pi-g++/qmake.conf"

              Pablo J. RoginaP Offline
              Pablo J. RoginaP Offline
              Pablo J. Rogina
              wrote on last edited by
              #6

              @JoeBot said in Cross compile Qt 5.12.5 for raspberry pi 4:

              Can you please provide a link to the tutorial regarding the substitution of " -lEGL and -LGLESv2

              I guess he followed this tutorial, pay attention to step #6.

              Upvote the answer(s) that helped you solve the issue
              Use "Topic Tools" button to mark your post as Solved
              Add screenshots via postimage.org
              Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

              1 Reply Last reply
              0
              • P Offline
                P Offline
                PiotrPr
                wrote on last edited by
                #7

                Hello.

                I have exactly the same problem with gui not showing on the target device (Raspberry Pi 4). I followed the same tutorial and apps compile on the Pi and I can run them by double-clicking or from terminal but not from Qt Creator directly. I found here to try setting the DISPLAY environment variable in the RUN configuration in Qt Creator. I did as the author of the thread but with no success. The app deploys and runs, I can see it in the processes list but doesn't show on the screen. Has anyone found the solution for this?

                Thanks.

                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