Undefined reference to qt_version_tag (for Apalis-Tk1 Cross Compiling)



  • Re: Undefined reference to qt_version_tag

    Hi,
    I am cross-compiling for Toradex apalis-tk1. I have that same problem. Can you help with this?

    ~$ qmake -v
    QMake version 3.0
    Using Qt version 5.2.1 in /usr/lib/x86_64-linux-gnu
    ~$ ~/toradex-sdk/sysroots/x86_64-angstromsdk-linux/usr/bin/qt5/qmake -v
    QMake version 3.0
    Using Qt version 5.7.1 in /home/abdullah/toradex-sdk/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib
    
    
    11:41:53: Running steps for project testQmake...
    11:41:53: Configuration unchanged, skipping qmake step.
    11:41:53: Starting: "/usr/bin/make" 
    /home/abdullah/toradex-sdk/sysroots/x86_64-angstromsdk-linux/usr/bin/qt5/qmake -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug -o Makefile ../testQmake/testQmake.pro
    g++  -o testQmake main.o qrc_qml.o   -L/home/abdullah/toradex-sdk/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib -lQt5Quick -L/home/abdullah/toradex/oe-core/build/tmp-glibc/sysroots/apalis-tk1/usr/lib/arm-linux-gnueabihf/tegra -L/home/abdullah/toradex/oe-core/build/tmp-glibc/sysroots/apalis-tk1/usr/lib -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -lGL -lpthread 
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex-sdk/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/libQt5Quick.so when searching for -lQt5Quick
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex/oe-core/build/tmp-glibc/sysroots/apalis-tk1/usr/lib/libQt5Quick.so when searching for -lQt5Quick
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex-sdk/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/libQt5Gui.so when searching for -lQt5Gui
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex/oe-core/build/tmp-glibc/sysroots/apalis-tk1/usr/lib/libQt5Gui.so when searching for -lQt5Gui
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex-sdk/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/libQt5Qml.so when searching for -lQt5Qml
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex/oe-core/build/tmp-glibc/sysroots/apalis-tk1/usr/lib/libQt5Qml.so when searching for -lQt5Qml
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex-sdk/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/libQt5Network.so when searching for -lQt5Network
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex/oe-core/build/tmp-glibc/sysroots/apalis-tk1/usr/lib/libQt5Network.so when searching for -lQt5Network
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex-sdk/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/libQt5Core.so when searching for -lQt5Core
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex/oe-core/build/tmp-glibc/sysroots/apalis-tk1/usr/lib/libQt5Core.so when searching for -lQt5Core
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex/oe-core/build/tmp-glibc/sysroots/apalis-tk1/usr/lib/libGL.so when searching for -lGL
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex-sdk/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/libpthread.so when searching for -lpthread
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex/oe-core/build/tmp-glibc/sysroots/apalis-tk1/usr/lib/libpthread.so when searching for -lpthread
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex/oe-core/build/tmp-glibc/sysroots/apalis-tk1/usr/lib/libpthread.a when searching for -lpthread
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex-sdk/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/libstdc++.so when searching for -lstdc++
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex/oe-core/build/tmp-glibc/sysroots/apalis-tk1/usr/lib/libstdc++.so when searching for -lstdc++
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex/oe-core/build/tmp-glibc/sysroots/apalis-tk1/usr/lib/libstdc++.a when searching for -lstdc++
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex-sdk/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/libm.so when searching for -lm
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex/oe-core/build/tmp-glibc/sysroots/apalis-tk1/usr/lib/libm.so when searching for -lm
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex/oe-core/build/tmp-glibc/sysroots/apalis-tk1/usr/lib/libm.a when searching for -lm
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex-sdk/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/libc.so when searching for -lc
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex/oe-core/build/tmp-glibc/sysroots/apalis-tk1/usr/lib/libc.so when searching for -lc
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex/oe-core/build/tmp-glibc/sysroots/apalis-tk1/usr/lib/libc.a when searching for -lc
    main.o:(.qtversion[qt_version_tag]+0x0): undefined reference to `qt_version_tag'
    collect2: error: ld returned 1 exit status
    make: *** [testQmake] Error 1
    11:41:53: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project testQmake (kit: TK1)
    When executing step "Make"
    11:41:53: Elapsed time: 00:00.
    

    When I add LIBS += -L"/usr/lib/x86_64-linux-gnu" to the Pro file.

    11:46:45: Running steps for project testQmake...
    11:46:45: Configuration unchanged, skipping qmake step.
    11:46:45: Starting: "/usr/bin/make" 
    /home/abdullah/toradex-sdk/sysroots/x86_64-angstromsdk-linux/usr/bin/qt5/qmake -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug -o Makefile ../testQmake/testQmake.pro
    g++  -o testQmake main.o qrc_qml.o   -L/usr/lib/x86_64-linux-gnu -L/home/abdullah/toradex-sdk/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib -lQt5Quick -L/usr/X11R6/lib64 -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -lGL -lpthread 
    /usr/bin/ld: skipping incompatible /home/abdullah/toradex-sdk/sysroots/armv7at2hf-neon-angstrom-linux-gnueabi/usr/lib/libstdc++.so when searching for -lstdc++
    main.o:(.qtversion[qt_version_tag]+0x0): undefined reference to `qt_version_tag'
    collect2: error: ld returned 1 exit status
    make: *** [testQmake] Error 1
    11:46:45: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project testQmake (kit: TK1)
    When executing step "Make"
    11:46:45: Elapsed time: 00:00.
    

    Thanks.


  • Moderators

    @aktay Do you call qmake/make from clean source code tree? Or did you already built it once there for ARM before?



  • @jsulm

    I call it in the below.

    ~/toradex-sdk/sysroots/x86_64-angstromsdk-linux/usr/bin/qt5/qmake
    

    Also in qtbase/mkspecs/devices folder does not have apalis-tk1 device. Therefore I can't use configure. Could this be the problem?


  • Moderators

    @aktay My question was actually related to where (in which directory) you are when you call qmake?
    If you do it when you're in the source code directory, then - is the source code tree clean? Did you build before from the same location for other device?



  • @jsulm

    Yes I called it from the folder where the source code is located. I have not built it for another device before.


Log in to reply
 

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