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 build for Raspberry Pi 3 on Windows 10 using mingw32, gcc and raspberry-gcc6.3.0-r3 fails
Forum Updated to NodeBB v4.3 + New Features

Qt build for Raspberry Pi 3 on Windows 10 using mingw32, gcc and raspberry-gcc6.3.0-r3 fails

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
22 Posts 3 Posters 7.1k Views 1 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.
  • N Offline
    N Offline
    Napi
    wrote on 25 Nov 2018, 21:32 last edited by
    #9

    @koahnig

    It looks like the libs get loaded but there is something wrong with libQt5Core.

    gdb qtdiag
    GNU gdb (Raspbian 7.12-6) 7.12.0.20161007-git
    Copyright (C) 2016 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "arm-linux-gnueabihf".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>.
    Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.
    For help, type "help".
    Type "apropos word" to search for commands related to "word"...
    Reading symbols from qtdiag...(no debugging symbols found)...done.
    (gdb) r
    Starting program: /usr/local/qt5/bin/qtdiag 
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
    
    Program received signal SIGILL, Illegal instruction.
    0xb610cb30 in qRegisterResourceData(int, unsigned char const*, unsigned char const*, unsign
    ed char const*) () from /usr/local/qt5/lib/libQt5Core.so.5
    
    K 1 Reply Last reply 25 Nov 2018, 21:41
    0
    • N Napi
      25 Nov 2018, 21:32

      @koahnig

      It looks like the libs get loaded but there is something wrong with libQt5Core.

      gdb qtdiag
      GNU gdb (Raspbian 7.12-6) 7.12.0.20161007-git
      Copyright (C) 2016 Free Software Foundation, Inc.
      License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
      and "show warranty" for details.
      This GDB was configured as "arm-linux-gnueabihf".
      Type "show configuration" for configuration details.
      For bug reporting instructions, please see:
      <http://www.gnu.org/software/gdb/bugs/>.
      Find the GDB manual and other documentation resources online at:
      <http://www.gnu.org/software/gdb/documentation/>.
      For help, type "help".
      Type "apropos word" to search for commands related to "word"...
      Reading symbols from qtdiag...(no debugging symbols found)...done.
      (gdb) r
      Starting program: /usr/local/qt5/bin/qtdiag 
      [Thread debugging using libthread_db enabled]
      Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
      
      Program received signal SIGILL, Illegal instruction.
      0xb610cb30 in qRegisterResourceData(int, unsigned char const*, unsigned char const*, unsign
      ed char const*) () from /usr/local/qt5/lib/libQt5Core.so.5
      
      K Offline
      K Offline
      koahnig
      wrote on 25 Nov 2018, 21:41 last edited by
      #10

      @Napi

      The only idea Ihave at the time being would be to create a simple console app based on the creator template and do also a simple hello world output. This would be very basic again, but also involve a minimum Qt.

      When it fails too, there is something fundamental with Qt cross-compile.

      As explained before, all this is outside of my experience. I am trying to get someone else interested to have a look here.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • N Offline
        N Offline
        Napi
        wrote on 25 Nov 2018, 22:15 last edited by Napi
        #11

        @koahnig

        Thank you so much for your help so far!
        I think I am going to start by only building qt-base, which I am then going to use as a starting point for a simple app.

        Here is a link with the exact steps I did, just in case Iink.

        K 1 Reply Last reply 26 Nov 2018, 08:55
        0
        • N Napi
          25 Nov 2018, 22:15

          @koahnig

          Thank you so much for your help so far!
          I think I am going to start by only building qt-base, which I am then going to use as a starting point for a simple app.

          Here is a link with the exact steps I did, just in case Iink.

          K Offline
          K Offline
          koahnig
          wrote on 26 Nov 2018, 08:55 last edited by
          #12

          @Napi

          Certainly stepping back in complexity shall help.

          The cross-compile on Windows for linux and/or embedded linux is possible, but requires a bit more steam to get around all the obstacles.

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          0
          • N Offline
            N Offline
            Napi
            wrote on 28 Nov 2018, 04:04 last edited by
            #13

            @koahnig
            So I managed to compile qtBase, but now it seems that dependencies are missing. I was trying to run
            ./examples/gui/analogclock/analogclock , this is the error message I get:

            qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
            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.
            

            I tried the following:

            export QT_QPA_PLATFORM=eglfs
            export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/local/qt5/plugins/platforms
            export LD_LIBRARY_PATH=/usr/local/qt5/lib
            sudo ldconfig
            
            K 1 Reply Last reply 28 Nov 2018, 07:57
            0
            • N Napi
              28 Nov 2018, 04:04

              @koahnig
              So I managed to compile qtBase, but now it seems that dependencies are missing. I was trying to run
              ./examples/gui/analogclock/analogclock , this is the error message I get:

              qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
              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.
              

              I tried the following:

              export QT_QPA_PLATFORM=eglfs
              export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/local/qt5/plugins/platforms
              export LD_LIBRARY_PATH=/usr/local/qt5/lib
              sudo ldconfig
              
              K Offline
              K Offline
              koahnig
              wrote on 28 Nov 2018, 07:57 last edited by
              #14

              @Napi

              Try to compile a very basic program using Qt. Use the Qt console template fromQt creator and compile and run on RPi without any modifications. This should work IMHO.

              Are you using Qt creator?

              When the very basic console application does not work, you have fundamental issue there. From having no additions at all, you can implement complexity step-by-step (e.g. qDebug() and so on).

              Afterwards you can worry about the additional modules required. The problem is that this might become quite tedious.

              Vote the answer(s) that helped you to solve your issue(s)

              1 Reply Last reply
              1
              • N Offline
                N Offline
                Napi
                wrote on 2 Dec 2018, 22:01 last edited by Napi 12 Feb 2018, 22:18
                #15

                @koahnig

                So I did a build using the Qt Creator and the Qt Console Application template and it worked fine.

                I also tried the AnalogClock example afterwards, whit no success. There might be some issue with OpenGl or the renderer in general.

                Update: I got the example running !!!!!! Yeah !!! I did a rebuild off the whole qt base without using the batch file for configuring!

                0_1543789077149_572b9752-2c6f-45de-bfe5-3d4f586c03f4-image.png

                1 Reply Last reply
                0
                • N Offline
                  N Offline
                  Napi
                  wrote on 3 Dec 2018, 03:32 last edited by
                  #16

                  So one issue that I have now is the fact that some paths on the raspberry qt build are wrong, someting wasn't right during configuring. This is the error I get running the 2dpainting example.

                  0_1543807841441_2a7eb842-ab8d-4e51-9dec-961d9a4f1dc0-image.png

                  The interesting thing here is, that QFontDatabase url is strange, I ran the following configure command:

                  ../qt-everywhere-src-5.11.2/qtbase/configure -platform win32-g++ -device linux-rasp-pi-g++ -release -sysroot C:/SysGCC/raspberry/arm-linux-gnueabihf/sysroot -prefix /usr/local/qt5 -device-option "CROSS_COMPILE=arm-linux-gnueabihf-" -opensource -confirm-license -opengl es2 -no-use-gold-linker -make libs
                  
                  K 2 Replies Last reply 3 Dec 2018, 08:06
                  0
                  • N Napi
                    3 Dec 2018, 03:32

                    So one issue that I have now is the fact that some paths on the raspberry qt build are wrong, someting wasn't right during configuring. This is the error I get running the 2dpainting example.

                    0_1543807841441_2a7eb842-ab8d-4e51-9dec-961d9a4f1dc0-image.png

                    The interesting thing here is, that QFontDatabase url is strange, I ran the following configure command:

                    ../qt-everywhere-src-5.11.2/qtbase/configure -platform win32-g++ -device linux-rasp-pi-g++ -release -sysroot C:/SysGCC/raspberry/arm-linux-gnueabihf/sysroot -prefix /usr/local/qt5 -device-option "CROSS_COMPILE=arm-linux-gnueabihf-" -opensource -confirm-license -opengl es2 -no-use-gold-linker -make libs
                    
                    K Offline
                    K Offline
                    koahnig
                    wrote on 3 Dec 2018, 08:06 last edited by
                    #17

                    @Napi

                    Congrats for your progress.

                    You are right that the URL is strange.
                    I have just scanned through the source of Qt5.11.2 as shipped with a MinGW pre-built. The given text is part of c:\Qt\5.11.2\Src\qtbase\src\platformsupport\fontdatabases\freetype\qfreetypefontdatabase.cpp

                    However opening the URL brings up a site with that name, but it is not really what I expected. First of all it is in French and it does not hold direct information with respect to fonts.

                    Vote the answer(s) that helped you to solve your issue(s)

                    1 Reply Last reply
                    0
                    • N Napi
                      3 Dec 2018, 03:32

                      So one issue that I have now is the fact that some paths on the raspberry qt build are wrong, someting wasn't right during configuring. This is the error I get running the 2dpainting example.

                      0_1543807841441_2a7eb842-ab8d-4e51-9dec-961d9a4f1dc0-image.png

                      The interesting thing here is, that QFontDatabase url is strange, I ran the following configure command:

                      ../qt-everywhere-src-5.11.2/qtbase/configure -platform win32-g++ -device linux-rasp-pi-g++ -release -sysroot C:/SysGCC/raspberry/arm-linux-gnueabihf/sysroot -prefix /usr/local/qt5 -device-option "CROSS_COMPILE=arm-linux-gnueabihf-" -opensource -confirm-license -opengl es2 -no-use-gold-linker -make libs
                      
                      K Offline
                      K Offline
                      koahnig
                      wrote on 3 Dec 2018, 09:37 last edited by koahnig 12 Mar 2018, 10:11
                      #18

                      @Napi

                      Some information from Qt on fondconfig https://doc.qt.io/qt-5/qt-embedded-fonts.html

                      Here is a Qt reference to dejavu fonts http://doc-snapshots.qt.io/qt5-5.12/qtgui-attribution-dejayvu.html
                      This points to https://dejavu-fonts.github.io/ which makes sense compared to the strange URL.

                      [edit: koahnig form here]
                      Digging a bit deeper and checked current Qt5.12.0 source holding this:

                          if (!dir.exists()) {
                              qWarning("QFontDatabase: Cannot find font directory %s.\n"
                                       "Note that Qt no longer ships fonts. Deploy some (from https://dejavu-fonts.github.io/ for example) or switch to fontconfig.",
                                       qPrintable(fontpath));
                              return;
                      

                      In up-coming release the correct link is referenced.

                      Vote the answer(s) that helped you to solve your issue(s)

                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        koahnig
                        wrote on 4 Dec 2018, 16:10 last edited by
                        #19

                        Also the source contained in today's release Qt5.11.3 has the github.io reference. Checked with MinGW pre-built.

                        Vote the answer(s) that helped you to solve your issue(s)

                        N 1 Reply Last reply 6 Dec 2018, 02:13
                        0
                        • K koahnig
                          4 Dec 2018, 16:10

                          Also the source contained in today's release Qt5.11.3 has the github.io reference. Checked with MinGW pre-built.

                          N Offline
                          N Offline
                          Napi
                          wrote on 6 Dec 2018, 02:13 last edited by
                          #20

                          @koahnig

                          I am trying version 5.12.0 now. Thank you!

                          1 Reply Last reply
                          0
                          • F Offline
                            F Offline
                            FluxDice
                            wrote on 11 May 2019, 21:13 last edited by
                            #21

                            @koahnig and @Napi
                            I am somewhat of a noob and looking this work. Are there instructions you followed to the get this to work?

                            Thank you very much for you help.

                            K 1 Reply Last reply 12 May 2019, 09:05
                            0
                            • F FluxDice
                              11 May 2019, 21:13

                              @koahnig and @Napi
                              I am somewhat of a noob and looking this work. Are there instructions you followed to the get this to work?

                              Thank you very much for you help.

                              K Offline
                              K Offline
                              koahnig
                              wrote on 12 May 2019, 09:05 last edited by
                              #22

                              @FluxDice

                              Hi and welcome to devnet forum

                              Here is a link to the Qt documentation for cross compiling.
                              https://doc.qt.io/qt-5/embedded-linux.html

                              For raspberry specifically there is also https://www.raspberrypi.org/forums/viewtopic.php?t=204778

                              Vote the answer(s) that helped you to solve your issue(s)

                              1 Reply Last reply
                              1

                              • Login

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