Unable to Build Qt Code on Raspberry Pi



  • Hi,

    Past few weeks I have been trying to setup Qt native build environment in Raspberry Pi board.

    I followed steps mentioned in Native Build of Qt 5.4.1

    Since I do not use USD Hard Disk, I omitted few steps
    -Unpacking source to an external USB HDD
    -Increasing available RAM for concurrent compilation

    Instead I extracted to moved to path : cd ~/opt/qt-everywhere-opensource-src-5.4.1

    and for compilation I run : make 2>&1 | tee make.out

    I tried Qt 5.4.1 version to build on Jessie version of raspbian OS, but it failed. I found similar error someone posted and tried to reply but no response at the end. link text

    And now I tried Qt 5.4.1 on Wheezy version, and I get different error.

    /home/pi/opt/qt-everywhere-opensource-src-5.4.1/qtwebkit/Source/JavaScriptCore//libJavaScriptCore.a: member /home/pi/opt/qt-everywhere-opensource-src-5.4.1/qtwebkit/Source/JavaScriptCore//.obj/dfg/DFGThunks.o in archive is not an object
    collect2: ld returned 1 exit status
    Makefile.jsc:98: recipe for target '../../bin/jsc' failed
    make[3]: *** [../../bin/jsc] Error 1
    make[3]: Leaving directory '/home/pi/opt/qt-everywhere-opensource-src-5.4.1/qtwebkit/Source/JavaScriptCore'
    Makefile.JavaScriptCore:126: recipe for target 'sub-jsc-pro-make_first-ordered' failed
    make[2]: *** [sub-jsc-pro-make_first-ordered] Error 2
    make[2]: Leaving directory '/home/pi/opt/qt-everywhere-opensource-src-5.4.1/qtwebkit/Source/JavaScriptCore'
    Makefile:93: recipe for target 'sub-Source-JavaScriptCore-JavaScriptCore-pro-make_first-ordered' failed
    make[1]: *** [sub-Source-JavaScriptCore-JavaScriptCore-pro-make_first-ordered] Error 2
    make[1]: Leaving directory '/home/pi/opt/qt-everywhere-opensource-src-5.4.1/qtwebkit'
    Makefile:485: recipe for target 'module-qtwebkit-make_first' failed
    make: *** [module-qtwebkit-make_first] Error 2
    
    
    

    Can someone tell me why this occurs? Is this Qt code issue? Is there a way to resolve this?



  • Provide a qmake.conf file



  • @Zola I have seen many qmake.conf file in the Qt source code. I am confused which to take.

    I took the file ./opt/qt-everywhere-opensource-src-5.4.1/qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf

    #
    # qmake configuration for building with arm-linux-gnueabi-g++
    #
    
    MAKEFILE_GENERATOR      = UNIX
    CONFIG                 += incremental
    QMAKE_INCREMENTAL_STYLE = sublib
    
    include(../common/linux.conf)
    include(../common/gcc-base-unix.conf)
    include(../common/g++-unix.conf)
    
    # modifications to g++.conf
    QMAKE_CC                = arm-linux-gnueabi-gcc
    QMAKE_CXX               = arm-linux-gnueabi-g++
    QMAKE_LINK              = arm-linux-gnueabi-g++
    QMAKE_LINK_SHLIB        = arm-linux-gnueabi-g++
    
    # modifications to linux.conf
    QMAKE_AR                = arm-linux-gnueabi-ar cqs
    QMAKE_OBJCOPY           = arm-linux-gnueabi-objcopy
    QMAKE_NM                = arm-linux-gnueabi-nm -P
    QMAKE_STRIP             = arm-linux-gnueabi-strip
    load(qt_config)
    
    


  • @Abin
    Make your qmake.conf file to look like this:

    modifications to g++.conf

    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_NM = arm-linux-gnueabihf-nm -P
    QMAKE_STRIP = arm-linux-gnueabihf-strip
    load(qt_config)

    Try to goes through these steps for your RPi


Log in to reply
 

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