ROOT and QT4

Dear all,
I have a problem installing ROOT with qt enabled on a debian box:

qt4 headers are in
/usr/include/qt4
(I have used only prebuilt debian packages)

so I type:
./configure --enable-qt --with-qt-incdir=/usr/include/qt4

it says:

Configuring for linux
Checking for libX11 ... /usr/lib
Checking for X11/Xlib.h ... /usr/include
Checking for X11/Xft/Xft.h ... /usr/include
Checking for libXpm ... /usr/lib
Checking for libXft ... /usr/lib
Checking whether to build included libfreetype6 ... yes
Checking whether to build included libpcre ... yes
Checking whether to build included zlib ... yes
Checking for GL/gl.h ... /usr/include
Checking for libGL, or libMesaGL ... /usr/lib
Checking for libGLU, or libMesaGLU ... /usr/lib
Checking for mysql_config ... not found
Checking for mysql.h ... no
Checking for libmysqlclient_r, libmysqlclient, or mysqlclient ... no
Checking for occi.h ... no
Checking for libclntsh, or oci ... no
Checking for libocci, or oraocci10 ... no
Checking for libpq-fe.h ... /usr/include/postgresql
Checking for libpq ... /usr/lib
Checking for sql.h ... no
Checking for libsqlod ... no
Checking for sqlext.h ... no
Checking for libiodbc, libodbc, or odbc32 ... no
Checking for qt.h ... no
No Qt3 was found, let's try to find Qt4 instead
Checking for Qt/qglobal.h ... no
Checking for libqt-mt, libqt, qt-mt*, qt-mt334, qt-mt335, qt-mt336, or qt ... /usr/lib
Checking for moc or moc.exe ... /usr/bin/moc

.........many more......

Enabled support for asimage, astiff, builtin_afterimage, builtin_freetype, builtin_pcre, builtin_zlib, cintex, exceptions, fftw3, krb5, mathcore, mathmore, opengl, pch, pgsql, python, reflex, shadowpw, shared, ssl, xft, xml, xrootd.

To build ROOT type:

   make

so it doesn’t find qt4. If I type:

ls -l /usr/include/qt4/Qt/qglobal.h
-rw-r--r-- 1 root root 64255 Oct  7 17:27 /usr/include/qt4/Qt/qglobal.h

and

ls -l /usr/include/qt4/
total 88
drwxr-xr-x 2 root root 12288 Oct 22 10:51 Qt
drwxr-xr-x 2 root root  8192 Oct 22 10:51 Qt3Support
drwxr-xr-x 2 root root  4096 Oct 22 10:51 QtAssistant
drwxr-xr-x 2 root root  8192 Oct 22 10:51 QtCore
drwxr-xr-x 2 root root  4096 Oct 22 10:51 QtDBus
drwxr-xr-x 2 root root  4096 Oct 22 10:51 QtDesigner
drwxr-xr-x 2 root root 16384 Oct 22 10:51 QtGui
drwxr-xr-x 2 root root  4096 Oct 22 10:51 QtNetwork
drwxr-xr-x 2 root root  4096 Oct 22 10:51 QtOpenGL
drwxr-xr-x 2 root root  4096 Oct 22 10:51 QtScript
drwxr-xr-x 2 root root  4096 Oct 22 10:51 QtSql
drwxr-xr-x 2 root root  4096 Oct 22 10:51 QtSvg
drwxr-xr-x 2 root root  4096 Oct 22 10:51 QtTest
drwxr-xr-x 2 root root  4096 Oct 22 10:51 QtUiTools
drwxr-xr-x 2 root root  4096 Oct 22 10:51 QtXml

Do you have any clue? Valery says that maybe it could be a bug in the “configure” script that does not respect the --with-qt-incdir=/usr/include/qt4 option properly

PS: on this machine I have headers and libraries for both QT3 and 4, I hope that is not THE problem :unamused: :unamused: :unamused:

Thanks!!!
Luigi

Hello Luigi,

[quote=“luigi”]Dear all,
I have a problem installing ROOT with qt enabled on a debian box:
. . .
qt4 headers are in
/usr/include/qt4
(I have used only prebuilt debian packages)

so I type:
./configure --enable-qt --with-qt-incdir=/usr/include/qt4

it says:

Configuring for linux Checking for qt.h ... no No Qt3 was found, let's try to find Qt4 instead Checking for Qt/qglobal.h ... no Checking for libqt-mt, libqt, qt-mt*, qt-mt334, qt-mt335, qt-mt336, or qt ... /usr/lib Checking for moc or moc.exe ... /usr/bin/moc
[/quote]Thank you very much for your report. I have lack of experience dealing with the pre-configured version of Qt4 on Unix platforms. One certainly missed the debian case. What you found is the problem with ROOT “configure” that ignores the parameter

to find the Qt4 header files. I’ll see how to fix it and let you know.

Mean time you can install the QtRoot using the Qt4 tools rather the ROOT “configure”.
To do that:

  1. install ROOT with no Qt option
  2. define QTROOTSYSDIR=$ROOTSYS env variable.

cd $ROOTSYS/qt qmake [CONFIG+=debug]; make make install 4.

cd $ROOTSYS/qtroot qmake [CONFIG+=debug]; make make install

Hello.

The attached patch (done against of “trunk”) should fix this issue.
In addition it allows to build Qt layer against of the “debug” version of Qt4 on Win32 platform.

Please check.
configure.diff.txt (2.82 KB)

The SVN trunk includes this patch.

Rene

Dear developers,
I had the same problem with new release root 5.34.
Your patch doesn’t suit to configure file.
My solution was

3228 qttestdir=/usr/include/qt4/Qt

Might be it will be useful for somebody.