I am trying to build QT libraries 4.8.2 on Ubuntu Linux by following the instruction mentioned in the documentation .
This is the second time I am trying building... I tried earlier also and when build process did not complete even after 12-13 hrs I thought something is wrong so I started from beginning.
It's been almost 24 hrs I issued make command (In the second attempt) the build process is still going on. Terminal is not showing any error either.
Does building QT libraries on Ubuntu Linux really takes this much time or I have missed something.
The library files are usually in /usr/include/qt4 . The qmake is in /usr/bin/qmake-qt4 (or /usr/bin/qt4-qmake , I forget). You may have to symbolic link /usr/bin/qmake to either of these. Perhaps your application expected the files to be in /usr/local/include... and /usr/local/bin...
"As well as using Qt to underpin Ubuntu's display framework, Qt is an integral part of Ubuntu's offering for developers who create mobile and desktop applications for Ubuntu devices.
Building Qt takes a couple of hours even on a fast system if you only do the default non-parallel build. By default it also pulls in lots of libraries that you may not need.
So the first thing to try is make -j
to do parallel builds. If that is still taking too long then try to slim down the libraries Qt generates. Do you need QtWebKit for instance? If you plan on using an embedded web browser in your application then you'll want it. If not then you can halve the time of your build. Type configure --help
to see the options. Some useful ones that can reduce the build time are:
NOTE: some of the following options are no longer applicable in Qt5
If you're having to pay for the time in this Amazon instance then another option is to create a local Ubuntu machine (on a spare machine or in a virtual machine) and tweak the options there until you get something that works, then use that build configuration on your Amazon instance.
EDIT:
In Qt5, the project changed to use git submodules, so if you are building from a git checkout then the default behaviour is to clone all the submodules, which will add substantially to your build times if there are modules you don't need. There is a script init-repository
that is part of the qt5 repository. You can use that to trim your local repository to only contain the submodules you need. So for instance:
git clone https://git.gitorious.org/qt/qt5.git
cd qt5
./init-repository --module-subset="qtbase qtdeclarative qtquick1"
configure --your-options-here
make -j
On my machine I can do a basic build of qtbase in about 10 minutes
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With