Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Cross-Platform Raspberry Pi Compilation Issues
Forum Updated to NodeBB v4.3 + New Features

Cross-Platform Raspberry Pi Compilation Issues

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
4 Posts 2 Posters 1.2k Views 2 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.
  • bockscaracerB Offline
    bockscaracerB Offline
    bockscaracer
    wrote on last edited by bockscaracer
    #1

    I've been trying to figure out how to get my code to compile with aarch64. I found QtRpi which provides some magical scripts that wire everything up for you, but I would like to figure this out and understand it all on my own.

    I have a Raspberry Pi 3 running Raspbian, and I have all of the Qt libs and compilers installed on it. I have my Linux desktop which also has everything setup to compile x64 applications. I've added my Raspberry Pi as an external device to QtCreator. However I am unable to figure out where to go from here. Everything I compile still uses my x64 compilers, and the Qt version installed on my desktop.

    The documentation I've found for cross-platform compilation is extremely obscure and hasn't helped much so far. I have Qt libs on my Pi and I can run Qt applications installed from the software repos. My issue is that I have no idea how to have my desktop machine compile for aarch64.

    1 Reply Last reply
    0
    • bockscaracerB Offline
      bockscaracerB Offline
      bockscaracer
      wrote on last edited by
      #2

      Partly reply to my own question as I suspect I am seeing some kind of bug with QtCreator -

      My IoT device is a Raspberry Pi 3 B+. I've installed QtCreator & all of the Qt 5.7.1 development libs, along with GCC & G++, both of them are arm-linux-gnueabihf. My Qt version is Qt 5.7.1 arm-linux-gnueabihf. Notice that my Compiler and Qt library architectures match.

      When I setup my kit on my Pi 3 via QtCreator, I get a warning that states Device type is not supported by Qt version. Despite this, I am able to compile Qt 5.7.1 compatible code without any problems at all (from on my Raspberry Pi).

      However, I am still stumped as to why I am unable to cross-compile with QtCreator on my desktop despite having my Pi 3 device configured correctly. When I select the kit that contains my Pi 3, I now see this warning -

      :-1: warning: "/usr/bin/gcc" is used by qmake, but "/usr/bin/arm-none-eabi-gcc-7.3.0" is configured in the kit.
      Please update your kit or choose a mkspec for qmake that matches your target environment better.
      

      Problem is, I can't seem to find or otherwise select any other Qt version or qmake on my desktop. I tried using qmake via ssh from my Desktop to the Pi 3, but the configuration won't save.

      1 Reply Last reply
      1
      • bockscaracerB Offline
        bockscaracerB Offline
        bockscaracer
        wrote on last edited by
        #3

        Haven't had anybody respond to this thread so I'll post another update.

        I have somewhat given up on cross-compiling from my Desktop to my rpi via QtCreator. I even tried out the QtRpi script and it failed when trying to create the folders and libs on the Pi.

        I do have a workaround, albeit a pretty old-school one - just use SSH.

        The applications I write are pretty small so it's not a problem to just have the Pi itself compile all the code. Here are the steps I follow:

        1. I write & test my code on my development platform (right now it is Manjaro Linux, but it would be Windows just the same)
        2. Check the source code into GitHub
        3. SSH into my rpi
        4. Pull the code I checked in step #2
        5. Run Make and all the other Qt goodies from the terminal - no QtCreator needed.

        The only thing I haven't quite figured out yet is now to configure the project from the command line, the way QtCreator configures a project the first time you open it. Other than that, this method works out of the box and I highly recommend it over spending hours or days trying to get cross-compilation working on the rpi.

        1 Reply Last reply
        1
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi
          With QtRPI script, you mean from here ?
          http://www.qtrpi.com/home
          Yes cross compiling is a time sink.

          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