Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to use qmake to cross-compile for imx6?
QtWS25 Last Chance

How to use qmake to cross-compile for imx6?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
debianlinuxqmakeimx6
25 Posts 4 Posters 14.7k 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.
  • ? This user is from outside of this forum
    ? This user is from outside of this forum
    Guest
    wrote on 16 Mar 2017, 15:53 last edited by A Former User
    #1

    I work in Debian Jessie with a freescale imx6, i want to get qmake for make a cross-compile to imx6, i intented run this configuration link text, but i display this error:

    collect2: error: ld returned 1 exit status
    make: *** [../bin/qmake] Error 1

    This image is of error:
    ScreenshotError.

    Someone could help me, thanks.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 16 Mar 2017, 22:06 last edited by
      #2

      Hi,

      The main problem is that you are trying to cross-compile Qt 5 with instructions for Qt 4.

      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
      1
      • A Offline
        A Offline
        Alexander-9
        wrote on 17 Mar 2017, 15:28 last edited by
        #3

        Hi @SGaist, i find this way for create qmake in qt5, but it shows me the same error or i need other way for create the qmake??, thanks.

        Regards.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 17 Mar 2017, 21:00 last edited by
          #4

          What cross-compiler are you using ?

          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
            Alexander-9
            wrote on 17 Mar 2017, 21:13 last edited by
            #5

            The tools that i use:

            • Qt 5.8.0.
            • Qt creator 4.2.1
            • Poky linux 2.0.3.
            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 17 Mar 2017, 21:19 last edited by
              #6

              Good to know, however that doesn't answer the question about the cross-compiler version.

              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
                Alexander-9
                wrote on 17 Mar 2017, 23:29 last edited by Alexander-9
                #7

                For the cross-compiler i use toolchain the next : poky-glibc-x86_64-meta-toolchain-qt-armv5e-toolchain-qt-2.0.3.sh, i am in the correct??.

                after of install some packages, i can run ./configure https://drive.google.com/file/d/0B66wEl1-cjbObjJEY1pYd3lkTU0/view?usp=sharing.

                but in the moment that run make, show me the next error https://drive.google.com/file/d/0B66wEl1-cjbOOUQ4NzBkRDBORTg/view?usp=sharing.

                or what is the error i am making??, regards

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 18 Mar 2017, 21:55 last edited by
                  #8

                  From what you wrote you try to use a toolchain that is for ARMv5, the imx6 AFAIK, runs on an ARMv7 so I'd say no that won't do it.

                  Also, please translate the error message.

                  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 22 Mar 2017, 00:14
                  0
                  • S SGaist
                    18 Mar 2017, 21:55

                    From what you wrote you try to use a toolchain that is for ARMv5, the imx6 AFAIK, runs on an ARMv7 so I'd say no that won't do it.

                    Also, please translate the error message.

                    A Offline
                    A Offline
                    Alexander-9
                    wrote on 22 Mar 2017, 00:14 last edited by
                    #9

                    @SGaist, Hi i can run ./configure and if create the qmake, but the qmake that create is for x64 and this is what i don't want, i have that add other thing else, for that can create a qmake for ARM.

                    Regards.

                    J 1 Reply Last reply 22 Mar 2017, 05:30
                    0
                    • A Alexander-9
                      22 Mar 2017, 00:14

                      @SGaist, Hi i can run ./configure and if create the qmake, but the qmake that create is for x64 and this is what i don't want, i have that add other thing else, for that can create a qmake for ARM.

                      Regards.

                      J Offline
                      J Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 22 Mar 2017, 05:30 last edited by
                      #10

                      @Alexander-9 You need to cross-compile for your target. You can see how it is done for Raspberry Pi here http://wiki.qt.io/RaspberryPi_Beginners_Guide (don't know what your target device is, but it will be similar).

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

                      1 Reply Last reply
                      1
                      • S Offline
                        S Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 22 Mar 2017, 07:55 last edited by
                        #11

                        To add to @jsulm, that's normal. When cross-compiling there are host tools like qmake that will be built for your desktop machine so your can develop on said machine while targeting your device.

                        If you want build your application directly on your target then you'll have to do a native Qt build on your target also.

                        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
                        1
                        • A Offline
                          A Offline
                          Alexander-9
                          wrote on 22 Mar 2017, 17:02 last edited by Alexander-9
                          #12

                          @jsulm , @SGaist I intented run of cross-compiler with next way:

                          ./configure -release -opengl es2 -device linux-imx6-g++ -device-option CROSS_COMPILE=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi- -opensource -confirm-license -prefix /opt/imx6, this way of cross-compile is correct??

                          But show me this ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken., and for details Config.log, in this moment i'm seraching the way for add the files crt1.o, crti.o etc, etc, regards.

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on 22 Mar 2017, 21:39 last edited by
                            #13

                            You are at least missing the sysroot option.

                            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 22 Mar 2017, 22:57
                            0
                            • S SGaist
                              22 Mar 2017, 21:39

                              You are at least missing the sysroot option.

                              A Offline
                              A Offline
                              Alexander-9
                              wrote on 22 Mar 2017, 22:57 last edited by
                              #14

                              @SGaist Excuse fro the question, but sysroot what is??

                              J 1 Reply Last reply 23 Mar 2017, 05:50
                              0
                              • A Alexander-9
                                22 Mar 2017, 22:57

                                @SGaist Excuse fro the question, but sysroot what is??

                                J Offline
                                J Offline
                                jsulm
                                Lifetime Qt Champion
                                wrote on 23 Mar 2017, 05:50 last edited by
                                #15

                                @Alexander-9 Sysroot is a directory containing the content of the target device file system (or parts of it). It must contain all needed header files and libraries from your target device, else you cannot cross-compile.

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

                                1 Reply Last reply
                                1
                                • A Offline
                                  A Offline
                                  Alexander-9
                                  wrote on 23 Mar 2017, 16:42 last edited by Alexander-9
                                  #16

                                  @jsulm, @SGaist , this the new cross-compile: ./configure -release -opengl es2 -device linux-imx6-g++ -device-option CROSS_COMPILE=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi- -sysroot /dev/sdd -opensource -confirm-license -prefix /opt/imx6, is correct this??

                                  after of run the configure, show me in the Config.log:

                                  executing config test verifyspec

                                  • cd /home/qt/Descargas/qt5/qtbase/config.tests/common/verifyspec && /home/qt/Descargas/qt5/qtbase/bin/qmake -qtconf /home/qt/Descargas/qt5/qtbase/bin/qt.conf "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared console" "QMAKE_CFLAGS += --sysroot=/dev/sdd" "QMAKE_CXXFLAGS += --sysroot=/dev/sdd" "QMAKE_LFLAGS += --sysroot=/dev/sdd" /home/qt/Descargas/qt5/qtbase/config.tests/common/verifyspec
                                  • cd /home/qt/Descargas/qt5/qtbase/config.tests/common/verifyspec && MAKEFLAGS= /usr/bin/make clean && MAKEFLAGS= /usr/bin/make

                                  rm -f verifyspec.o
                                  rm -f *~ core *.core
                                  /opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ -c -pipe -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard --sysroot=/dev/sdd -O2 -std=gnu++11 -Wall -W -fPIC -I. -I/home/qt/Descargas/qt5/qtbase/mkspecs/devices/linux-imx6-g++ -o verifyspec.o verifyspec.cpp
                                  cc1plus: error: /dev/sdd/usr/include/c++/5.2.0: Not a directory
                                  cc1plus: error: /dev/sdd/usr/include/c++/5.2.0/arm-poky-linux-gnueabi: Not a directory
                                  cc1plus: error: /dev/sdd/usr/include/c++/5.2.0/backward: Not a directory
                                  cc1plus: error: /dev/sdd/usr/lib/gcc/arm-poky-linux-gnueabi/5.2.0/include: Not a directory
                                  cc1plus: error: /dev/sdd/usr/local/include: Not a directory
                                  cc1plus: error: /dev/sdd/usr/include: Not a directory
                                  Makefile:1006: fallo en las instrucciones para el objetivo 'verifyspec.o'
                                  make: *** [verifyspec.o] Error 1

                                  I have that install more packges??

                                  Regards

                                  1 Reply Last reply
                                  0
                                  • S Offline
                                    S Offline
                                    SGaist
                                    Lifetime Qt Champion
                                    wrote on 23 Mar 2017, 21:23 last edited by
                                    #17

                                    /dev/sdd ? Highly unlikely since it represent a drive on your system not even a partition but the whole physical drive.

                                    You need to pass the folder where you copied your device file system.

                                    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
                                    1
                                    • A Offline
                                      A Offline
                                      Alexander-9
                                      wrote on 24 Mar 2017, 18:15 last edited by Alexander-9
                                      #18

                                      @SGaist @jsulm I already add the sysroot ./configure -release -opengl es2 -device linux-imx6-g++ -device-option CROSS_COMPILE=/opt/poky/2.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi- -sysroot /media/qt/rootfs/ -prefix /usr/local/qt5, the sysroot contain the folders: bin, build, boot, etc, is correct??

                                      Generates me this error of compilation: Config.log.

                                      1 Reply Last reply
                                      0
                                      • S Offline
                                        S Offline
                                        SGaist
                                        Lifetime Qt Champion
                                        wrote on 24 Mar 2017, 21:38 last edited by
                                        #19

                                        Did you do it from a clean state ?

                                        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
                                          Alexander-9
                                          wrote on 24 Mar 2017, 21:51 last edited by Alexander-9
                                          #20

                                          @SGaist I have executed the command make clean, is correct or i have run other command??

                                          1 Reply Last reply
                                          0

                                          1/25

                                          16 Mar 2017, 15:53

                                          • Login

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