Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.0.2
-
None
-
A generic 64 bit linux:
# uname -a
Linux baserock 3.2.0+ #1 SMP Wed Mar 27 13:49:26 UTC 2013 x86_64 GNU/Linux
# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-unknown-linux-gnu/4.6.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/usr --libdir=/usr/lib --disable-nls --enable-languages=c,c++ --enable-shared --enable-threads=posix --disable-multilib --disable-libgomp --without-cloog --without-ppl --enable-__cxa_atexit --with-mpfr-include=/gcc.build/o/../mpfr/src --with-mpfr-lib=/gcc.build/o/mpfr/src/.libs --with-system-zlib
Thread model: posix
gcc version 4.6.2 (GCC)A generic 64 bit linux: # uname -a Linux baserock 3.2.0+ #1 SMP Wed Mar 27 13:49:26 UTC 2013 x86_64 GNU/Linux # gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-unknown-linux-gnu/4.6.2/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../configure --prefix=/usr --libdir=/usr/lib --disable-nls --enable-languages=c,c++ --enable-shared --enable-threads=posix --disable-multilib --disable-libgomp --without-cloog --without-ppl --enable-__cxa_atexit --with-mpfr-include=/gcc.build/o/../mpfr/src --with-mpfr-lib=/gcc.build/o/mpfr/src/.libs --with-system-zlib Thread model: posix gcc version 4.6.2 (GCC)
Description
I built qtbase and installed it into /usr. Then I checked out qtsvg as a stand alone module (needed by the unusual build system I was using) and ran /usr/bin/qmake in it. When I compiled qtsvg I got an error from the moc:
/usr/bin/moc -DQT_NO_USING_NAMESPACE -DQT_BUILD_SVG_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/mkspecs/linux-g++-64 -I. -I../../include -I../../include/QtSvg -I../../include/QtSvg/5.0.2 -I../../include/QtSvg/5.0.2/QtSvg -I/usr/include/QtWidgets -I/usr/include/QtWidgets/5.0.2 -I/usr/include/QtWidgets/5.0.2/QtWidgets -I/usr/include/QtGui -I/usr/include/QtGui/5.0.2 -I/usr/include/QtGui/5.0.2/QtGui -I/usr/include/QtCore -I/usr/include/QtCore/5.0.2 -I/usr/include/QtCore/5.0.2/QtCore -I.moc/release-shared qgraphicssvgitem.h -o .moc/release-shared/moc_qgraphicssvgitem.cpp
qgraphicssvgitem.h:63: Error: Undefined interface
make[2]: *** [.moc/release-shared/moc_qgraphicssvgitem.cpp] Error 1
make[2]: Leaving directory `/qtsvg.build/src/svg'
make[1]: *** [sub-svg-make_first-ordered] Error 2
make[1]: Leaving directory `/qtsvg.build/src'
make: *** [sub-src-make_first] Error 2
There is no '-I/usr/include' path in the moc command and so this include isn't found by the moc:
#include <QtWidgets/qgraphicsitem.h>
Which means this macro in qgraphicsitem.h isn't found, and hence the moc error about an undefined interface:
Q_DECLARE_INTERFACE(QGraphicsItem, "org.qt-project.Qt.QGraphicsItem")
The include paths in the qmake generated Makefiles work fine with the c++ compiler as it looks in /usr/include by default, whereas the moc doesn't.
Attachments
Issue Links
- is replaced by
-
QTBUG-28870 qmake does not pass the default include dirs to moc
-
- Closed
-