Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. can we change the compiler in qmake

can we change the compiler in qmake

Scheduled Pinned Locked Moved Unsolved General and Desktop
31 Posts 6 Posters 8.1k 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.
  • A Offline
    A Offline
    Asha
    wrote on 11 Sept 2019, 07:49 last edited by
    #1

    Hi,

    I am running one simple qt application,first i selected the normal desktop gcc compiler,

    but I am connecting the beagleboneboard to my laptop,so through some websites i got i need cross compiler,so now i installed arm cross compiler and selecting this compiler in kit configuration but that showing the red mark,

    and getting the issue,

    used g++ compiler in qmake ,now using the arm cross compiler

    so how to change the compiler in qmake..

    and how to run that application successfully

    thankyou

    J 1 Reply Last reply 11 Sept 2019, 11:17
    0
    • A Asha
      11 Sept 2019, 07:49

      Hi,

      I am running one simple qt application,first i selected the normal desktop gcc compiler,

      but I am connecting the beagleboneboard to my laptop,so through some websites i got i need cross compiler,so now i installed arm cross compiler and selecting this compiler in kit configuration but that showing the red mark,

      and getting the issue,

      used g++ compiler in qmake ,now using the arm cross compiler

      so how to change the compiler in qmake..

      and how to run that application successfully

      thankyou

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 11 Sept 2019, 11:17 last edited by jsulm 9 Nov 2019, 11:19
      #2

      @asha said in can we change the compiler in qmake:

      showing the red mark

      First: please put mouse cursor over that red mark and check what it says (what the problem is).
      Second: you don't change compiler in qmake, you define the proper compiler in your Kit.
      In your Kit for the target device you need Qt compiled with cross compiler and the cross compiler.
      If in doubt please post screen shot of your Kit...

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • A Offline
        A Offline
        Asha
        wrote on 11 Sept 2019, 11:52 last edited by
        #3

        Its showing the error:

        First:
        the compiler arm-linux-generic-elf64bit cannot produce code for the qt version "Qt 5.13.0 GCC 64bit"(x86-linux-generic-elf-64bit)..

        Second:yes giving the proper path for cross compiler,you can see here0_1568202773597_procom.png

        A J 2 Replies Last reply 11 Sept 2019, 12:12
        0
        • A Asha
          11 Sept 2019, 11:52

          Its showing the error:

          First:
          the compiler arm-linux-generic-elf64bit cannot produce code for the qt version "Qt 5.13.0 GCC 64bit"(x86-linux-generic-elf-64bit)..

          Second:yes giving the proper path for cross compiler,you can see here0_1568202773597_procom.png

          A Offline
          A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on 11 Sept 2019, 12:12 last edited by
          #4

          @asha said in can we change the compiler in qmake:

          the compiler arm-linux-generic-elf64bit cannot produce code for the qt version "Qt 5.13.0 GCC 64bit"(x86-linux-generic-elf-64bit).

          Then you need a Qt version that fits your compiler (architecture and bitness) and you need to assign this to your compiler in the Kit.

          Qt has to stay free or it will die.

          1 Reply Last reply
          1
          • A Offline
            A Offline
            Asha
            wrote on 11 Sept 2019, 12:27 last edited by
            #5

            any idea which version qt i have to install about this gcc cross compiler as i attached below please go through that one

            0_1568204702675_compiler (2).png

            If have any idea then please let me know...

            OR

            please give the information ,which supports any qt version and cross compiler both..

            thankyou

            1 Reply Last reply
            0
            • A Asha
              11 Sept 2019, 11:52

              Its showing the error:

              First:
              the compiler arm-linux-generic-elf64bit cannot produce code for the qt version "Qt 5.13.0 GCC 64bit"(x86-linux-generic-elf-64bit)..

              Second:yes giving the proper path for cross compiler,you can see here0_1568202773597_procom.png

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 11 Sept 2019, 12:42 last edited by
              #6

              @asha said in can we change the compiler in qmake:

              the compiler arm-linux-generic-elf64bit cannot produce code for the qt version "Qt 5.13.0 GCC 64bit"(x86-linux-generic-elf-64bit)..

              Of course it can't. I already told you that you need a cross compiled Qt version. ARM != x86-64. That means you need download Qt source code and build it using your cross compiler and sysroot for your device.

              "Second:yes giving the proper path for cross compiler,you can see here" - no, I can't because you did not show your Kit. Did you select this compiler in your Kit?

              "any idea which version qt i have to install" - cross compile Qt by yourself.
              Here https://wiki.qt.io/index.php?title=Raspberrypi_beginners_guide&redirect=no is an explanation how to do it for RaspberryPi, but it is similar for other devices.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • A Offline
                A Offline
                Asha
                wrote on 11 Sept 2019, 12:51 last edited by
                #7

                here is the kit:0_1568206276133_kit (1).png

                J 1 Reply Last reply 12 Sept 2019, 04:38
                0
                • A Asha
                  11 Sept 2019, 12:51

                  here is the kit:0_1568206276133_kit (1).png

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 12 Sept 2019, 04:38 last edited by
                  #8

                  @asha Yes, the Qt version you selected can't be used with an ARM compiler.
                  Cross compile Qt and set that one in the Kit.

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    Asha
                    wrote on 12 Sept 2019, 07:19 last edited by
                    #9

                    Hi,

                    I downloaded the qt source code,

                    "qt-everywhere-opensource-src-5.7.1.tar.gz"

                    now trying to build this,here is the attachement0_1568272684375_build.png ,

                    is it correct?(because I am feeling like that again i am building the qt for linux-g++ only)

                    J.HilkJ 1 Reply Last reply 12 Sept 2019, 07:35
                    0
                    • A Asha
                      12 Sept 2019, 07:19

                      Hi,

                      I downloaded the qt source code,

                      "qt-everywhere-opensource-src-5.7.1.tar.gz"

                      now trying to build this,here is the attachement0_1568272684375_build.png ,

                      is it correct?(because I am feeling like that again i am building the qt for linux-g++ only)

                      J.HilkJ Offline
                      J.HilkJ Offline
                      J.Hilk
                      Moderators
                      wrote on 12 Sept 2019, 07:35 last edited by
                      #10

                      @asha
                      what was your ./configure command?


                      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                      Q: What's that?
                      A: It's blue light.
                      Q: What does it do?
                      A: It turns blue.

                      1 Reply Last reply
                      1
                      • A Offline
                        A Offline
                        Asha
                        wrote on 12 Sept 2019, 07:42 last edited by
                        #11

                        here is the attachement0_1568274045294_config.png

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on 12 Sept 2019, 18:34 last edited by
                          #12

                          Hi,

                          From the looks of it, you're not telling configure that you want to cross-compile.

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            Asha
                            wrote on 13 Sept 2019, 05:22 last edited by
                            #13

                            Hi,

                            Thanks for the replay,please see the below attachement ,and please let me what is the problem, and how to solve this0_1568352141029_error2.png

                            J 1 Reply Last reply 13 Sept 2019, 06:30
                            0
                            • A Asha
                              13 Sept 2019, 05:22

                              Hi,

                              Thanks for the replay,please see the below attachement ,and please let me what is the problem, and how to solve this0_1568352141029_error2.png

                              J Offline
                              J Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on 13 Sept 2019, 06:30 last edited by
                              #14

                              @asha Did you read what @SGaist wrote?
                              You are NOT cross compiling!
                              You need to tell configure that you want to cross compile.
                              An example how to do this is here: https://www.raspberrypi.org/forums/viewtopic.php?t=204778

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              A 1 Reply Last reply 13 Sept 2019, 11:08
                              1
                              • J jsulm
                                13 Sept 2019, 06:30

                                @asha Did you read what @SGaist wrote?
                                You are NOT cross compiling!
                                You need to tell configure that you want to cross compile.
                                An example how to do this is here: https://www.raspberrypi.org/forums/viewtopic.php?t=204778

                                A Offline
                                A Offline
                                Asha
                                wrote on 13 Sept 2019, 11:08 last edited by
                                #15

                                @jsulm yes I read,what @SGaist wrote,

                                So,I stopped that configure and again done the configure with my cross compiler ,the above screenshot is for cross compiler only that is "arm-linux-gnueabihf"

                                Please go through that oone...

                                Pablo J. RoginaP 1 Reply Last reply 13 Sept 2019, 11:47
                                0
                                • A Asha
                                  13 Sept 2019, 11:08

                                  @jsulm yes I read,what @SGaist wrote,

                                  So,I stopped that configure and again done the configure with my cross compiler ,the above screenshot is for cross compiler only that is "arm-linux-gnueabihf"

                                  Please go through that oone...

                                  Pablo J. RoginaP Offline
                                  Pablo J. RoginaP Offline
                                  Pablo J. Rogina
                                  wrote on 13 Sept 2019, 11:47 last edited by
                                  #16

                                  @asha said in can we change the compiler in qmake:

                                  the above screenshot is for cross compiler only that is "arm-linux-gnueabihf"

                                  Assuming that "beagle@beagle1" read from command prompt in that screenshot, it looks like you're working on your EMBEDDED DEVICE.

                                  If so, then you are NOT cross-compiling, which whole purpose is by no means compiling in the target device.

                                  You are supposed to only use the BBB device just to copy the cross-compiled Qt libraries and application (which are built in the host machine) and only run it there

                                  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

                                  A 1 Reply Last reply 13 Sept 2019, 12:10
                                  1
                                  • SGaistS Offline
                                    SGaistS Offline
                                    SGaist
                                    Lifetime Qt Champion
                                    wrote on 13 Sept 2019, 11:47 last edited by
                                    #17

                                    Did you check that you have libz in your sysroot ?

                                    Interested in AI ? www.idiap.ch
                                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                    A 1 Reply Last reply 13 Sept 2019, 12:00
                                    0
                                    • SGaistS SGaist
                                      13 Sept 2019, 11:47

                                      Did you check that you have libz in your sysroot ?

                                      A Offline
                                      A Offline
                                      Asha
                                      wrote on 13 Sept 2019, 12:00 last edited by
                                      #18

                                      @sgaist ,I checked it in qt kit configuration ,And I am not finding libz in my sysroot..

                                      1 Reply Last reply
                                      0
                                      • Pablo J. RoginaP Pablo J. Rogina
                                        13 Sept 2019, 11:47

                                        @asha said in can we change the compiler in qmake:

                                        the above screenshot is for cross compiler only that is "arm-linux-gnueabihf"

                                        Assuming that "beagle@beagle1" read from command prompt in that screenshot, it looks like you're working on your EMBEDDED DEVICE.

                                        If so, then you are NOT cross-compiling, which whole purpose is by no means compiling in the target device.

                                        You are supposed to only use the BBB device just to copy the cross-compiled Qt libraries and application (which are built in the host machine) and only run it there

                                        A Offline
                                        A Offline
                                        Asha
                                        wrote on 13 Sept 2019, 12:10 last edited by
                                        #19

                                        @pablo-j-rogina Sir,
                                        "beagle@beagle1" is my user name, where my target device name is debian@beaglebone.

                                        I am not successed with make run only,so I am not understood this lines

                                        "You are supposed to only use the BBB device just to copy the cross-compiled Qt libraries and application (which are built in the host machine) and only run it there"

                                        while make running getting error some library files are missing ,Like

                                        "error while loading shared libraries: libz.so.1: /home/beagle1/installQt/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/../libexec/gcc/arm-linux-gnueabihf4.8.2/cc1plus: error while loading shared libraries: libz.so.1: cannot open shared object file:
                                        No such file or directory"....

                                        1 Reply Last reply
                                        0
                                        • A Offline
                                          A Offline
                                          Asha
                                          wrote on 13 Sept 2019, 12:23 last edited by
                                          #20

                                          One more thing ,

                                          SELinux status is Disable in my system,

                                          is this is issue?

                                          1 Reply Last reply
                                          0

                                          1/31

                                          11 Sept 2019, 07:49

                                          • Login

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