Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

error while runing an cross compiled application : Failed to upload file



  • Hello,

    I cross compiled Qt5.14.2 for my raspberry pi 4 on my ubuntu 18.04

    everytime I run a program this error shows up but fortunately the executable is generated and the application works well , but I didn't understand what does it mean

    qtcreator.png

    can someone please explain to me.

    the os that I am working on it is a lite version so before cross compiling Qt I installed xorg and openbox
    sudo apt-get install --no-install-recommends xserver-xorg x11-xserver-utils xinit openbox

    and the output of my configuration is

    X11 specific:
        XLib ................................. yes
        XCB Xlib ............................. yes
        EGL on X11 ........................... yes
    QPA backends:
      DirectFB ............................... no
      EGLFS .................................. yes
      EGLFS details:
        EGLFS OpenWFD ........................ no
        EGLFS i.Mx6 .......................... no
        EGLFS i.Mx6 Wayland .................. no
        EGLFS RCAR ........................... no
        EGLFS EGLDevice ...................... yes
        EGLFS GBM ............................ yes
        EGLFS VSP2 ........................... no
        EGLFS Mali ........................... no
        EGLFS Raspberry Pi ................... no
        EGLFS X11 ............................ yes
      LinuxFB ................................ yes
      VNC .................................... yes
    

    and but when I tried to execute the application it showed some errors abour DRM ..
    even after exporting these environment variables

    DISPLAY=:0
    QT_QPA_EGLFS_ALWAYS_SET_MODE=1
    QT_QPA_EGLFS_KMS_ATOMIC=1
    XDG_SESSION_TYPE=x11
    

    Thank you in advance



  • I just solved the two problems , I am going to post what I did it may help someone:

    so for the first problem you have to go to the .pro file and replace the target.path with something like that (for me it is /home/pi) else: unix:!android: target.path = /home/pi/$${TARGET}

    after that go to project -> run and in Deployment method add a method
    Projects.png

    and after that build and run your project and it will start working on your raspberry pi.
    I tested this on a Desktop version of OS to make it easier

    and for my lite version I just added a run environment variable QT_QPA_PLATFORM=linuxfb

    so now when running my application from qtcreator it actually lunches it on my raspberry using the framebuffer linuxfb. This is amazing! and now I can start a remote debug !!

    Thank you for helping


  • Moderators

    @amina Well its kind of obvious, no ?

    Your project is a cross compiled or at the very least remote deployed, and your target refuses to accept files transferred via SFTP



  • @J-Hilk but how can I change this please? I am new to Qt..
    knowing that eglfs does not work on my raspberry do I have to use the framebuffer linuxfb when executing the application on the raspberry


  • Lifetime Qt Champion

    @amina Your current problem is not related to framebuffer or eglfs. Your problem is that deployment to the device via SFTP does not work. You should first solve this.



  • I just solved the two problems , I am going to post what I did it may help someone:

    so for the first problem you have to go to the .pro file and replace the target.path with something like that (for me it is /home/pi) else: unix:!android: target.path = /home/pi/$${TARGET}

    after that go to project -> run and in Deployment method add a method
    Projects.png

    and after that build and run your project and it will start working on your raspberry pi.
    I tested this on a Desktop version of OS to make it easier

    and for my lite version I just added a run environment variable QT_QPA_PLATFORM=linuxfb

    so now when running my application from qtcreator it actually lunches it on my raspberry using the framebuffer linuxfb. This is amazing! and now I can start a remote debug !!

    Thank you for helping


Log in to reply