[Solved] "qmake does not specify a valid Qt installation"
-
Hi
I have a manually compiled and installed version of Qt 4.5.3 (has to be this version due to other constraints) in my home directory, and I'm trying to compile my project in Qt Creator (1.3.1) using that Qt version. If I set the environment variables accordingly and then run qtcreator, I get the following error message under Tools/Options/Qt Versions:
@ /home/schmidjo/qt/4.5.3/bin/qmake does not specify a valid Qt installation @
And on the command line I see the following error:
@Could not create ToolChain for ""
Qt Creator doesn't know about the system includes, nor the systems defines. @If I run qmake from the command line in the same environment, everything works fine. Does anyone have an idea how to fix this problem?
Some more stats:
OS: Ubuntu 10.04
Environment:
@export PATH=/home/schmidjo/qt/4.5.3/bin:$PATH
export QTDIR=/home/schmidjo/qt/4.5.3@ -
You should do this:
in qt source directory:
@
./configure (some option) --prefix=(your desired installation path)
make
make install
@now you have qt installed in the path you put in --prefix option.
In Qt-Creator:
tool --> option --> Qt4 --> "+"
Now choose a version name and navigate to your new qmake path.
This works for me...
-
Creator basically runs @qmake -query@. Can you please verify that the output of that is correct for your installation of Qt?
Out of curiosity: Which mkspec file is used by default in your Qt version?
-
Thanks for your answers!
Luca, that's basically how I did it.
Tobias, here's the output of "qmake -query":
@QT_INSTALL_PREFIX:/home/schmidjo/qt/4.5.3
QT_INSTALL_DATA:/home/schmidjo/qt/4.5.3
QT_INSTALL_DOCS:/home/schmidjo/qt/4.5.3/doc
QT_INSTALL_HEADERS:/home/schmidjo/qt/4.5.3/include
QT_INSTALL_LIBS:/home/schmidjo/qt/4.5.3/lib
QT_INSTALL_BINS:/home/schmidjo/qt/4.5.3/bin
QT_INSTALL_PLUGINS:/home/schmidjo/qt/4.5.3/plugins
QT_INSTALL_TRANSLATIONS:/home/schmidjo/qt/4.5.3/translations
QT_INSTALL_CONFIGURATION:/etc/xdg
QT_INSTALL_EXAMPLES:/home/schmidjo/qt/4.5.3/examples
QT_INSTALL_DEMOS:/home/schmidjo/qt/4.5.3/demos
QMAKE_MKSPECS:/home/schmidjo/qt/4.5.3/mkspecs
QMAKE_VERSION:2.01a
QT_VERSION:4.5.3@
That looks correctly. I'm not sure about how to determine the default mkspec. But I diffed mkspec/linux-g++-64/qmake.conf (which is what I would expect) against mkspec/default/qmake.conf, and they match.There's one more peculiarity about the problematic Qt installation: it's compiled with a different version of gcc (4.1) than the system default (4.4).
-
I've found the problem. Qt Creator seems to expect the default mkspec to be a symlink to the actual mkspec directory (see qtversionmanager.cpp lines 1041-1044 in version 1.3.1). In my installation this wasn't the case, it was a copy instead. I wonder whether this is a bug in the installation script, in Qt Creator, or both.
Anyway, easy fix is to symlink the default mkspec.
-
I have 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.2The 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.
-
a) Please do not post in reply to articles that are old.
b) Please use a up to date Qt Creator. This one is severly outdated.I'll close this topic now.