Qt RaspberryPi 3B cross compile
-
wrote on 27 Sept 2020, 17:20 last edited by
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?
-
Hi,
/opt is not writable by standard users. You should install it elsewhere while developing.
-
Hi,
/opt is not writable by standard users. You should install it elsewhere while developing.
wrote on 27 Sept 2020, 19:36 last edited by@SGaist Do you know how I could make it work?
-
wrote on 27 Sept 2020, 20:23 last edited by Anonymous_Banned275
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 ?
Cheers
-
@SGaist Do you know how I could make it work?
wrote on 28 Sept 2020, 13:01 last edited by@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
-
wrote on 10 Jun 2021, 07:53 last edited by
-
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 )
That's worked for me.