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. Qt cross platform compilation with QtRpi to rpi3 - could not find "eglfs"

Qt cross platform compilation with QtRpi to rpi3 - could not find "eglfs"

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
raspberry pi 3linuxeglfs
5 Posts 3 Posters 1.9k Views
  • 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.
  • W Offline
    W Offline
    Worly
    wrote on last edited by
    #1

    I made a small project using Qt which is intended to run on Raspberry Pi 3 model B. For cross compilation I found QtRpi on web and followed all the instructions on how to install it found here. On my RaspPi3 I flashed latest version of Raspbian Stretch (April 2018), on which I ran rpi-update after booting. Installation went smoothly but when I try to run the compiled binary on my RPi3 I get the following message:

    This application failed to start because it could not find or load the Qt platform plugin "eglfs"
    in "".

    Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, xcb.

    Reinstalling the application may fix the problem. Aborted.

    I already tried twice from the start, but I got the same message both tries. Any advice would be great help. Thanks :)

    Note: I am pretty new with Qt and Linux, take it easy on me :)

    A 1 Reply Last reply
    0
    • W Worly

      I made a small project using Qt which is intended to run on Raspberry Pi 3 model B. For cross compilation I found QtRpi on web and followed all the instructions on how to install it found here. On my RaspPi3 I flashed latest version of Raspbian Stretch (April 2018), on which I ran rpi-update after booting. Installation went smoothly but when I try to run the compiled binary on my RPi3 I get the following message:

      This application failed to start because it could not find or load the Qt platform plugin "eglfs"
      in "".

      Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, xcb.

      Reinstalling the application may fix the problem. Aborted.

      I already tried twice from the start, but I got the same message both tries. Any advice would be great help. Thanks :)

      Note: I am pretty new with Qt and Linux, take it easy on me :)

      A Offline
      A Offline
      ambershark
      wrote on last edited by ambershark
      #2

      @Worly So this just means it can't find the platform plugin. Chances are you just need to deploy your application properly. Another way to do it is to use the qt.conf file in your application binary directory and have that point to the plugin path with your platform plugin.

      So for instance my Qt is at /opt/Qt/5.11.0/gcc_64 and the platform plugins are in plugins/platforms.

      You could create a qt.conf that looks like:

      [Paths]
      Plugins = /path/to/your/qt/plugins
      

      And that should allow your app to run. The proper way is to deploy it with all the supporting libraries but since it's for a Pi I wouldn't necessarily bother with all that unless you plan on distributing this software.

      You can also change your rpath on the binary itself. This is where it will check (by default for libraries). It's how the machine you built the application on can find Qt without the deployment or qt.conf, etc. Look up a program called chrpath for that. This is a non-portable method like the hardcoded qt.conf plugin path, so don't use either of these if you intend to distribute.

      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

      W 1 Reply Last reply
      2
      • A ambershark

        @Worly So this just means it can't find the platform plugin. Chances are you just need to deploy your application properly. Another way to do it is to use the qt.conf file in your application binary directory and have that point to the plugin path with your platform plugin.

        So for instance my Qt is at /opt/Qt/5.11.0/gcc_64 and the platform plugins are in plugins/platforms.

        You could create a qt.conf that looks like:

        [Paths]
        Plugins = /path/to/your/qt/plugins
        

        And that should allow your app to run. The proper way is to deploy it with all the supporting libraries but since it's for a Pi I wouldn't necessarily bother with all that unless you plan on distributing this software.

        You can also change your rpath on the binary itself. This is where it will check (by default for libraries). It's how the machine you built the application on can find Qt without the deployment or qt.conf, etc. Look up a program called chrpath for that. This is a non-portable method like the hardcoded qt.conf plugin path, so don't use either of these if you intend to distribute.

        W Offline
        W Offline
        Worly
        wrote on last edited by
        #3

        @ambershark Okay that makes sense, I will try it soon but I have few more questions. Does that mean that I have to install Qt on raspberry? Or I can just somehow install the plugins?
        QtRpi has only up to 5.7.0 version of Qt, does that mean that I have to use v5.7.0 plugins or I can use the latest?

        A Pablo J. RoginaP 2 Replies Last reply
        0
        • W Worly

          @ambershark Okay that makes sense, I will try it soon but I have few more questions. Does that mean that I have to install Qt on raspberry? Or I can just somehow install the plugins?
          QtRpi has only up to 5.7.0 version of Qt, does that mean that I have to use v5.7.0 plugins or I can use the latest?

          A Offline
          A Offline
          ambershark
          wrote on last edited by
          #4

          @Worly You will need to install a cross compiler (for Pi) version of Qt that you want to use to the device. If it has 5.7 preinstalled, you would need to use 5.7 or earlier. You wouldn't be able to use anything newer unless you installed it.

          My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

          1 Reply Last reply
          0
          • W Worly

            @ambershark Okay that makes sense, I will try it soon but I have few more questions. Does that mean that I have to install Qt on raspberry? Or I can just somehow install the plugins?
            QtRpi has only up to 5.7.0 version of Qt, does that mean that I have to use v5.7.0 plugins or I can use the latest?

            Pablo J. RoginaP Offline
            Pablo J. RoginaP Offline
            Pablo J. Rogina
            wrote on last edited by
            #5

            @Worly said in Qt cross platform compilation with QtRpi to rpi3 - could not find "eglfs":

            QtRpi has only up to 5.7.0 version of Qt, does that mean that I have to use v5.7.0 plugins or I can use the latest?

            Would you consider going through the steps from this guide? It allows you to cross compile Qt for RPi and it's been used with newer Qt versions and several RPi models.

            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
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved