Qt 4.3.3 - Server build without QtGui?
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
Re: Qt 4.3.3 - Server build without QtGui?
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:
Code:
QT = core # take core alone in use, removes everything else
Code:
QT -= gui # remove gui from whatever modules there are enabled
Code:
QT = core network # take core and network in use
Re: Qt 4.3.3 - Server build without QtGui?
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?
Re: Qt 4.3.3 - Server build without QtGui?
Quote:
Originally Posted by
marcel
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.
Re: Qt 4.3.3 - Server build without QtGui?
Oops, sorry. After configuring, try:
Code:
make -C src sub-corelib
Re: Qt 4.3.3 - Server build without QtGui?
Quote:
Originally Posted by
jpn
Oops, sorry. After configuring, try:
Code:
make -C src sub-corelib
That must work... But he first needs to modify configure to skip all X11 related tests.
Re: Qt 4.3.3 - Server build without QtGui?
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.
Re: Qt 4.3.3 - Server build without QtGui?
Quote:
Originally Posted by
marcel
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...