PDA

View Full Version : QtCreator from Git will not build



KaptainKarl
18th July 2014, 14:17
Qt Version: 5.3.1
OS: CentOS 6.4
Qt Creator Version: 3.1

Downloaded from git and attempted to install using these commands:


git clone --recursive https://git.gitorious.org/qt-creator/qt-creator.git
mkdir qt-creator-build
cd qt-creator-build
export QTDIR=/Qt/5.3.1_shared
export PATH=$QTDIR/bin:$PATH
which qmake
/Qt/5.3.1_shared/bin/qmake

qmake -v
QMake version 3.0
Using Qt version 5.3.1 in /Qt/5.3.1_shared/lib

qmake -r ../qt-creator/qtcreater.pro
... Lots of stuff scrolls by and then:
Project ERROR: Unknown module(s) in QT: quick
How do I get past this?

Qt was also downloaded and installed from git. Here is the configure call I used:

./configure -prefix “/Qt/5.3.1_shared -shared -spec linux-g++-64 -opensource -confirm-license -I/usr/include/mysql -L/usr/lib64/mysql -qt-sql-mysql

Thanks!
Karl

wysota
20th July 2014, 14:47
Did your build compile QtQuick? Do you have appropriate libraries in /Qt/5.3.1_shared/lib?

KaptainKarl
24th July 2014, 15:42
With assistance from the support group at Digia, I was able to solve this issue.
What was missing was OpenGL support.

For the sake of posterity, here is the procedure I followed to successfully install Qt 5.3.1 and Qt Creator 3.2.1 on CentOS 6.4 64-bit with MySQL support:

Please note: This entire process can take a couple of days to complete:

1. Install CentOS 6.4 Basic Server + mysql and web server support.
2. yum update
There will be hundreds of updates so this may take a several minutes (15 to 20 minutes).
Last time I did this, it installed 382 updates.
3. Install dependences for Qt:
as root:


yum install libxcb libxcb-devel xcb-util xcb-util-devel
yum install flex bison gperf libicu-devel libxslt-devel ruby
yum install git
yum install gcc-c++
yum install mysql-devel
yum install libX11-devel
yum install libXrender-devel
yum install libusb-devel
yum install mesa-libGL-devel

4. Install devtools

wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo -P /etc/yum.repos.d
sh -c 'echo "enabled=1" >> /etc/yum.repos.d/devtools-1.1.repo'
yum install devtoolset-1.1

5. Download latest Qt from Git:


git clone git://gitorious.org/qt/qt5.git qt5
cd qt5
git checkout stable
perl init-repository
This will take 30 to 45 minutes.

6. Set the environment

By default, CentOS will set the following environmental variables:
QTDIR=/usr/lib64/qt-3.3
QTINC=/usr/lib64/qt-3.3/include
QT_IM_MODULE=xim
QTLIB=/usr/lib64/qt-3.3/lib

These must be unset before proceeding.


env | grep QT
QTDIR=/usr/lib64/qt-3.3
QTINC=/usr/lib64/qt-3.3/include
QT_IM_MODULE=xim
QTLIB=/usr/lib64/qt-3.3/lib

unset QTDIR
unset QTINC
unset QT_IM_MODULE
unset QTLIB
env | grep QT

Now set the environment to use dev tools

scl enable devtoolset-1.1 bash

7. Configure, build, and install shared version of Qt


cd qt5
./configure -prefix /Qt/5.3.1_shared -shared -platform linux-g++-64 -opensource -confirm-license -debug-and-release -I/usr/include/mysql -L/usr/lib64/mysql -qt-sql-mysql
Takes 15 - 30 minutes.
make
If installing on a multi-core virtual machine, type make -j# where # is the number of cores.
Takes 4 to 8 hours. Sometimes best to let it run over night.

As root from $HOME/qt5:

make install
Takes 20 minutes to an hour.

make install docs
Takes 20 minutes to an hour.

8. Download QtCreator from git

From $HOME as development user:


git clone --recursive https://git.gitorious.org/qt-creator/qt-creator.git

9. Set the build directory


mkdir qt-creator-build
cd qt-creator-build

10. Set the environment:

scl enable devtoolset-1.1 bash
export QTDIR=/Qt/5.3.1_shared
export PATH=$QTDIR/bin:$PATH
which qmake
/Qt/5.3.1_shared/bin/qmake

qmake -v
QMake version 3.0
Using Qt version 5.3.1 in /Qt/5.3.1_shared/lib

11. Build Qt Creator

qmake -r ../qt-creator/qtcreator.pro
make

Takes 5 to 9 hours. Maybe another all nighter.

wysota
24th July 2014, 16:20
Sorry? Qt-Creator takes as much time to build as Qt itself? Even assuming you have a terribly slow machine (if Qt takes 8 hours to build), Qt Creator should build much faster. And if it does take 8 hours to build for you, I suggest building them on a different (faster) machine and then only deploy to this slow system.