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. Qt RaspberryPi 3B cross compile
Forum Updated to NodeBB v4.3 + New Features

Qt RaspberryPi 3B cross compile

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 6 Posters 1.3k Views 3 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.
  • C Offline
    C Offline
    Creatorczyk
    wrote on 27 Sept 2020, 17:20 last edited by
    #1

    Hi,

    I use Linux Ubuntu 18.04. I set up environment like in this article:

    https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/

    I can build project but when i try run it i get error:

    "Failed to create remote directories: mkdir: cannot create directory '/opt/my_program': Permission denied"

    I don't know what this may be caused by. Would someone be able to help me?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 27 Sept 2020, 17:22 last edited by
      #2

      Hi,

      /opt is not writable by standard users. You should install it elsewhere while developing.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      C 1 Reply Last reply 27 Sept 2020, 19:36
      0
      • S SGaist
        27 Sept 2020, 17:22

        Hi,

        /opt is not writable by standard users. You should install it elsewhere while developing.

        C Offline
        C Offline
        Creatorczyk
        wrote on 27 Sept 2020, 19:36 last edited by
        #3

        @SGaist Do you know how I could make it work?

        P 1 Reply Last reply 28 Sept 2020, 13:01
        0
        • A Offline
          A Offline
          Anonymous_Banned275
          wrote on 27 Sept 2020, 20:23 last edited by Anonymous_Banned275
          #4

          I have been cross compiling ( for RPi ) using different IDE and very obscure 3r party software . It is not much fun dodging Linux "security"

          Would this help ?

          https://developer.toradex.com/knowledge-base/how-to-set-up-qt-creator-to-cross-compile-for-embedded-linux

          Cheers

          1 Reply Last reply
          0
          • C Creatorczyk
            27 Sept 2020, 19:36

            @SGaist Do you know how I could make it work?

            P Offline
            P Offline
            Pablo J. Rogina
            wrote on 28 Sept 2020, 13:01 last edited by
            #5

            @Creatorczyk said in Qt RaspberryPi 3B cross compile:

            how I could make it work?

            You may need to change your project slightly, as @SGaist mentioned, to deploy to a place where the user connecting from Qt Creator has indeed right permissions. Relevant fragment from this good tutorial:

            If you picked the same project type that I did, you'll need to add some lines to the qmake project file so that qmake knows what files must be deployed to the target system to run the application. An easy way to do this is to edit (from Qt Creator) the project file and add these lines at the bottom:

            INSTALLS        = target
            target.files    = widgettest
            target.path     = /home/pi
            

            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
            1
            • M Offline
              M Offline
              Musshca
              wrote on 10 Jun 2021, 07:53 last edited by
              #6

              qt_response.PNG Hello,
              I have got the same issue and I solve it by:
              1- in .pro :
              target.path = /home/root #root is the name of the folder you want to create
              INSTALLS += target
              2- See the picture (I have written the name of executable )
              ![0_1623311567273_qt_response.PNG](Uploading 52%)

              That's worked for me.

              A 1 Reply Last reply 10 Jun 2021, 09:17
              1
              • M Musshca
                10 Jun 2021, 07:53

                qt_response.PNG Hello,
                I have got the same issue and I solve it by:
                1- in .pro :
                target.path = /home/root #root is the name of the folder you want to create
                INSTALLS += target
                2- See the picture (I have written the name of executable )
                ![0_1623311567273_qt_response.PNG](Uploading 52%)

                That's worked for me.

                A Offline
                A Offline
                artwaw
                wrote on 10 Jun 2021, 09:17 last edited by
                #7

                @Musshca /home/root/? WHY

                For more information please re-read.

                Kind Regards,
                Artur

                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