Qt Creator Project Creation Errors



  • I am not sure if anyone was monitoring the [Solved] "qmake does not specify a valid Qt installation"
    thread so I have reposted here. I have read the solutions provided in the thread and am having a hard time trying to figure out how to apply them to my situation.

    I used apt-get to install QT Creator 1.3.1 (4.6.2) on my virtual Linux machine executing Ubuntu 10.04. No Qt source files remain on my system. So I cannot execute the .configure command. I have also installed the Sourcery codebench cross-compiler tools for ARM CORTEX A-8. I am getting the following two errors.

    *Could not create ToolChain for ""
    Qt Creator doesn't know about the system includes, nor the systems defines. *

    When i do the qmake -query command I get the following:
    QT_INSTALL_PREFIX:/usr
    QT_INSTALL_DATA:/usr/share/qt4
    QT_INSTALL_DOCS:/usr/share/qt4/doc
    QT_INSTALL_HEADERS:/usr/include/qt4
    QT_INSTALL_LIBS:/usr/lib
    QT_INSTALL_BINS:/usr/bin
    QT_INSTALL_PLUGINS:/usr/lib/qt4/plugins
    QT_INSTALL_TRANSLATIONS:/usr/share/qt4/translations
    QT_INSTALL_CONFIGURATION:/etc/xdg
    QT_INSTALL_EXAMPLES:/usr/lib/qt4/examples
    QT_INSTALL_DEMOS:/usr/lib/qt4/demos
    QMAKE_MKSPECS:/usr/share/qt4/mkspecs
    QMAKE_VERSION:2.01a
    QT_VERSION:4.6.2

    The CodeBench installation is located at /home/doug/CodeSourcery. The TI ARM SDK is located at /home/doug/ti-ezsdk_dm814x-evm_5_04_00_11 and contains a linux-devkit directory under which has a enviroment-setup file. The contents of this file is as follows:

    SDK_PATH=/home/doug/ti-ezsdk_dm814x-evm_5_04_00_11/linux-devkit
    if [ -z "$ZSH_NAME" ] && [ "x$0" = "x./environment-setup" ]; then
    echo "Error: This script needs to be sourced. Please run as ". ./environment-setup""
    exit 1
    else
    if [ -n "$BASH_SOURCE" ]; then
    SDK_PATH=/home/doug/ti-ezsdk_dm814x-evm_5_04_00_11/linux-devkit
    fi
    SDK_PATH=/home/doug/ti-ezsdk_dm814x-evm_5_04_00_11/linux-devkit
    export SDK_PATH
    fi
    export TOOLCHAIN_PATH=/home/doug/CodeSourcery/Sourcery_G++_Lite/
    export TARGET_SYS=arm-none-linux-gnueabi
    export CC=arm-none-linux-gnueabi-gcc
    export CPP="arm-none-linux-gnueabi-gcc -E"
    export NM=arm-none-linux-gnueabi-nm
    export RANLIB=arm-none-linux-gnueabi-ranlib
    export OBJCOPY=arm-none-linux-gnueabi-objcopy
    export STRIP=arm-none-linux-gnueabi-strip
    export AS=arm-none-linux-gnueabi-as
    export AR=arm-none-linux-gnueabi-ar
    export OBJDUMP=arm-none-linux-gnueabi-objdump
    export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
    export PATH=$SDK_PATH/bin:$TOOLCHAIN_PATH/bin:$PATH
    export CPATH=$SDK_PATH/$TARGET_SYS/usr/include:$CPATH
    export LIBTOOL_SYSROOT_PATH=$SDK_PATH/$TARGET_SYS
    export PKG_CONFIG_SYSROOT_DIR=$SDK_PATH/$TARGET_SYS
    export PKG_CONFIG_PATH=$SDK_PATH/$TARGET_SYS/usr/lib/pkgconfig
    export CONFIG_SITE=$SDK_PATH/site-config
    alias opkg="LD_LIBRARY_PATH=$SDK_PATH/lib $SDK_PATH/bin/opkg-cl -f $SDK_PATH/etc/opkg-sdk.conf -o $SDK_PATH"
    alias opkg-target="LD_LIBRARY_PATH=$SDK_PATH/lib $SDK_PATH/bin/opkg-cl -f $SDK_PATH/$TARGET_SYS/etc/opkg.conf -o $SDK_PATH/$TARGET_SYS"
    export CC=arm-none-linux-gnueabi-gcc
    export CPP="arm-none-linux-gnueabi-gcc -E"
    export NM=arm-none-linux-gnueabi-nm
    export RANLIB=arm-none-linux-gnueabi-ranlib
    export OBJCOPY=arm-none-linux-gnueabi-objcopy
    export STRIP=arm-none-linux-gnueabi-strip
    export AS=arm-none-linux-gnueabi-as
    export AR=arm-none-linux-gnueabi-ar
    export OBJDUMP=arm-none-linux-gnueabi-objdump
    export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
    export OE_QMAKE_CC=${TARGET_SYS}-gcc
    export OE_QMAKE_CXX=${TARGET_SYS}-g++
    export OE_QMAKE_LINK=${TARGET_SYS}-g++
    export OE_QMAKE_AR=${TARGET_SYS}-ar
    export OE_QMAKE_LIBDIR_QT=${SDK_PATH}/${TARGET_SYS}/usr/lib
    export OE_QMAKE_INCDIR_QT=${SDK_PATH}/${TARGET_SYS}/usr/include/qtopia
    export OE_QMAKE_MOC=${SDK_PATH}/bin/moc4
    export OE_QMAKE_UIC=${SDK_PATH}/bin/uic4
    export OE_QMAKE_UIC3=${SDK_PATH}/bin/uic34
    export OE_QMAKE_RCC=${SDK_PATH}/bin/rcc4
    export OE_QMAKE_QDBUSCPP2XML=${SDK_PATH}/bin/qdbuscpp2xml4
    export OE_QMAKE_QDBUSXML2CPP=${SDK_PATH}/bin/qdbusxml2cpp4
    export OE_QMAKE_QT_CONFIG=${SDK_PATH}/${TARGET_SYS}/usr/share/qtopia/mkspecs/qconfig.pri
    export QMAKESPEC=${SDK_PATH}/${TARGET_SYS}/usr/share/qtopia/mkspecs/linux-g++
    export OE_QMAKE_LDFLAGS="-L${SDK_PATH}/${TARGET_SYS}/usr/lib -Wl,-rpath-link,${SDK_PATH}/${TARGET_SYS}/usr/lib -Wl,-O1 -Wl,--hash-style=gnu"
    export OE_QMAKE_STRIP="echo"
    export PS1="[\e[32;1m][linux-devkit][\e[0m]:\w> "

    I am currently at a loss as to how to configure Qt creator to provide a cross-compiler target for the TI ARM. Any assistance would be greatly appreciated.


  • Moderators

    You need to compile Qt libs with your ARM tool chain. As you noticed you need the "source which can be found in the archive":http://download.qt-project.org/archive/qt/ for virtually any Qt version (some of the very early V1 are missing).



  • Thanks for you quick response. I apologize in advance for my ignorance but I am new to Qt and am still a vague on the details on what exactly needs to be re-compiled.

    I installed QtCreator and Qt SDK using apt-get. It appears that packages QtCreator, QtSDK, libqt4-dev, libqt4-core, libqt4-gui, libqt4-xml, and libqt4-opengl have been installed.

    I followed the link to the Qt downloads to the 4.6 directory. The Ubuntu Qt version 1.3.1 is based on the Qt 4.6.2 build (2010). There are debug libs but I do not see any entries identified specifically as QT libraries.

    I can download the sources for ibqt4-dev, libqt4-core, libqt4-gui, libqt4-xml, and libqt4-opengl via apt-get. Are these the libraries you are referring to? Or have I totally missed the boat here?

    Any assistance you can provide will be greatly appreciated.


  • Moderators

    The archive contains both the source as required for your compiling and also some of the pre-build versions. The naming for the source archive are for instance "qt-everywhere-opensource-src-4.8.4.tar.gz":http://download.qt-project.org/archive/qt/4.8/4.8.4/qt-everywhere-opensource-src-4.8.4.tar.gz , which would be the source archive of version 4.8.4 and the tar.gz is for linux. There are also .zip files, but they are meant for windows systems. AFAIK, the main difference are the line endings. However, it is always recommended to use the proper file for the operation system.

    There are some guidelines in the wiki here for instance for compile for "an embedded platform on linux":http://qt-project.org/wiki/Building_Qt_for_Embedded_Linux which is what you are probably looking for. There are more different guideline in the wiki. You find those in the "howto section":http://qt-project.org/wiki/Category:HowTo

    The source coming with a pre-build should not be used for building Qt libs. They are known to create problems. Therefore, the best is always to start with the fresh source structure from an archive,.



  • Thanks once again for your quick response.

    I have downloaded the 4.8.4 tar file and extracted it. I followed the instructions from the link you provided. When I executed the configure command with the -embedded switch, it asked me for a license key.

    I am not quite sure what I need to do from here? Any assistance on this matter would be greatly appreciated.


  • Moderators

    The question for the key comes when you have selected "commercial license" before. Withe commercial license you get a key you have to enter there.

    If you like to use Qt libs under LGPL you have to select open source or add already "-opensource" in the configure command line.


  • Moderators

    Please update Qt Creator to something more recent. Latest released version of Qt Creator is 3.0 and we made so many improvements -- especially when it comes to working with cross-compilers!


Log in to reply
 

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