Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to compile for Arm/Raspberry
QtWS25 Last Chance

How to compile for Arm/Raspberry

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 4 Posters 354 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.
  • O Offline
    O Offline
    ocgltd
    wrote on 29 Mar 2023, 14:15 last edited by
    #1

    I've spent over an hour looking for a simple guide to compile for Raspbian (arm) from Linux (x86_64). I assumed that all I needed to do was setup a kit (gcc options etc) but every guide seems to go in a different direction.

    Most guides want me to install Qt Creator or compilation tools on the raspberry. Not what I want. I should point out that there is a Github project which compiles various versions of the Qt libraries for Raspbian. My plan was to load the needed libraries that way.

    Is there something wrong with my expectations? Shouldn't this be simple matter of creating the right kit? Is there such a guide?

    ? 1 Reply Last reply 29 Mar 2023, 14:55
    0
    • O ocgltd
      29 Mar 2023, 14:15

      I've spent over an hour looking for a simple guide to compile for Raspbian (arm) from Linux (x86_64). I assumed that all I needed to do was setup a kit (gcc options etc) but every guide seems to go in a different direction.

      Most guides want me to install Qt Creator or compilation tools on the raspberry. Not what I want. I should point out that there is a Github project which compiles various versions of the Qt libraries for Raspbian. My plan was to load the needed libraries that way.

      Is there something wrong with my expectations? Shouldn't this be simple matter of creating the right kit? Is there such a guide?

      ? Offline
      ? Offline
      A Former User
      wrote on 29 Mar 2023, 14:55 last edited by
      #2

      @ocgltd It's been a little while since I haven't run any linux ...

      Basically rapbian is just yet another linux distro built for ARM. Obviously it is possible to build to linux ARM from a linux x86_64 (and also reversely). I think it should be possible to build from x86_64 linux to raspbian and this is what I'd go for either.

      The question however, is how do you install on the raspberry pi the packages you built on your desktop linux. This might be the reason why your guides would build on pi rather than desktop.

      What I'd strongly suggest in this case is choosing for the desktop machine another debian based distro (like ubuntu, or Kubuntu for example) so you could build your .deb packages on your debian based desktop and easily install them on the pi.

      That's just my opinion and it's just theoretical opinion of course as I never tried it.

      O 1 Reply Last reply 29 Mar 2023, 17:21
      0
      • ? A Former User
        29 Mar 2023, 14:55

        @ocgltd It's been a little while since I haven't run any linux ...

        Basically rapbian is just yet another linux distro built for ARM. Obviously it is possible to build to linux ARM from a linux x86_64 (and also reversely). I think it should be possible to build from x86_64 linux to raspbian and this is what I'd go for either.

        The question however, is how do you install on the raspberry pi the packages you built on your desktop linux. This might be the reason why your guides would build on pi rather than desktop.

        What I'd strongly suggest in this case is choosing for the desktop machine another debian based distro (like ubuntu, or Kubuntu for example) so you could build your .deb packages on your debian based desktop and easily install them on the pi.

        That's just my opinion and it's just theoretical opinion of course as I never tried it.

        O Offline
        O Offline
        ocgltd
        wrote on 29 Mar 2023, 17:21 last edited by
        #3

        @ankou29666 I am fine copying the executable from my Linux PC to my Rasberry (scp). The confusing part is setting up the kit/compilation settings.

        I don't want to compile ON a rasberry, I want to cross-compile

        R 1 Reply Last reply 30 Mar 2023, 06:59
        0
        • O ocgltd
          29 Mar 2023, 17:21

          @ankou29666 I am fine copying the executable from my Linux PC to my Rasberry (scp). The confusing part is setting up the kit/compilation settings.

          I don't want to compile ON a rasberry, I want to cross-compile

          R Offline
          R Offline
          realtime_embedded
          wrote on 30 Mar 2023, 06:59 last edited by
          #4

          @ocgltd Hi,

          Maybe have a look at this? https://www.ics.com/blog/configuring-qt-creator-raspberry-pi

          O 1 Reply Last reply 3 May 2023, 22:21
          0
          • R realtime_embedded
            30 Mar 2023, 06:59

            @ocgltd Hi,

            Maybe have a look at this? https://www.ics.com/blog/configuring-qt-creator-raspberry-pi

            O Offline
            O Offline
            ocgltd
            wrote on 3 May 2023, 22:21 last edited by
            #5

            @realtime_embedded Sadly it's 7 years old and severly out of date....

            B 1 Reply Last reply 4 May 2023, 05:21
            0
            • O ocgltd
              3 May 2023, 22:21

              @realtime_embedded Sadly it's 7 years old and severly out of date....

              B Offline
              B Offline
              Bonnie
              wrote on 4 May 2023, 05:21 last edited by
              #6

              @ocgltd How about this:
              https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi

              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