PDA

View Full Version : Qt 4.3.3 - Server build without QtGui?



Mike
12th February 2008, 15:35
Hi,

I was wondering how I can tell the Qt configure script to exclude the QtGui module from the build process. I try to build Qt 4.3.3. on a server without X11 on it. The build does fail because of missing X11 header files, which I do not want to install on my server.

So far I have not been able to find a configure switch that would allow me to build Qt without QtGui... can anyone help?

Regards,
Michael

jpn
12th February 2008, 17:07
As you have noticed, QtCore and QtGui are enabled by default. This means that the QT variable contains "core" and "gui" by default. So remove "gui" in a way or other:


QT = core # take core alone in use, removes everything else



QT -= gui # remove gui from whatever modules there are enabled



QT = core network # take core and network in use

marcel
12th February 2008, 17:22
jpn, I believe he's trying to compile Qt on a computer that does not have x11. I don't think you can get it past the configure phase in this situation. There's no configure option to tell it not to build the GUI. I don't think anyone has ever needed it like this.

Maybe you tweak the configure script to skip all x11 related tests and then take the GUI module out of the makefile?

Mike
12th February 2008, 17:33
I believe he's trying to compile Qt on a computer that does not have x11. I don't think you can get it past the configure phase in this situation.
You are right. That's what I try to do. And I haven't found any:

./configure -no-qtgui switch or something like that.

jpn
12th February 2008, 17:40
Oops, sorry. After configuring, try:


make -C src sub-corelib

marcel
12th February 2008, 17:49
Oops, sorry. After configuring, try:


make -C src sub-corelib

That must work... But he first needs to modify configure to skip all X11 related tests.

bender86
12th February 2008, 19:41
I did it modifying the .pro files in qt source directory.
I added SUBDIRS -= gui to $QTDIR/src/src.pro, SUBDIRS -= iconengines imageformats inputmethod styles to $QTDIR/src/plugins/plugins.pro, and some more in $QTDIR/tools directory (for example SUBDIRS -= assistant designer linguist to tools.pro).

Then configure as usual, and make.
If you get errors, you should only find out what subdir needs to be excluded by compilation.

This way I got Qt working with network, sql, xml modules.

jpn
12th February 2008, 19:49
That must work... But he first needs to modify configure to skip all X11 related tests.
Does he? Doesn't configure look for X extensions? As far as I remember they're not mandatory. And there are a bunch of -no-xthis and -no-xthat switches too...