Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. QtonPi
  4. QT cross-compile to Rpi4

QT cross-compile to Rpi4

Scheduled Pinned Locked Moved Unsolved QtonPi
10 Posts 3 Posters 2.3k 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
    Jonas Messerli
    wrote on 18 Jun 2020, 15:14 last edited by
    #1

    Hello everyone.
    I've looked in few diffrent tutorials, but get always stuck because they are not actualy for Raspi 4.

    Is there a good step by step guide for cross compiling qt for Raspberry Pi 4 on Linux (Ubuntu) ?

    thanks for any hints.

    P 1 Reply Last reply 18 Jun 2020, 15:46
    0
    • J Jonas Messerli
      18 Jun 2020, 15:14

      Hello everyone.
      I've looked in few diffrent tutorials, but get always stuck because they are not actualy for Raspi 4.

      Is there a good step by step guide for cross compiling qt for Raspberry Pi 4 on Linux (Ubuntu) ?

      thanks for any hints.

      P Offline
      P Offline
      Pablo J. Rogina
      wrote on 18 Jun 2020, 15:46 last edited by
      #2

      @Jonas-Messerli said in QT cross-compile to Rpi4:

      I've looked in few diffrent tutorials

      Could you name/line them?

      but get always stuck

      Could you please describe the step(s) or the error(s)?

      In addition, could you please tell about your environment, i.e. OS in RPi4, OS in host, tools for cross-compile, etc.

      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
      • J Offline
        J Offline
        Jonas Messerli
        wrote on 20 Jun 2020, 06:30 last edited by
        #3

        So here are the metrics

        Raspberry Pi 4 with the Raspberry OS (Buster 2020-05-27)

        Host PC:
        VM with Ubuntu 20.04 LTS

        I followed this tutorial:
        https://www.interelectronix.com/de/qt-auf-dem-raspberry-pi-4.html

        But instead of qt 5.14 I used the 5.15 LTS version.

        After some path problems I managed to configure, make and make install QT on the host pc.
        By executing a compiled program however, I get
        "Could not queue DRM page flip on screen DSI1 (Invalid argument)"

        Thanks for helping

        P 1 Reply Last reply 20 Jun 2020, 22:08
        0
        • J Jonas Messerli
          20 Jun 2020, 06:30

          So here are the metrics

          Raspberry Pi 4 with the Raspberry OS (Buster 2020-05-27)

          Host PC:
          VM with Ubuntu 20.04 LTS

          I followed this tutorial:
          https://www.interelectronix.com/de/qt-auf-dem-raspberry-pi-4.html

          But instead of qt 5.14 I used the 5.15 LTS version.

          After some path problems I managed to configure, make and make install QT on the host pc.
          By executing a compiled program however, I get
          "Could not queue DRM page flip on screen DSI1 (Invalid argument)"

          Thanks for helping

          P Offline
          P Offline
          Pablo J. Rogina
          wrote on 20 Jun 2020, 22:08 last edited by
          #4

          @Jonas-Messerli said in QT cross-compile to Rpi4:

          make install QT on the host pc.

          and then did you rsync the Qt libraries to the target device?

          You're supposed to have done this step:

          Die fertig kompilierten Qt-Bibliotheken werden abschließend noch mittels rsync auf den Raspberry Pi kopiert:
          

          cd /opt/RaspberryQt
          rsync -avz sysroot/usr/local/RaspberryQt root@:/usr/local

          By executing a compiled program however, I get
          "Could not queue DRM page flip on screen DSI1 (Invalid argument)"

          By executing where? Host or target device?

          If in target, how did you run the Qt app? Have you stated any -platform argument?

          You may have hit issue QTBUG-72538...

          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
          • J Offline
            J Offline
            Jonas Messerli
            wrote on 21 Jun 2020, 08:27 last edited by Jonas Messerli
            #5
            1. Oh, didn't realize the tutorial was in German, however yes I rsync the compiled version of qt to the pi.
            2. How do I run a program with the -platform argument?

            The error comes up when I start the program from the qt creator as well as when I start it directly on the pi.

            However, I managed to get rid of this error message by export QT_QPA_EGLFS_ALWAYS_SET_MODE="1" on the pi. And the program/gui gets displayed.
            source: https://www.raspberrypi.org/forums/viewtopic.php?t=252614
            But I don't know what it does and I still get this error when I start the program over the qt creator.

            And I get this error message as well. It seems to be that the program doesnt run on the gpu as it is supposed to be:
            Running on a software rasterizer (LLVMpipe), expect limited performance.

            Thanks for your help

            P 1 Reply Last reply 22 Jun 2020, 15:09
            0
            • R Offline
              R Offline
              robd
              wrote on 22 Jun 2020, 14:32 last edited by
              #6

              Hi there is a very good tutorial on YouTube search for Ulas Dikme he cross compiled to pi4.

              1 Reply Last reply
              0
              • J Jonas Messerli
                21 Jun 2020, 08:27
                1. Oh, didn't realize the tutorial was in German, however yes I rsync the compiled version of qt to the pi.
                2. How do I run a program with the -platform argument?

                The error comes up when I start the program from the qt creator as well as when I start it directly on the pi.

                However, I managed to get rid of this error message by export QT_QPA_EGLFS_ALWAYS_SET_MODE="1" on the pi. And the program/gui gets displayed.
                source: https://www.raspberrypi.org/forums/viewtopic.php?t=252614
                But I don't know what it does and I still get this error when I start the program over the qt creator.

                And I get this error message as well. It seems to be that the program doesnt run on the gpu as it is supposed to be:
                Running on a software rasterizer (LLVMpipe), expect limited performance.

                Thanks for your help

                P Offline
                P Offline
                Pablo J. Rogina
                wrote on 22 Jun 2020, 15:09 last edited by
                #7

                @Jonas-Messerli said in QT cross-compile to Rpi4:

                when I start the program over the qt creator

                Are you setting the same environment when running from Qt Creator that you set when running from the device?
                i.e. by doing having QT_QPA_EGLFS_ALWAYS_SET_MODE="1" from Qt Creator?

                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
                • J Offline
                  J Offline
                  Jonas Messerli
                  wrote on 22 Jun 2020, 15:15 last edited by
                  #8

                  @Pablo-J-Rogina said in QT cross-compile to Rpi4:

                  @Jonas-Messerli said in QT cross-compile to Rpi4:

                  when I start the program over the qt creator

                  Are you setting the same environment when running from Qt Creator that you set when running from the device?
                  i.e. by doing having QT_QPA_EGLFS_ALWAYS_SET_MODE="1" from Qt Creator?

                  How do I do that? I set the ssh user as user: pi and the environment var QT_QPA_EGLFS_ALWAYS_SET_MODE="1" get exported for the user pi. But do I have to set something in the QT Creator. I'm quite new in this Topic

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    Jonas Messerli
                    wrote on 3 Jul 2020, 07:09 last edited by
                    #9

                    Okay I figured it out. Just place the variables in to the qt creator in the build configuration.
                    Now everything is working.
                    Thanks for the help.

                    P 1 Reply Last reply 3 Jul 2020, 12:23
                    1
                    • J Jonas Messerli
                      3 Jul 2020, 07:09

                      Okay I figured it out. Just place the variables in to the qt creator in the build configuration.
                      Now everything is working.
                      Thanks for the help.

                      P Offline
                      P Offline
                      Pablo J. Rogina
                      wrote on 3 Jul 2020, 12:23 last edited by
                      #10

                      @Jonas-Messerli said in QT cross-compile to Rpi4:

                      Now everything is working.

                      Great!, please don't forget to mark your post as solved then.

                      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

                      • Login

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