This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Qt4.8.5 build errors while compiling



Hi, 

I am trying to build Qt4.8.5 from Qt4.8.5 Source. I am following this link

_http://processors.wiki.ti.com/index.php/Building_Qt.

Configuration :

SDK : v8

Target : Sitara EVM Board

Host : Ubuntu 14.04 64 bit

Here is my qmake.conf file

#
# qmake configuration for building with arm-linux-g++
#

include(../../common/linux.conf)
include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.conf)
include(../../common/qws.conf)

# modifications to g++.conf
#Modified by vijay

#Compiler Flags to take advantage of the ARM architecture
QMAKE_CFLAGS += -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
QMAKE_CXXFLAGS += -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp


QMAKE_CC = arm-linux-gnueabihf-gcc
QMAKE_CXX = arm-linux-gnueabihf-g++
QMAKE_LINK = arm-linux-gnueabihf-g++
QMAKE_LINK_SHLIB = arm-linux-gnueabihf-g++

# modifications to linux.conf
QMAKE_AR = arm-linux-gnueabihf-ar cqs
QMAKE_OBJCOPY = arm-linux-gnueabihf-objcopy
QMAKE_STRIP = arm-linux-gnueabihf-strip

load(qt_config)

Build Procedure :

# cp -R /home/vk18434/qt-everywhere-opensource-src-4.8.5/mkspecs/qws/linux-arm-g++/ /home/vk18434/qt-everywhere-opensource-src-4.8.5/mkspecs/qws/linux-am335x-g++/

# export PATH=/home/vk18434/ti-sdk-am335x-evm-08.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin:$PATH
# export CROSS_COMPILE=/home/vk18434/ti-sdk-am335x-evm-08.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf-
# ./configure -prefix /media/vk18434/rootfs -embedded arm -platform qws/linux-x86_64-g++ -xplatform qws/linux-am335x-g++ -depths 16,24,32 -no-mmx
-no-3dnow -no-sse -no-sse2 -no-glib -no-cups -no-largefile -no-accessibility -no-openssl -no-gtkstyle -qt-mouse-pc -qt-mouse-linuxtp
-qt-mouse-linuxinput -plugin-mouse-linuxtp -plugin-mouse-pc -fast -qt-libjpeg -xcursor -no-webkit -verbose -confirm-license -little-endian
# make

 

I get build error once I issue make. 

/home/vk18434/ti-sdk-am335x-evm-08.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: failed to merge target specific data of file .obj/release-shared-emb-arm/moc_qsignaltransition.o
/home/vk18434/ti-sdk-am335x-evm-08.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: error: libQtCore.so.4.8.5 uses VFP register arguments, .obj/release-shared-emb-arm/moc_qeventtransition.o does not
/home/vk18434/ti-sdk-am335x-evm-08.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: failed to merge target specific data of file .obj/release-shared-emb-arm/moc_qeventtransition.o
.obj/release-shared-emb-arm/qtconcurrentiteratekernel.o: In function `getticks()':
qtconcurrentiteratekernel.cpp:(.text+0x1a): undefined reference to `clock_gettime'
collect2: error: ld returned 1 exit status
make[1]: *** [../../lib/libQtCore.so.4.8.5] Error 1
make[1]: Leaving directory `/home/vk18434/qt-everywhere-opensource-src-4.8.5/src/corelib'
make: *** [sub-corelib-make_default-ordered] Error 2

Full build errors are attached.

Qt_build_errors.txt

Please let me know, if I am anywhere wrong is following the procedure. 

Thank you

  • I fixed this issue with the following change in qmake.conf file.

    Now my qmake.conf file looks like this :

    #
    # qmake configuration for building with arm-linux-g++
    #
    
    include(../../common/linux.conf)
    include(../../common/gcc-base-unix.conf)
    include(../../common/g++-unix.conf)
    include(../../common/qws.conf)
    
    # modifications to g++.conf
    #Modified by vijay 
    
    #Compiler Flags to take advantage of the ARM architecture
    
    QMAKE_CFLAGS= -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8
    QMAKE_CXXFLAGS= -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8
    
    QMAKE_CC                = arm-linux-gnueabihf-gcc
    QMAKE_CXX               = arm-linux-gnueabihf-g++
    QMAKE_LINK              = arm-linux-gnueabihf-g++
    QMAKE_LINK_SHLIB        = arm-linux-gnueabihf-g++
    
    # modifications to linux.conf
    QMAKE_AR                = arm-linux-gnueabihf-ar cqs
    QMAKE_OBJCOPY           = arm-linux-gnueabihf-objcopy
    QMAKE_STRIP             = arm-linux-gnueabihf-strip
    
    load(qt_config)
    

    After this, I tried to do make install, but its installing in some other directory, so I manually copied the Qtlib to /usr/lib. 

    But when I run My Qt application it throws this errors:

    root@am335x-evm:/usr# ./untitled -qws
    ./untitled: error while loading shared libraries: libQtGuiE.so.4: cannot open shared object file: No such file or directory

     

    Can anyone help on this ?

    Thank you in advance !! 

  • First do a sync.

    $ sync

    If the libQtGuiE.so.4 is present and the error still persist the lib might not been properly cross-compiled.