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. [SOLVED]Qt cross compile Raspberry Pi
Forum Updated to NodeBB v4.3 + New Features

[SOLVED]Qt cross compile Raspberry Pi

Scheduled Pinned Locked Moved Mobile and Embedded
12 Posts 4 Posters 3.0k 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.
  • N Offline
    N Offline
    Noir89
    wrote on last edited by
    #1

    I install Qt on my Raspberry Pi with thi guide "Native Build":http://qt-project.org/wiki/Native_Build_of_Qt5_on_a_Raspberry_Pi. Now i want to compile on Ubuntu 14.04 for the Pi how can i setup my Qt to compile for my Raspberry?

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

      Hi and welcome to devnet,

      Do you already have a cross compiler ?

      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
      • N Offline
        N Offline
        Noir89
        wrote on last edited by
        #3

        I have no cross compiler.

        I had only a Raspberry with installed Qt

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

          Then have a look at the following "guide":http://qt-project.org/wiki/RaspberryPi_Beginners_guide

          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
          • N Offline
            N Offline
            Noir89
            wrote on last edited by
            #5

            Now, i have a Problem with this guide.
            There is a step to patch qtjsbackend, but i have no such directory after cloning and init the Qt5-repo.

            1 Reply Last reply
            0
            • yeckelY Offline
              yeckelY Offline
              yeckel
              wrote on last edited by
              #6

              Try using bakeqtpi.bash script from git@gitorious.org:bakeqtpi/yeckels-bakeqtpi.git I've updated the script recently. Do you really need qtjsbackend? You can safely skip this step. Try compiling the base first. You can get back to the modules later, some of them need additional libraries installed on the SD card image.

              1 Reply Last reply
              0
              • N Offline
                N Offline
                Noir89
                wrote on last edited by
                #7

                Now i can compile for the Rapsberry Pi, but some modules are not compiled (qtimageformats, qtjsbackend, qtxmlpatterns, qtsensors, qt3d, qtgraphicaleffects, qtjsondb. Missing or empty directory)

                Is it possible to change the target directory on the Raspberry? (Now it is /opt/)

                1 Reply Last reply
                0
                • yeckelY Offline
                  yeckelY Offline
                  yeckel
                  wrote on last edited by
                  #8

                  Just go to the directory with module (eg. ~/opt/qtsdk/qtsensors) and run @git checkout@ this should help. However you don't need most of the modules anyway.

                  If you were using bakeqtpi.bash script than you have two directories

                  @QT5PIPREFIX=/usr/local/qt5pi
                  QT5ROOTFSPREFIX=$ROOTFS/usr/local/qt5pi@

                  in /usr/local/qt5pi you have files (qmake) for cross-compiling on your Linux machine and in $ROOTFS/usr/local/qt5pi are runtime libraries. Is that what you want?

                  1 Reply Last reply
                  0
                  • N Offline
                    N Offline
                    Noir89
                    wrote on last edited by
                    #9

                    I mean in Qt after compiling my Project, Qt try to upload the file to /op/... on my Raspberry. Can i change this directory to /home/pi?

                    1 Reply Last reply
                    0
                    • yeckelY Offline
                      yeckelY Offline
                      yeckel
                      wrote on last edited by
                      #10

                      Ok, you have some project you are running:
                      @qmake
                      make
                      make install@

                      and this install is installing to /opt? Then change target.path = /home/pi/ in your .pro file.

                      1 Reply Last reply
                      0
                      • N Offline
                        N Offline
                        Noir89
                        wrote on last edited by
                        #11

                        Now all works fine.

                        Thank you.

                        1 Reply Last reply
                        0
                        • R Offline
                          R Offline
                          Red Baron
                          wrote on last edited by
                          #12

                          Just an update: qtjsbackend is no more in recent versions due to changes in QML and the fact it uses its own JS engine now instead of V8. As for whether one needs the JS - if you work with QML - YES!

                          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