could not find qtplatfom plugin eglfs



  • Hi,

    I build theqt for arm cross complier(beagleboneboard),
    Os:debian
    after that I installed qt and did kit configuration and all,
    And running a simple application in qt but getting the error:

    qt.qpa.plugin: Could not find the Qt platform plugin "eglfs" in ""
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

    Available platform plugins are: linuxfb, minimal, offscreen, vnc.

    16:11:26: Remote process crashed.

    what is the mistake,I am not getting ,please suggest me to solve this issue ,
    Thankyou.


  • Lifetime Qt Champion

    Hi,

    Did you also deploy Qt in your target ?



  • @SGaist
    Hi,

    Thanks for the replay,

    yes, i deployed on target also,using the scp command

    scp -r Qt5ForBBB1 debian@192.168.7.2:Qt5ForBBB1.



  • @SGaist
    Hi,

    shall I ask, how to deploy the qt on target machine?



  • Here is my .pro file

    QT += core gui

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    CONFIG += c++11

    The following define makes your compiler emit warnings if you use

    any Qt feature that has been marked deprecated (the exact warnings

    depend on your compiler). Please consult the documentation of the

    deprecated API in order to know how to port your code away from it.

    DEFINES += QT_DEPRECATED_WARNINGS

    You can also make your code fail to compile if it uses deprecated APIs.

    In order to do so, uncomment the following line.

    You can also select to disable deprecated APIs only up to a certain version of Qt.

    #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

    SOURCES +=
    main.cpp
    mainwindow.cpp

    HEADERS +=
    mainwindow.h

    FORMS +=
    mainwindow.ui

    Default rules for deployment.

    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target



  • @SGaist

    I am giving the .pro file

    target path = $$[Qt5ForBBB1]/bin
    INSTALLS +=target

    After this I run the application ,getting error like this

    11:22:41: rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]

    11:22:41: rsync failed with exit code 23.
    11:22:41: Deploy step failed.
    Error while building/deploying project bbb (kit: BBB)
    When executing step "Deploy files via rsync"

    Any suggestions...


  • Lifetime Qt Champion

    Did you copy the Qt folder at the exact same position you have on your desktop machine in your target ?



  • @SGaist

    I have Qt folder ,in my laptop here /home/beagle/Qt5ForBBB1

    And I copied,it just as like this

    scp -r Qt5ForBBB1 debian@192.168.7.2:Qt5ForBBB1...

    is it correct? or I need to copy like this

    scp -r /home/beagle/Qt5ForBBB1 debian@192.168.7.2:Qt5ForBBB1



  • Even if you don't have the Qt folder on beaglebone at same location, you can export the following environment variables on BBB and be able to run your Qt application in it.

    export QT_QPA_PLATFORM_PLUGIN_PATH=/home/debian/(Qt folder name)/plugins/platforms
    export LD_LIBRARY_PATH="/home/debian/(Qt folder name)/lib":$LD_LIBRARY_PATH
    export QT_PLUGIN_PATH=/home/debian/(Qt folder name)/plugins
    export QT_QPA_FONTDIR=/home/debian/(Qt folder name)/lib/fonts
    

    Main thing you need to check is do you have eglfs as platform in the first place? Because I'm working on a BBB myself, and my application isn't in critical need of eglfs, but normally with BBB sysroot and linaro toolchain combo, you don't get eglfs working. You should check the path /home/debian/(Qt folder name)/plugins/platforms before using any app whether you have a library for eglfs there. If you do, then the commands above will point the Qt application to right folder and it will detect eglfs as platform plugin.



  • @Ketank16

    Hi,

    I have the platforms

    linuxfb, minimal, offscreen,and vnc,

    And exported platform also
    export_QT_QPA_PLATFORM=vnc(because i also have vnc)

    As you said I already export those things,which you mentioned,

    After that in .pro file added the line

    target.path=$$[Qt5ForBBB]/bin
    INSTALLS += target

    After this, running the application, getting the error

    rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]..

    exactly same error i got in BBB folder(means I followed your pdf document, same as you said i created one BBB directory, and gave the command rsync -avz debian@192.168.7.2:/usr sysroot ,in there also i got same error,but I continued next process as you mentioned in your pdf along with this error)

    how to solve this rsync error,please suggest me(even I am installed debian on external hard drive,and trying or following those steps in external hard drive,but while running this command rsync -avz debian@192.168.7.2:/usr sysroot,getting same error).

    how do I solve this error?


  • Lifetime Qt Champion

    Why are you copying stuff in /usr ? The debian user likely doesn't have write access there.



  • @SGaist Hi,

    then where i need to copy?


  • Qt Champions 2018

    @Asha said in could not find qtplatfom plugin eglfs:

    then where i need to copy?

    Home directory of the user



  • @jsulm

    rsync -avz debian@192.168.7.2:/usr sysroot

    Here,I am synchronizing the sysroot from board to computer,

    so,Home directory to the user means ,I need to give like this
    rsync -avz debian@192.168.7.2:/usr /home/beagle/BBB/sysroot

    OR

    rsync -avz debian@192.168.7.2:/usr /home/beagle


  • Qt Champions 2018

    @Asha said in could not find qtplatfom plugin eglfs:

    rsync -avz debian@192.168.7.2:/usr /home/beagle/BBB/sysroot
    OR
    rsync -avz debian@192.168.7.2:/usr /home/beagle

    Well, if you use /home/beagle you will pollute your home directory with the sysroot content, so use /home/beagle/BBB/sysroot ...



  • @jsulm Hi,

    After giving this,getting the same error,there is no changes..



  • @Ketank16 Hi,

    can you please show me the, any .pro file,

    I am very confused with this target.path file..

    I followed this..target.png

    here is my .pro filetarget.pro.png

    what i gave target.path, is it correct?

    if its correct I am getting the error as shown in screenshot,

    for that error solution ,I gave all the rights(rwx) to the /home/beagle/Qt5.13.1 directory then also getting the same error,any suggestions please....



  • Hi,

    Any ideas?



  • @Asha I think the problem is the $$[Qt5] placeholder in the value for target.path variable in your .pro
    what if you just make it simple as target.path=/home/beagle/Qt5.13.1

    PS: please STOP pasting pictures and just paste TEXT so it's easier for others to reference your posts...



  • @Pablo-J-Rogina

    Good morning ,

    Thanks for the replay,

    After giving /home/beagle/Qt5.13.1 in my .pro file also getting the same problem...

    Here is the compile output:

    10:22:04: Running steps for project concentriccircles...
    10:22:04: Configuration unchanged, skipping qmake step.
    10:22:04: Starting: "/usr/bin/make" -j4
    make: Nothing to be done for 'first'.
    10:22:04: The process "/usr/bin/make" exited normally.
    10:22:04: Connecting to device "Generic Linux Device" (192.168.7.2).
    10:22:08: The remote file system has 49 megabytes of free space, going ahead.
    10:22:08: Deploy step finished.
    10:22:08: Trying to kill "/home/beagle/Qt5.13.1/concentriccircles" on remote device...
    10:22:11: Remote application killed.
    10:22:11: Deploy step finished.
    10:22:11: Failed to create remote directories: mkdir: cannot create directory ‘/home/beagle’: Permission denied

    10:22:11: Deploy step failed.
    Error while building/deploying project concentriccircles (kit: BBB)
    When executing step "Deploy files via rsync"
    10:22:11: Elapsed time: 00:07.


  • Qt Champions 2018

    @Asha Does /home/beagle directory exist on your device?



  • @jsulm

    /home/beagle does not exit on my device,
    I installed Qt in my laptop(location is: /home/beagle/Qt5.13.1)

    I copied the cross compiled qt in my device(location is : /home/debian/Qt5),

    one more thing,I want to tell

    my user password is :1234

    I am trying to connect ssh via root,but giving the password 1234 ,I am not able to connect with my board ,getting the permission denied error,

    but giving the password "ims1" ,I am able to login via root,
    where "ims1" is my old user password ,is this may cause any issues?


  • Qt Champions 2018

    @Asha said in could not find qtplatfom plugin eglfs:

    /home/beagle does not exit on my device

    Well, that's the problem: only root has write access in /home.
    Why do you use /home/beagle if your user is debian?!
    Use /home/debian ...



  • @jsulm

    while giving the /home/debian

    here is the compile output:
    11:13:06: Running steps for project concentriccircles...
    11:13:06: Configuration unchanged, skipping qmake step.
    11:13:06: Starting: "/usr/bin/make" -j4
    make: Nothing to be done for 'first'.
    11:13:06: The process "/usr/bin/make" exited normally.
    11:13:06: The remote file system has 46 megabytes of free space, going ahead.
    11:13:06: Deploy step finished.
    11:13:06: Trying to kill "/home/debian/Qt5/concentriccircles" on remote device...
    11:13:08: Remote application killed.
    11:13:08: Deploy step finished.
    11:13:08: sending incremental file list

    11:13:08:
    sent 72 bytes received 12 bytes 168.00 bytes/sec
    total size is 1,576,416 speedup is 18,766.86

    11:13:08: Deploy step finished.
    11:13:08: Elapsed time: 00:03.

    And

    Application output is:

    11:13:09: Starting /home/debian/Qt5/concentriccircles ...
    qt.qpa.plugin: Could not find the Qt platform plugin "eglfs" in ""
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

    Available platform plugins are: linuxfb, minimal, offscreen, vnc.

    11:13:09: Remote process crashed.


  • Qt Champions 2018

    @Asha said in could not find qtplatfom plugin eglfs:

    linuxfb, minimal, offscreen, vnc

    Looks like you did not build eglfs support when building Qt



  • @jsulm
    but other platforms like linuxfb and vnc both are enabled while building qt,

    And I exported linuxfb in my device...

    one more ,while building I tried with -eglfs option also but got the error like

    ERROR: 'eglfs' already enabled...


  • Qt Champions 2018

    @Asha What do you actually want to use? eglfs? linuxfb? ...?
    Adding -eglfs is not going to help as it is already activated, but your Qt build does not support it.



  • @jsulm I just want to run one simple application in my device, by using anyone..


  • Qt Champions 2018

    @Asha Well, I think I already mentioned this once: you have to know what your device actually uses. Is it X11, eglfs, linuxfb, ...?



  • @jsulm

    can you please tell me more about X11,or any link..what exactly it will do?


  • Qt Champions 2018



  • @jsulm It means first i need to find which backend is running on my device ,based on that I need to cross compile the qt?


  • Qt Champions 2018

    @Asha said in could not find qtplatfom plugin eglfs:

    i need to find which backend is running on my device

    yes



  • @jsulm after finding ,again i need to build ,cross compiled qt?


  • Qt Champions 2018

    @Asha If you did not cross compile needed platform plug-in then yes



  • @jsulm Hi,

    I flashed my board with debian image...any idea which plugin is running on that image...

    I got the answer ,we are using linux backend...



  • for eglfs plugin ,which packages are required and how to install those?


  • Qt Champions 2018

    @Asha Please take a look at https://doc.qt.io/qt-5/embedded-linux.html
    "we are using linux backend" - which one?



  • @jsulm I asked,which backend is running on board?

    got the ans:linux

    shall I ask more about backend or any link?


  • Qt Champions 2018

    @Asha We know from the beginning that the OS is Linux. Linux is an operating system supporting different technologies for graphics, like: X11, directfb, eglfs, ...
    These technologies is what is called "backends" in Qt.


Log in to reply