Qt Creator building for ARM Linux device skipping ARM libraries



  • 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?


  • Moderators

    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?



  • 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.
    

  • Lifetime Qt Champion

    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 ?


  • Moderators

    @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?



  • 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?


  • Moderators

    @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.



  • @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.



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


  • Moderators

    @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?



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

    @dheerendra I'm using Processor SDK v3.03


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.