Building Qt on a clean Kubuntu
I have to admit it - I always build my own Qt. Because of customers sticking to older versions and myself wanting to have the latest, I currently have 4 flavors of Qt and 3 of QtopiaCore sitting on my laptop.
As I recently invested in a new computer I felt that I had to build Qt + Qtopia on it. The computer was installed with a clean Kubuntu from the start. The problem is that Qt requires some packages to build and finding those packages is (at least for me) a tedious iterative process (make - look what failed - apt-get install it - repeat). So, without further ado, here is a list of packages that you need to get 4.3.4 X11 to build properly:
- build-essential
- libx11-dev
- libxext-dev
Sidenote: I guess Qt 4.4 requires some gstreamer goodies as well, I'll tell you when I get there.
Labels: Qt
9 Comments:
> "and finding those packages is ... a tedious iterative process (make - look what failed - apt-get install it - repeat)"
usually
apt-get build-dep libqt3-mt libqtgui4
should do that on debian-based systems
If the slackware packages are anything to go by, then the gstreamer packages you need are:
gstreamer
gst-plugins-base
Other plugins are usefull but not required for QT.
However - there is an oddness there because the slackware build suggestions specify building QT before building gstreamer... I wonder if it's not the other way around. GST can work well with QT but only if you build it on a QT powered system. Presumably with debian packages, that isn't an issue then. But other KDE stuff like phonon DO require GST so it's good to get it anyway.
I have gone through the pains of getting QT to build on a clean platform recently, I gave up after 4 days of struggling and opted for a different platform that was already QT capable but if what I learned is helpful to somebody then it's worth it.
what about apt-get build-dep libqt4-dev or similar depending on the Qt version you build ?
apt-get build-dep looks like a charm. Did not know about that earlier.
Nice to know that gstreamer and gst-plugin-base are the ones needed. Don't I need some sort of -dev package as well?
Johan, I'm sure your laptop is multicore so you can call make -jX where X is the number of cores/processors available and have a shorter coffee break.
You can even use solutions for distributed compilation (distcc or teambuilder) and have your package built much faster as I'm sure you have more than one machine in your beautiful house :)
Actually, I did a -j4... just didn't want to brag about it :-)
An overview of the dependencies on X11 can be found here:
http://doc.trolltech.com/4.4/requirements-x11.html
Of course, you'll need the development packages of these to build Qt from source. :-)
Also, try auto-apt, it is a really nice tool that takes away _some_ of the tediousness. You can do, for instance:
$ auto-apt run ./configure
See section 6.4.13 Automatically install command, here: http://www.debian.org/doc/manuals/reference/ch-package.en.html
Actually, I did a -j4... just didn't want to brag about it :-)
And you should have because many people are not aware of the -j switch.
Post a Comment
<< Home