Failure to read QMAKESPEC conf file /qws/linux-arm-g++/qmake.conf.



  • Hello everyone

    I'm new to qt embedded, and I got a problem when I use Qt Creator to cross compile my beaglebone black.

    Host PC:
    albert@YL-Probook:~$ uname -a
    Linux YL-Probook 3.8.0-35-generic #50~precise1-Ubuntu SMP Wed Dec 4 17:25:51 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

    Qt Creator 3.0.0
    Based on Qt 5.2.0 (GCC 4.6.1, 64 bit)

    Built on Dec 10 2013 at 11:45:55

    From revision 27d10d8dcd

    Copyright 2008-2013 Digia Plc. All rights reserved.

    target:

    ubuntu@arm:~$ uname -a
    Linux arm 3.8.13-bone32 #1 SMP Fri Dec 13 20:05:25 UTC 2013 armv71 armv71 armv71 GNU/Linux

    First, I built the qt source. I followed the following steps:

    1. sudo apt-get install arm-linux-gnueabihf-gcc arm-linux-gnueabihf-g++
    2. Download qt-everywher-opensource-src-4.8.5.tar.gz and extract this to /home/albert/ToolChain
    3. Modify qmake.conf in /home/albert/ToolChain/qt-everywher-opensource-src-4.8.5/mkspecs/qws/linux-arm-g++,

    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

    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)

    1. Return to /home/albert/ToolChain/qt-everywher-opensource-src-4.8.5
    2. ./configure -prefix /home/albert/ToolChain/qt-arm -embedded arm -host-little-endian -no-cups -no-pch -no-3dnow -nomake examples -nomake demos -nomake docs -xplatform /qws/linux-arm-g++
    3. make
    4. make install
    5. Configure environment variables:
      export ARMQTDIR=/home/albert/ToolChain/qt-arm
      export PATH=$ARMQTDIR/bin:$PATH
      export MANPATH=$ARMQTDIR/man:$MANPATH
      export LD_LIBRARY_PATH=$ARMQTDIR/lib:$LD_LIBRARY_PATH
      export QMAKESPEC=/home/albert/ToolChain/qt-arm/mkspecs/qws/linux-arm-g++

    Until now, there is no error. Also, I tested qmake -v and which qmake, they all can output correct results.

    Now, I configured the qt creator.

    1. Adding version: Qt version 4.8.5 for Embedded Linux
    2. Adding compiler: /usr/bin/arm-linux-gnueabihf-gcc
    3. Adding debugger: /usr/bin/gdb
    4. Adding Kits

    Until now, there is also no error.

    Then, I create a widget project and choose this cross compiler. I didn't modify any code at all and I tried to build this project, it shows the following error:

    22:37:22: Running steps for project analogclock...
    22:37:22: Starting: "/home/albert/ToolChain/qt-arm/bin/qmake" /home/albert/Qt5.2.0/5.2.0/gcc_64/examples/gui/analogclock/analogclock.pro -r -spec /qws/linux-arm-g++ CONFIG+=declarative_debug
    Failure to read QMAKESPEC conf file /qws/linux-arm-g++/qmake.conf.
    Error processing project file: /home/albert/Qt5.2.0/5.2.0/gcc_64/examples/gui/analogclock/analogclock.pro
    22:37:22: The process "/home/albert/ToolChain/qt-arm/bin/qmake" exited with code 3.
    Error while building/deploying project analogclock (kit: arm-linux-gnueabihf)
    When executing step 'qmake'
    22:37:22: Elapsed time: 00:00.

    I also realized that when I use cross compiler, there is something strange happened to the project navigation window. Only project name shows in the window, all the source files, include files and config files are missing.

    I checked the QMAKESPEC in terminal, it shows
    albert@YL-Probook:~$ echo $QMAKESPEC
    /home/albert/ToolChain/qt-arm/qws/linux-arm-g++

    So, the QMAKESPEC is actually there and the qmake.conf file also exists. I can't understand why this error keep showing. Can anyone help me? Thanks.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You should rather compile the examples from your 4.8.5 sources. Qt 5 sources doesn't have exactly the same layout as Qt 4 and also doesn't have the qws mkspecs anymore. It uses new mechanisms not known by Qt 4's qmake to set things up so qmake will be lost here.


Log in to reply
 

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