[Development] Problem comiling with option -qtnamespace and -qtlibinfix in Mac OS X 10.9.4

Hauke Krüger krueger at ind.rwth-aachen.de
Tue Jul 8 07:12:37 CEST 2014


Hi everyone,

I have problems compiling Qt-5.3.1 from the sources in Mac OS X 10.9.4 
when specifying the option -qtnamespace and -qtlibinfix.
For me, the option -qtlibinfix is not really required but -qtnamespace 
is a must (I got this valuable hint a few days ago..).

So here is what happens:
1) Option with unspecified namespace: Running configure without 
-qtnamespace:
-> In the terminal, running "./configure" -> "make" in the directory 
qt-everywhere-opensource-src-5.3.1/qtbase works fine.
If I take a look at the Makefile.Debug in src/network, I see the 
following include path:
-I../../mkspecs/macx-clang -I. -I../../include -I../../include/QtNetwork 
-I../../include/QtNetwork/5.3.1 
-I../../include/QtNetwork/5.3.1/QtNetwork -Ikernel -I../../lib/QtC\
ore.framework/Versions/5/Headers 
-I../../lib/QtCore.framework/Versions/5/Headers/5.3.1 
-I../../lib/QtCore.framework/Versions/5/Headers/5.3.1/QtCore 
-I.moc/debug 
-F/Users/user/Desktop/qt-everywhere-opensource-src-5.3.1/qtbase/lib
So far NO problem.

2) Option with specified Option -qtnamespace
-> In the terminal, running "./configure -qtnamespace rtproc" -> "make" 
in the directory qt-everywhere-opensource-src-5.3.1/qtbase does not work:
During the compilation of e.g. src/network, I see the following compiler 
error:

../corelib/global/qt_pch.h:58:10: error: 'qglobal.h' file not found with 
<angled> include; use "quotes" instead
#include <qglobal.h>
          ^~~~~~~~~~~
          "qglobal.h"
../corelib/global/qt_pch.h:64:10: fatal error: 'qcoreapplication.h' file 
not found
#include <qcoreapplication.h>
          ^
2 errors generated.

So, in order to find the difference, here is the include path 
specification in Makefile.Debug in src/network in the second case:

-I../../mkspecs/macx-clang -I. -I../../include -I../../include/QtNetwork 
-I../../include/QtNetwork/5.3.1 -I../../include/QtNetwork/\
5.3.1/QtNetwork -Ikernel 
-I/Users/krueger/work/develop/qt/qt-everywhere-opensource-src-5.3.1/qtbase/lib/QtCore.framework/Headers/5.3.1 
-I/Users/krueger/work/develop/qt/qt\
-everywhere-opensource-src-5.3.1/qtbase/lib/QtCore.framework/Headers/5.3.1/QtCore 
-I.moc/debug 
-F/Users/user/Desktop/qt-everywhere-opensource-src-5.3.1/qtbase/\
lib

The main difference: Instead of
"-I../../lib/QtCore.framework/Versions/5/Headers/5.3.1/QtCore",
the include path is set to
"......./lib/QtCore.framework/Headers/5.3.1/QtCore"
where the headers are not located.

I can modify the Makefile.Debug such that it compiles by adding the path 
from 1) but there are so many projects, it would take
really long. It would be better to do it properly right from the beginning..

Since I do not understand in detail how configure produces the settings 
in the Makefiles in the sub directories, could anyone comment
n this such that I can fix the include path for my installation?

As I mentioned also in the beginning, the option -qtlibinfix rtp does 
not work either. In that case, the compilation
fails right at the beginning in src/qlalr. The problem with -qtlibinfix 
is that the #include statements in specific projects is
not compatible with frameworks, e.g. #include <QtCore/qvector.h> does no 
longer work if - due to the -qtlibinfix option -
the framework is denoted as QtCorertp (rather than QtCore).

Thanky for any help.

Best regards

Hauke





More information about the Development mailing list