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. What is mkspecs used for & how to configure for my hardware
Forum Updated to NodeBB v4.3 + New Features

What is mkspecs used for & how to configure for my hardware

Scheduled Pinned Locked Moved Solved Mobile and Embedded
25 Posts 3 Posters 22.6k 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.
  • embdevE Offline
    embdevE Offline
    embdev
    wrote on last edited by embdev
    #7

    @SGaist that's pretty much a valid note. Maybe that's not the correct sysroot path or incomplete. Is sysroot normally supplied in SDK or I need to build one myself? Does it resides normally in the kernel files that comes with the SDK itself? How may I determine if the sysroot provides the necessary dependencies?

    1 Reply Last reply
    0
    • jeremy_kJ Offline
      jeremy_kJ Offline
      jeremy_k
      wrote on last edited by
      #8

      Perhaps the compiler needs "-std=c++11" in QMAKE_CXXFLAGS.

      Asking a question about code? http://eel.is/iso-c++/testcase/

      1 Reply Last reply
      0
      • embdevE Offline
        embdevE Offline
        embdev
        wrote on last edited by
        #9

        could it be due to my vendor supplied compiler? I think it's a 32-bit compiler.

        1 Reply Last reply
        0
        • jeremy_kJ Offline
          jeremy_kJ Offline
          jeremy_k
          wrote on last edited by
          #10

          Never mind about the -std flag. I see "-std=gnu++11".

          cdefs.h shouldn't be missing due to being a 32 bit compiler. The version I have comes from a glibc-headers x86_64 package. Can you find a copy of the file in the sysroot, and is that location in the include path passed to the compiler with -I?

          Asking a question about code? http://eel.is/iso-c++/testcase/

          1 Reply Last reply
          0
          • embdevE Offline
            embdevE Offline
            embdev
            wrote on last edited by
            #11

            the error log says it's unable to determine my target architecture and also something about c++11. Do I need to amend my qmake.conf file to do something about these 2 parameters mentioned above?

            For the sysroot, i'm only able to locate rootfs in my SDK itself. Would it be ok to use the rootfs path in my configure line?

            1 Reply Last reply
            0
            • embdevE Offline
              embdevE Offline
              embdev
              wrote on last edited by
              #12

              Hi @jeremy_k , could you elaborate by -l ?

              1 Reply Last reply
              0
              • jeremy_kJ Offline
                jeremy_kJ Offline
                jeremy_k
                wrote on last edited by
                #13

                -I, as in -I../../../mkspecs/devices/linux-arm-hi3536-g++, specifies an include path to search.

                Asking a question about code? http://eel.is/iso-c++/testcase/

                embdevE 1 Reply Last reply
                0
                • jeremy_kJ jeremy_k

                  -I, as in -I../../../mkspecs/devices/linux-arm-hi3536-g++, specifies an include path to search.

                  embdevE Offline
                  embdevE Offline
                  embdev
                  wrote on last edited by embdev
                  #14

                  @jeremy_k I see. Actually I went to study my CC directory again installed in /opt/ and managed to locate the missing files as mentioned above.

                  (1) I therefore amended my qmake.conf paths to the following directories:

                  ----------- qmake.conf --------------------------------------------------------------------------------------------------------

                  QMAKE_INCDIR += /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/usr/include
                  QMAKE_LIBDIR += /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/usr/lib
                  QMAKE_LIBDIR += /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/lib

                  -------------------------------------------------------------------------------------------------------------------------------

                  (2) My configure script are as follows

                  ---- configure script ----------------------------------------------------------------------------------------------------------------------

                  ./configure -confirm-license -release -eglfs -v -static -device linux-arm-hi3536-g++ -device-option CROSS_COMPILE=/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/bin/arm-hisiv400-linux- -sysroot /home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single -prefix /home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single/home/aa/Hi3536_SDK_V2.0.4.0/v1_QtEmbedded_5.7

                  --------------------------------------------------------------------------------------------------------------------------------------

                  (3) I proceed to build my Qt 5.7 sources again with the configure script above and the errors reduced drastically to only about a page's worth of errors:

                  -------Build error messages from terminal -------------------------------------------------------------------------------------

                  a@aa:~/Hi3536_SDK_V2.0.4.0/qt-everywhere-enterprise-src-5.7.0/qtbase$ ./build5.7_22-SEPT-16.sh
                  This is the Qt Device Creation Edition.

                  DEFAULT_INCDIRS="/opt/hisi-linux/x86-arm/arm-hisiv400-linux/arm-hisiv400-linux-gnueabi/include/c++/4.8.3
                  /opt/hisi-linux/x86-arm/arm-hisiv400-linux/arm-hisiv400-linux-gnueabi/include/c++/4.8.3/arm-hisiv400-linux-gnueabi
                  /opt/hisi-linux/x86-arm/arm-hisiv400-linux/arm-hisiv400-linux-gnueabi/include/c++/4.8.3/backward
                  /opt/hisi-linux/x86-arm/arm-hisiv400-linux/lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/include
                  /opt/hisi-linux/x86-arm/arm-hisiv400-linux/lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/include-fixed
                  /opt/hisi-linux/x86-arm/arm-hisiv400-linux/arm-hisiv400-linux-gnueabi/include
                  "
                  DEFAULT_LIBDIRS="/opt/hisi-linux/x86-arm/arm-hisiv400-linux/lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3
                  /opt/hisi-linux/x86-arm/arm-hisiv400-linux/lib/gcc
                  /opt/hisi-linux/x86-arm/arm-hisiv400-linux/arm-hisiv400-linux-gnueabi/lib
                  /home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single/lib
                  /home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single/usr/lib
                  "
                  Creating qmake...
                  make: Nothing to be done for 'first'.
                  Running configuration tests...
                  Determining architecture... ()
                  /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/bin/arm-hisiv400-linux-g++ -c -pipe -mfloat-abi=hard --sysroot=/home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single -g -Wall -W -fPIC -I. -isystem /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/usr/include -I../../mkspecs/devices/linux-arm-hi3536-g++ -o arch.o arch.cpp
                  /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/bin/arm-hisiv400-linux-g++ -mfloat-abi=hard -o arch arch.o -L/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/usr/lib -L/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/lib -lrt --sysroot=/home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single
                  /opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find crt1.o: No such file or directory
                  /opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find crti.o: No such file or directory
                  collect2: error: ld returned 1 exit status
                  Makefile:91: recipe for target 'arch' failed
                  make: *** [arch] Error 1
                  Unable to determine architecture!

                  Could not determine the target architecture!
                  Turn on verbose messaging (-v) to see the final report.
                  Determining architecture... ()
                  g++ -c -pipe -g -Wall -W -fPIC -I. -I../../mkspecs/linux-g++ -o arch.o arch.cpp
                  g++ -o arch arch.o
                  Found architecture in binary
                  CFG_HOST_ARCH="x86_64"
                  CFG_HOST_CPUFEATURES=" mmx sse sse2"
                  System architecture: 'unknown'
                  Host architecture: 'x86_64'
                  Precompiled-headers support enabled.
                  /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/bin/arm-hisiv400-linux-g++ -c -fvisibility=hidden fvisibility.c
                  Symbol visibility control enabled.
                  collect2: fatal error: cannot find 'ld'
                  compilation terminated.
                  /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/bin/arm-hisiv400-linux-g++ --sysroot=/home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
                  bsymbolic_functions.c:2:2: error: #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
                  #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
                  ^
                  Symbolic function binding disabled.
                  checking for C++11...
                  /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/bin/arm-hisiv400-linux-g++ -c -pipe -mfloat-abi=hard --sysroot=/home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single -O2 -std=gnu++11 -Wall -W -fPIC -I. -isystem /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/usr/include -I../../../mkspecs/devices/linux-arm-hi3536-g++ -o c++11.o c++11.cpp
                  /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/bin/arm-hisiv400-linux-g++ -mfloat-abi=hard -Wl,-O1 -o c++11 c++11.o -L/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/usr/lib -L/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/lib -lrt --sysroot=/home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single
                  /opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find crt1.o: No such file or directory
                  /opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find crti.o: No such file or directory
                  collect2: error: ld returned 1 exit status
                  Makefile:91: recipe for target 'c++11' failed
                  make: *** [c++11] Error 1
                  C++11 disabled.
                  ERROR: Qt requires a C++11 compiler and yours does not seem to be that.
                  Please upgrade.

                  ----------------------------------------------------------------------------------------------------------------------------------------

                  (4) Would you be able to provide some advice from here? I believe i'm pretty close to closing the errors

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #15

                    What does linux-arm-hi3536-g++ --version return ?

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

                    embdevE 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      What does linux-arm-hi3536-g++ --version return ?

                      embdevE Offline
                      embdevE Offline
                      embdev
                      wrote on last edited by
                      #16

                      @SGaist [linux-arm-hi3536-g++] is the folder I created in Qt, the compiler is arm-hisiv400-linux-g++ installed in /opt/. The version is as follows:

                      arm-hisiv400-linux-g++ (Hisilicon_v400) 4.8.3 20131202 (prerelease)
                      Copyright (C) 2013 Free Software Foundation, Inc.
                      This is free software; see the source for copying conditions. There is NO
                      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #17

                        Can you take a look in your cross-compiler folder and search for where crti.o is ?

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

                        embdevE 1 Reply Last reply
                        0
                        • SGaistS SGaist

                          Can you take a look in your cross-compiler folder and search for where crti.o is ?

                          embdevE Offline
                          embdevE Offline
                          embdev
                          wrote on last edited by
                          #18

                          @SGaist actually I found the directory for crt1.o and crti.o. Do you know how to link to the correct directory for these 2 libs?

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #19

                            Where is that file located ?

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

                            embdevE 1 Reply Last reply
                            0
                            • SGaistS SGaist

                              Where is that file located ?

                              embdevE Offline
                              embdevE Offline
                              embdev
                              wrote on last edited by
                              #20

                              @SGaist it's stored in /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/usr/lib inside my toolchain installed on the host PC.

                              1 Reply Last reply
                              0
                              • SGaistS Offline
                                SGaistS Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on last edited by
                                #21

                                Strange path...

                                You can add it to your configure line with -L /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/usr/lib

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

                                embdevE 1 Reply Last reply
                                0
                                • SGaistS SGaist

                                  Strange path...

                                  You can add it to your configure line with -L /opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/usr/lib

                                  embdevE Offline
                                  embdevE Offline
                                  embdev
                                  wrote on last edited by
                                  #22

                                  @SGaist actually from the error log above, this path is already included inside but i'm not sure why during the search (in the following command lines) that particular path containing the 2 object files are not searched:

                                  -L/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/usr/lib -L/opt/hisi-linux/x86-arm/arm-hisiv400-linux/target/lib -lrt --sysroot=/home/aa/Hi3536_SDK_V2.0.4.0/package/osdrv_single/rootfs_glibc_single
                                   /opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find crt1.o: No such file or directory
                                   /opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find crti.o: No such file or directory
                                  
                                  1 Reply Last reply
                                  0
                                  • SGaistS Offline
                                    SGaistS Offline
                                    SGaist
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #23

                                    Strange... Did you re-run configure ? If so, 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

                                    embdevE 1 Reply Last reply
                                    0
                                    • SGaistS SGaist

                                      Strange... Did you re-run configure ? If so, did you do it from a clean state ?

                                      embdevE Offline
                                      embdevE Offline
                                      embdev
                                      wrote on last edited by
                                      #24

                                      @SGaist actually removing the sysroot, allows me to configure the file, also did some changes to the QMAKE paths to the lib and include. Is the sysroot important?

                                      1 Reply Last reply
                                      0
                                      • SGaistS Offline
                                        SGaistS Offline
                                        SGaist
                                        Lifetime Qt Champion
                                        wrote on last edited by
                                        #25

                                        It's usually the sysroot that provides all the dev packages for the dependencies you might need when cross-compiling. The dependencies that are not part of the cross-toolchain that is.

                                        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

                                        • Login

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