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. Try to cross compile QT on raspbery pi2
Forum Updated to NodeBB v4.3 + New Features

Try to cross compile QT on raspbery pi2

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
15 Posts 6 Posters 4.2k Views 4 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.
  • Bass13200B Offline
    Bass13200B Offline
    Bass13200
    wrote on last edited by Bass13200
    #6

    Hi, I have been trying for a number of days/weeks to compile Qt on Raspberry pi2 too.
    One of them with Qt 5.4.1, the other one with Qt 5.6.0

    I ran into problems regarding missing openvg.h, bcm_host.h, and a couple of other header files more or less related to VCOS.

    I did not yet consider a clean and professional solution, just wanted to make the Qt compile run in a first approach, and I could build both configurations (5.4.1 and 5.6.0, details below). I still have 2 major issues:

    with 5.4.1:

    • I managed to build the demo "cube" Qt program and it runs well, in full screen.
    • I managed to build my own QWidget based program, all the gui runs well (in full screen too), the issue is with QBluetooth layer, the "QBluetoothLocalDevice" always returns null (no local BT dongle found), although hciconfig/hcitool/gatttool work well, being able to connect to my external Bt peripheral, to scan, etc..

    with Qt 5.6.0:
    I can execute qmake and make on my own program, the same as here above, I can launch it, I have writen some QDebug() statements in the constructors, the first one displays something, and then my program aborts with the message:
    <<EGL Error : Could not create the egl surface: error = 0x3005>>

    Anyway, here is what I did to be able to build Qt on the Pi2, I know it is dirty, but it was just to understand what occured, and it sounds that these issues are long time known, some references to header files are not well addressed:
    1°) push all /opt/vc/include header files right into ./qtbase/include directory:
    cd ~/my_Qt_install_path/qtbase/include
    cp -R /opt/vc/include/* .

    2°) push all header files related to .../vcos/pthreads directory, one step upper in the hierarchy tree, right into vcos directory:
    cd ~/my_Qt_install_path/qtbase/include/interface/vcos/pthreads
    cp * ../.
    3°) push all header files related to vmcs_host/linux, one step upper in the hierarchy tree, right into vmcs_host directory
    cd ~/my_Qt_install_path/qtbase/include/interface/vmcs_host/linux
    cp -R * ../.

    Only after that I was able to configure / make / make install Qt natively on my Rpi's

    The Bluetooth and EGL issues remain, I'm stil working on them.
    Hope this could help

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kuzulis
      Qt Champions 2020
      wrote on last edited by
      #7

      Just add this lines to the /mkspecs/devices/linux-rasp-pi2-g++/qmake.conf

      # My
      QMAKE_INCDIR += $$[QT_SYSROOT]/opt/vc/include \
                      $$[QT_SYSROOT]/opt/vc/include/interface/vcos/pthreads \
                      $$[QT_SYSROOT]/opt/vc/include/interface/vmcs_host/linux
      

      this QMAKE_INCDIR is duplicate of QMAKE_INCDIR_EGL, because QMAKE_INCDIR_EGL does not handles by unknown reason.

      paavo91P 1 Reply Last reply
      0
      • K kuzulis

        Just add this lines to the /mkspecs/devices/linux-rasp-pi2-g++/qmake.conf

        # My
        QMAKE_INCDIR += $$[QT_SYSROOT]/opt/vc/include \
                        $$[QT_SYSROOT]/opt/vc/include/interface/vcos/pthreads \
                        $$[QT_SYSROOT]/opt/vc/include/interface/vmcs_host/linux
        

        this QMAKE_INCDIR is duplicate of QMAKE_INCDIR_EGL, because QMAKE_INCDIR_EGL does not handles by unknown reason.

        paavo91P Offline
        paavo91P Offline
        paavo91
        wrote on last edited by paavo91
        #8

        @kuzulis

        with single $ or double $ $ before [QT_SYSROOT] ?

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kuzulis
          Qt Champions 2020
          wrote on last edited by kuzulis
          #9

          Of course, double, as in QMAKE_INCDIR_EGL ... seems that Markdown eat one symbol..

          @SGaist, is it a forum's engine bug? because I see from the preview two $ $ symbols.

          paavo91P 2 Replies Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #10

            @kuzulis AFAIK, it's a "feature" of the markdown renderer. I'd say something to ask to the NodeBB folks

            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
            • K kuzulis

              Of course, double, as in QMAKE_INCDIR_EGL ... seems that Markdown eat one symbol..

              @SGaist, is it a forum's engine bug? because I see from the preview two $ $ symbols.

              paavo91P Offline
              paavo91P Offline
              paavo91
              wrote on last edited by
              #11

              @kuzulis I've done what you suggest, and now I still get errors after ./configure but when I do make everything went good without errors.

              1 Reply Last reply
              0
              • paavo91P Offline
                paavo91P Offline
                paavo91
                wrote on last edited by
                #12

                I got it!! Finally it works :)
                But I have a question. Why, when I deploy application from QT to raspberry I can see it only when I connect display with HDMI, but I can't see it when I connect to raspberry through vncviewer? Where are configuration files which tells raspberry to display application on specific device?

                Thanks

                1 Reply Last reply
                0
                • K kuzulis

                  Of course, double, as in QMAKE_INCDIR_EGL ... seems that Markdown eat one symbol..

                  @SGaist, is it a forum's engine bug? because I see from the preview two $ $ symbols.

                  paavo91P Offline
                  paavo91P Offline
                  paavo91
                  wrote on last edited by
                  #13

                  bump
                  @kuzulis do you know?

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    kuzulis
                    Qt Champions 2020
                    wrote on last edited by
                    #14

                    no, I don't know

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      skypuppy
                      wrote on last edited by
                      #15

                      I had that same problem. For mine, I had to replace the ~ character with the full pathname for each time it was used in the ./configure command. You'll have to "make clean" first, now that you've run it once.

                      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