Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. QtonPi
  4. Qt 5.7 and cross compile

Qt 5.7 and cross compile

Scheduled Pinned Locked Moved Unsolved QtonPi
qt 5.7 and rpi3
32 Posts 5 Posters 21.4k 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.
  • S shivaVMC
    12 Jun 2018, 12:43

    @Niko-Hallikainen
    I too stuckup with the same issue,can you please help on the same.1 day wasted on the same error.it would be great help for me on ur suggestion.

    Thanks In advance

    P Offline
    P Offline
    Pablo J. Rogina
    wrote on 12 Jun 2018, 17:46 last edited by
    #16

    @shivaVMC what about following this guide?

    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

    S 2 Replies Last reply 13 Jun 2018, 10:19
    1
    • P Pablo J. Rogina
      12 Jun 2018, 17:46

      @shivaVMC what about following this guide?

      S Offline
      S Offline
      shivaVMC
      wrote on 13 Jun 2018, 10:19 last edited by
      #17

      @Pablo-J.-Rogina
      I followed the complete procedure as per below link,Just changed the V_5.7.1 to my V_5.7.0
      https://lb.raspberrypi.org/forums/viewtopic.php?t=204529
      Still I m having the same issue can you please help me out on this,Almost I have spent 8 Houors on sorting this error.It will a kind support to reduce me tension.

      Thanks In advance

      1 Reply Last reply
      0
      • P Pablo J. Rogina
        12 Jun 2018, 17:46

        @shivaVMC what about following this guide?

        S Offline
        S Offline
        shivaVMC
        wrote on 13 Jun 2018, 10:47 last edited by
        #18

        @Pablo-J.-Rogina
        Initially I was following that guide only,but I failed at beloe step
        git clone git://code.qt.io/qt/qtbase.git -b linux-rasp-pi3-g++
        Cloning into 'qtbase'...
        fatal: Remote branch linux-rasp-pi3-g++ not found in upstream origin

        P 1 Reply Last reply 13 Jun 2018, 11:30
        0
        • S shivaVMC
          13 Jun 2018, 10:47

          @Pablo-J.-Rogina
          Initially I was following that guide only,but I failed at beloe step
          git clone git://code.qt.io/qt/qtbase.git -b linux-rasp-pi3-g++
          Cloning into 'qtbase'...
          fatal: Remote branch linux-rasp-pi3-g++ not found in upstream origin

          P Offline
          P Offline
          Pablo J. Rogina
          wrote on 13 Jun 2018, 11:30 last edited by
          #19

          @shivaVMC said in Qt 5.7 and cross compile:

          git clone git://code.qt.io/qt/qtbase.git -b linux-rasp-pi3-g++

          You need to specify what Qt branch (i.e. 5.7, ..., 5.10, etc.) you want to clone from Git repository, let's say you want to cross-compile Qt 5.10:

          git clone git://code.qt.io/qt/qtbase.git -b 5.10
          

          then you'll have a folder qtbase will all the sources to build Qt 5.10

          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

          S 2 Replies Last reply 13 Jun 2018, 18:37
          2
          • P Pablo J. Rogina
            13 Jun 2018, 11:30

            @shivaVMC said in Qt 5.7 and cross compile:

            git clone git://code.qt.io/qt/qtbase.git -b linux-rasp-pi3-g++

            You need to specify what Qt branch (i.e. 5.7, ..., 5.10, etc.) you want to clone from Git repository, let's say you want to cross-compile Qt 5.10:

            git clone git://code.qt.io/qt/qtbase.git -b 5.10
            

            then you'll have a folder qtbase will all the sources to build Qt 5.10

            S Offline
            S Offline
            shivaVMC
            wrote on 13 Jun 2018, 18:37 last edited by
            #20

            @Pablo-J.-Rogina
            Hi Rogina,
            Thank You,Thanks alot for quick response.
            Your Comments/Suggestions are perfect to fix my issue.
            Everything Looks fine now and my problem is solved.

            Excellent...!!!

            1 Reply Last reply
            0
            • P Pablo J. Rogina
              13 Jun 2018, 11:30

              @shivaVMC said in Qt 5.7 and cross compile:

              git clone git://code.qt.io/qt/qtbase.git -b linux-rasp-pi3-g++

              You need to specify what Qt branch (i.e. 5.7, ..., 5.10, etc.) you want to clone from Git repository, let's say you want to cross-compile Qt 5.10:

              git clone git://code.qt.io/qt/qtbase.git -b 5.10
              

              then you'll have a folder qtbase will all the sources to build Qt 5.10

              S Offline
              S Offline
              shivaVMC
              wrote on 15 Jun 2018, 06:45 last edited by
              #21

              @Pablo-J.-Rogina
              HI Again
              I m using 2 different version of QT as
              my PC installed with QT5.7.0
              My Rpi3 Kit installed with QT5.10.1
              Now I compiled the code and it went well in my PC,Same ".exe" I run in rpi3kit it gave me an error as below

              "cannot execute binary file: Exec format error
              Application finished with exit code 126."

              Please can you suggest on this.

              Where I m going wrong?Is I need to install QT5.10.1 on my PC also?

              P 1 Reply Last reply 15 Jun 2018, 13:02
              0
              • S shivaVMC
                15 Jun 2018, 06:45

                @Pablo-J.-Rogina
                HI Again
                I m using 2 different version of QT as
                my PC installed with QT5.7.0
                My Rpi3 Kit installed with QT5.10.1
                Now I compiled the code and it went well in my PC,Same ".exe" I run in rpi3kit it gave me an error as below

                "cannot execute binary file: Exec format error
                Application finished with exit code 126."

                Please can you suggest on this.

                Where I m going wrong?Is I need to install QT5.10.1 on my PC also?

                P Offline
                P Offline
                Pablo J. Rogina
                wrote on 15 Jun 2018, 13:02 last edited by
                #22

                @shivaVMC said in Qt 5.7 and cross compile:

                Where I m going wrong?

                You are mixing pears and apples :-)

                Different Qt versions is not the issue here, the problem is different platform/architecture: your PC is x86 (I assume) while RPi is ARM

                Remember that whatever Qt version you use in your RPi you would need to cross-compile in your PC

                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

                S 1 Reply Last reply 18 Jun 2018, 07:25
                2
                • P Pablo J. Rogina
                  15 Jun 2018, 13:02

                  @shivaVMC said in Qt 5.7 and cross compile:

                  Where I m going wrong?

                  You are mixing pears and apples :-)

                  Different Qt versions is not the issue here, the problem is different platform/architecture: your PC is x86 (I assume) while RPi is ARM

                  Remember that whatever Qt version you use in your RPi you would need to cross-compile in your PC

                  S Offline
                  S Offline
                  shivaVMC
                  wrote on 18 Jun 2018, 07:25 last edited by
                  #23

                  @Pablo-J.-Rogina
                  Hi Rogina,
                  Finally I m successful in compiling the code and running on my target Board,Thanks alot .

                  But during runtime,I m facing with below error as
                  Unable to query physical screen size, defaulting to 100 dpi.
                  To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
                  QFontDatabase: Cannot find font directory /usr/local/qt5pi/lib/fonts.
                  Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.
                  Can you plesae help on this.

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    sierdzio
                    Moderators
                    wrote on 18 Jun 2018, 07:56 last edited by
                    #24

                    @shivaVMC said in Qt 5.7 and cross compile:

                    Unable to query physical screen size, defaulting to 100 dpi.

                    This is not an error, you can safely ignore it.

                    And if you want to solve it, just do what the next line says (export the 2 variables before launching your app).

                    QFontDatabase: Cannot find font directory /usr/local/qt5pi/lib/fonts.
                    Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.

                    Here the error message mentions the solution, too. Just do what it says :-) Either put some fonts in the path where Qt is looking for them, or ship your own in a resource (QRC) with your app and install them at runtime.

                    (Z(:^

                    S 1 Reply Last reply 19 Jun 2018, 06:21
                    3
                    • S sierdzio
                      18 Jun 2018, 07:56

                      @shivaVMC said in Qt 5.7 and cross compile:

                      Unable to query physical screen size, defaulting to 100 dpi.

                      This is not an error, you can safely ignore it.

                      And if you want to solve it, just do what the next line says (export the 2 variables before launching your app).

                      QFontDatabase: Cannot find font directory /usr/local/qt5pi/lib/fonts.
                      Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig.

                      Here the error message mentions the solution, too. Just do what it says :-) Either put some fonts in the path where Qt is looking for them, or ship your own in a resource (QRC) with your app and install them at runtime.

                      S Offline
                      S Offline
                      shivaVMC
                      wrote on 19 Jun 2018, 06:21 last edited by
                      #25

                      @sierdzio
                      Excellent Site...!!!
                      The above suggestion worked out for me.
                      Now,I m poting my Windows based developed Qt application to Linux,can you please suggest the best procedure to follow for quick porting.
                      Thanks In advance.

                      S 1 Reply Last reply 19 Jun 2018, 06:28
                      1
                      • S shivaVMC
                        19 Jun 2018, 06:21

                        @sierdzio
                        Excellent Site...!!!
                        The above suggestion worked out for me.
                        Now,I m poting my Windows based developed Qt application to Linux,can you please suggest the best procedure to follow for quick porting.
                        Thanks In advance.

                        S Offline
                        S Offline
                        sierdzio
                        Moderators
                        wrote on 19 Jun 2018, 06:28 last edited by
                        #26

                        @shivaVMC said in Qt 5.7 and cross compile:

                        Now,I m poting my Windows based developed Qt application to Linux,can you please suggest the best procedure to follow for quick porting.

                        That's worthy of a new thread. If you encounter any issues during porting, feel free to open a new topic and we'll try to help.

                        In general, if your app only uses Qt APIs, then in most cases there is nothing to port. You need to compile your app and Linux and it will just work. If you do use some OS-specific APIs then each such case is different and it's impossible to give general advice on this.

                        If you need to distribute your Linux app, take a look into linuxdeployqt, it's excellent for producing ready-to-run packages - and in case of issues the guy who wrote it is really helpful. AppImage output is built-in, and if you want to produce DEB and RPM packages, you can reuse linuxdeployqt's output using fpm. More info on how to do it: https://github.com/probonopd/linuxdeployqt/issues/9

                        (Z(:^

                        S 1 Reply Last reply 20 Jun 2018, 06:39
                        0
                        • S sierdzio
                          19 Jun 2018, 06:28

                          @shivaVMC said in Qt 5.7 and cross compile:

                          Now,I m poting my Windows based developed Qt application to Linux,can you please suggest the best procedure to follow for quick porting.

                          That's worthy of a new thread. If you encounter any issues during porting, feel free to open a new topic and we'll try to help.

                          In general, if your app only uses Qt APIs, then in most cases there is nothing to port. You need to compile your app and Linux and it will just work. If you do use some OS-specific APIs then each such case is different and it's impossible to give general advice on this.

                          If you need to distribute your Linux app, take a look into linuxdeployqt, it's excellent for producing ready-to-run packages - and in case of issues the guy who wrote it is really helpful. AppImage output is built-in, and if you want to produce DEB and RPM packages, you can reuse linuxdeployqt's output using fpm. More info on how to do it: https://github.com/probonopd/linuxdeployqt/issues/9

                          S Offline
                          S Offline
                          shivaVMC
                          wrote on 20 Jun 2018, 06:39 last edited by
                          #27

                          @sierdzio
                          Hi sierdzio,
                          I have compiled the Windows Qt code,but I m facing issue as below.
                          test.cpp:(.text+0x3b8): undefined reference to QwtScaleMap::setScaleInterval(double, double)' test.cpp:(.text+0x3c8): undefined reference to QwtScaleMap::setScaleInterval(double, double)'
                          test.cpp:(.text+0x3e0): undefined reference to QwtScaleMap::setScaleInterval(double, double)' test.o: In function test::test(QWidget*)':
                          test.cpp:(.text+0x494): undefined reference to QwtScaleMap::QwtScaleMap()' test.cpp:(.text+0x4a0): undefined reference to QwtScaleMap::QwtScaleMap()'
                          test.cpp:(.text+0x4c0): undefined reference to QwtPlotCurve::QwtPlotCurve(QString const&)' test.cpp:(.text+0x554): undefined reference to QwtSymbol::QwtSymbol(QwtSymbol::Style, QBrush const&, QPen const&, QSize const&)'
                          test.cpp:(.text+0x560): undefined reference to QwtPlotCurve::setSymbol(QwtSymbol*)' test.cpp:(.text+0x590): undefined reference to QwtPlotCurve::setPen(QColor const&, double, Qt::PenStyle)'
                          test.cpp:(.text+0x59c): undefined reference to QwtPlotCurve::setStyle(QwtPlotCurve::CurveStyle)' test.cpp:(.text+0x610): undefined reference to QwtScaleMap::~QwtScaleMap()'
                          test.cpp:(.text+0x618): undefined reference to QwtScaleMap::~QwtScaleMap()' test.cpp:(.text+0x64c): undefined reference to QwtPlotCurve::~QwtPlotCurve()'

                          Exactly which library I need to add to avoid these error's.

                          Please can I get suggestion/support on this?

                          Thanks In addvance

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            sierdzio
                            Moderators
                            wrote on 20 Jun 2018, 06:42 last edited by
                            #28

                            You need the Qwt library.

                            But since it's not usually available on Windows, I suspect you already do have Qwt in your sources.

                            (Z(:^

                            S 1 Reply Last reply 20 Jun 2018, 06:51
                            0
                            • S sierdzio
                              20 Jun 2018, 06:42

                              You need the Qwt library.

                              But since it's not usually available on Windows, I suspect you already do have Qwt in your sources.

                              S Offline
                              S Offline
                              shivaVMC
                              wrote on 20 Jun 2018, 06:51 last edited by
                              #29

                              @sierdzio
                              Yeah I do have Qwt in my src directory.
                              src/qwt_scale_map.h
                              src/qwt_global.h
                              src/qwt_transform.h
                              src/qwt_plot_curve.h
                              src/qwt_plot_seriesitem.h
                              src/qwt_plot_item.h
                              src/qwt_text.h
                              src/qwt_legend_data.h
                              src/qwt_graphic.h
                              src/qwt_null_paintdevice.h \

                              But still I m getting the undefined reference type of error's(As mentioned above). What could be the reason for this.

                              S 1 Reply Last reply 20 Jun 2018, 06:52
                              0
                              • S shivaVMC
                                20 Jun 2018, 06:51

                                @sierdzio
                                Yeah I do have Qwt in my src directory.
                                src/qwt_scale_map.h
                                src/qwt_global.h
                                src/qwt_transform.h
                                src/qwt_plot_curve.h
                                src/qwt_plot_seriesitem.h
                                src/qwt_plot_item.h
                                src/qwt_text.h
                                src/qwt_legend_data.h
                                src/qwt_graphic.h
                                src/qwt_null_paintdevice.h \

                                But still I m getting the undefined reference type of error's(As mentioned above). What could be the reason for this.

                                S Offline
                                S Offline
                                sierdzio
                                Moderators
                                wrote on 20 Jun 2018, 06:52 last edited by
                                #30

                                @shivaVMC said in Qt 5.7 and cross compile:

                                But still I m getting the undefined reference type of error's(As mentioned above). What could be the reason for this

                                • symbols are really missing (check the sources).
                                • you don't #include relevant headers

                                (Z(:^

                                P S 2 Replies Last reply 20 Jun 2018, 23:28
                                1
                                • S sierdzio
                                  20 Jun 2018, 06:52

                                  @shivaVMC said in Qt 5.7 and cross compile:

                                  But still I m getting the undefined reference type of error's(As mentioned above). What could be the reason for this

                                  • symbols are really missing (check the sources).
                                  • you don't #include relevant headers
                                  P Offline
                                  P Offline
                                  Pablo J. Rogina
                                  wrote on 20 Jun 2018, 23:28 last edited by
                                  #31

                                  @shivaVMC you were already told:

                                  That's worthy of a new thread.

                                  so could you please start a thread on its own regarding Qwt and Windows?

                                  The issue you're now interested about has nothing to do with the original subject of post (which it was not even started by you by the way). Thanks

                                  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
                                  2
                                  • S sierdzio
                                    20 Jun 2018, 06:52

                                    @shivaVMC said in Qt 5.7 and cross compile:

                                    But still I m getting the undefined reference type of error's(As mentioned above). What could be the reason for this

                                    • symbols are really missing (check the sources).
                                    • you don't #include relevant headers
                                    S Offline
                                    S Offline
                                    shivaVMC
                                    wrote on 21 Jun 2018, 05:38 last edited by
                                    #32
                                    This post is deleted!
                                    1 Reply Last reply
                                    0

                                    25/32

                                    19 Jun 2018, 06:21

                                    • Login

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