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. Qt Creator building for ARM Linux device skipping ARM libraries
Forum Updated to NodeBB v4.3 + New Features

Qt Creator building for ARM Linux device skipping ARM libraries

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
11 Posts 4 Posters 4.6k Views 3 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.
  • T Offline
    T Offline
    twall
    wrote on last edited by
    #1

    Hello, I'm trying to get Qt Creator working for debugging my application on an embedded device, and I've been following this how-to guide from TI. However, when I go to build my application (it's the same simple hello world application, no changes), I receive 15 build issues regarding the cross compiler skipping over most of my shared object files when it searches for libraries. All messages take the form of 'skipping incompatible /home/tom/blah/blah/blah.so when searching for -lQt5xxx'

    0_1501779002185_6a03c15e-0e11-4fec-a27c-6f7935883647-image.png

    I've been up and down my Qt compilation settings, but I'm stumped as to how to fix this. Any ideas?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      The tutorial shows code for Qt 4.x but is supposed to be for Qt 5.5... that sounds suspicious.

      I suspect the wrong float ABI is chosen. Which makespecs are you using to compile? What do you see after -mfloat in your compiler invocation output? Is it abi_hard, hard, softfp or something else?

      (Z(:^

      1 Reply Last reply
      1
      • T Offline
        T Offline
        twall
        wrote on last edited by
        #3

        The tutorial is quite out of date, but I have more current versions of Qt in the same folder locations.

        My compiler invocation doesn't have -mfloat, but it's the gnueabihf- cross compiler, which is hard-float, and has worked excellently so far for my A-15 processor.

        In any case, here is the compiler invocation and output:

        14:41:46: Running steps for project evm_cross_compile_test...
        14:41:46: Configuration unchanged, skipping qmake step.
        14:41:46: Starting: "/usr/bin/make" 
        g++  -o evm_cross_compile_test main.o helloworld.o moc_helloworld.o   -L/home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGLESv2 -lpthread 
        /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libQt5Widgets.so when searching for -lQt5Widgets
        Makefile:188: recipe for target 'evm_cross_compile_test' failed
        /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libQt5Gui.so when searching for -lQt5Gui
        /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libQt5Core.so when searching for -lQt5Core
        /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libGLESv2.so when searching for -lGLESv2
        /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libpthread.so when searching for -lpthread
        /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libpthread.a when searching for -lpthread
        /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libstdc++.so when searching for -lstdc++
        /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libm.so when searching for -lm
        /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libm.a when searching for -lm
        /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libgcc.a when searching for -lgcc
        /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libc.so when searching for -lc
        /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libc.a when searching for -lc
        /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libgcc.a when searching for -lgcc
        main.o:(.qtversion[qt_version_tag]+0x0): undefined reference to `qt_version_tag'
        collect2: error: ld returned 1 exit status
        make: *** [evm_cross_compile_test] Error 1
        14:41:47: The process "/usr/bin/make" exited with code 2.
        Error while building/deploying project evm_cross_compile_test (kit: EVM)
        When executing step "Make"
        14:41:47: Elapsed time: 00:00.
        
        sierdzioS 1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          Looks like the compiler is not happy with the whole sysroot. Might be a silly question but are you sure its content matches your cross-compiler ?

          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
          • T twall

            The tutorial is quite out of date, but I have more current versions of Qt in the same folder locations.

            My compiler invocation doesn't have -mfloat, but it's the gnueabihf- cross compiler, which is hard-float, and has worked excellently so far for my A-15 processor.

            In any case, here is the compiler invocation and output:

            14:41:46: Running steps for project evm_cross_compile_test...
            14:41:46: Configuration unchanged, skipping qmake step.
            14:41:46: Starting: "/usr/bin/make" 
            g++  -o evm_cross_compile_test main.o helloworld.o moc_helloworld.o   -L/home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGLESv2 -lpthread 
            /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libQt5Widgets.so when searching for -lQt5Widgets
            Makefile:188: recipe for target 'evm_cross_compile_test' failed
            /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libQt5Gui.so when searching for -lQt5Gui
            /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libQt5Core.so when searching for -lQt5Core
            /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libGLESv2.so when searching for -lGLESv2
            /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libpthread.so when searching for -lpthread
            /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libpthread.a when searching for -lpthread
            /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libstdc++.so when searching for -lstdc++
            /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libm.so when searching for -lm
            /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libm.a when searching for -lm
            /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libgcc.a when searching for -lgcc
            /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libc.so when searching for -lc
            /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libc.a when searching for -lc
            /usr/bin/ld: skipping incompatible /home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/libgcc.a when searching for -lgcc
            main.o:(.qtversion[qt_version_tag]+0x0): undefined reference to `qt_version_tag'
            collect2: error: ld returned 1 exit status
            make: *** [evm_cross_compile_test] Error 1
            14:41:47: The process "/usr/bin/make" exited with code 2.
            Error while building/deploying project evm_cross_compile_test (kit: EVM)
            When executing step "Make"
            14:41:47: Elapsed time: 00:00.
            
            sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #5

            @twall said in Qt Creator building for ARM Linux device skipping ARM libraries:

            g++ [...]
            /usr/bin/ld: skipping [...]

            /usr/bin/ld ? You are not using the sysroot (ARM) linker, but the one from your OS (probably x86). And is the "g++" here the cross-compiler or your OS compiler?

            (Z(:^

            1 Reply Last reply
            1
            • T Offline
              T Offline
              twall
              wrote on last edited by
              #6

              My g++ compiler is arm-linux-gnueabihf-g++, and yes it looks like the linker being run is the default OS linker (which would be x64-based)

              Is there any way to change the linker?

              sierdzioS 1 Reply Last reply
              0
              • T twall

                My g++ compiler is arm-linux-gnueabihf-g++, and yes it looks like the linker being run is the default OS linker (which would be x64-based)

                Is there any way to change the linker?

                sierdzioS Offline
                sierdzioS Offline
                sierdzio
                Moderators
                wrote on last edited by
                #7

                @twall said in Qt Creator building for ARM Linux device skipping ARM libraries:

                Is there any way to change the linker?

                Yes. Either modify the makespecs (located in Qt installation dir->mkspecs) to apply this "globally", or use QMAKE_LINK variable in your .pro file, or when invoking qmake.

                (Z(:^

                T 1 Reply Last reply
                0
                • sierdzioS sierdzio

                  @twall said in Qt Creator building for ARM Linux device skipping ARM libraries:

                  Is there any way to change the linker?

                  Yes. Either modify the makespecs (located in Qt installation dir->mkspecs) to apply this "globally", or use QMAKE_LINK variable in your .pro file, or when invoking qmake.

                  T Offline
                  T Offline
                  twall
                  wrote on last edited by twall
                  #8

                  @sierdzio

                  Hmm, according to the documentation, this is something that can be set in the qmake.conf file. Here's my current qmake.conf file, with the Libraries folder going straight to my libQt*.so files.

                  [Paths]
                  Prefix=/home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi
                  Libraries=/home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib
                  Headers=/home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include/qt5
                  HostPrefix=/home/tom/sitara/linux-devkit/sysroots/x86_64-arago-linux
                  HostBinaries=/home/tom/sitara/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/qt5/
                  

                  I've changed my QMAKE_LINK variable to be the arm-linux-gnueabihf-ld linker, which is located in the same directory as my gcc and g++ cross-compilers, but I receive an error in Qt Creator that it cannot read the type of binary the linker is. This is on a system that has used this particular linker to develop other applications, not just Qt, so I know that it works on its own.

                  sierdzioS 1 Reply Last reply
                  0
                  • dheerendraD Offline
                    dheerendraD Offline
                    dheerendra
                    Qt Champions 2022
                    wrote on last edited by
                    #9

                    Which version of Sitara kit r u using ? I am sure u have this problem ti kit.

                    Dheerendra
                    @Community Service
                    Certified Qt Specialist
                    http://www.pthinks.com

                    1 Reply Last reply
                    0
                    • T twall

                      @sierdzio

                      Hmm, according to the documentation, this is something that can be set in the qmake.conf file. Here's my current qmake.conf file, with the Libraries folder going straight to my libQt*.so files.

                      [Paths]
                      Prefix=/home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi
                      Libraries=/home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib
                      Headers=/home/tom/sitara/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include/qt5
                      HostPrefix=/home/tom/sitara/linux-devkit/sysroots/x86_64-arago-linux
                      HostBinaries=/home/tom/sitara/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/qt5/
                      

                      I've changed my QMAKE_LINK variable to be the arm-linux-gnueabihf-ld linker, which is located in the same directory as my gcc and g++ cross-compilers, but I receive an error in Qt Creator that it cannot read the type of binary the linker is. This is on a system that has used this particular linker to develop other applications, not just Qt, so I know that it works on its own.

                      sierdzioS Offline
                      sierdzioS Offline
                      sierdzio
                      Moderators
                      wrote on last edited by
                      #10

                      @twall said in Qt Creator building for ARM Linux device skipping ARM libraries:

                      I've changed my QMAKE_LINK variable to be the arm-linux-gnueabihf-ld linker, which is located in the same directory as my gcc and g++ cross-compilers, but I receive an error in Qt Creator that it cannot read the type of binary the linker is.

                      Hm. Does that linker work, however, when you try to compile your app from the command line?

                      (Z(:^

                      T 1 Reply Last reply
                      0
                      • sierdzioS sierdzio

                        @twall said in Qt Creator building for ARM Linux device skipping ARM libraries:

                        I've changed my QMAKE_LINK variable to be the arm-linux-gnueabihf-ld linker, which is located in the same directory as my gcc and g++ cross-compilers, but I receive an error in Qt Creator that it cannot read the type of binary the linker is.

                        Hm. Does that linker work, however, when you try to compile your app from the command line?

                        T Offline
                        T Offline
                        twall
                        wrote on last edited by
                        #11

                        @sierdzio invoking that linker does work. I modified the Makefile to use it and it compiles.

                        @dheerendra I'm using Processor SDK v3.03

                        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