Details
-
Bug
-
Resolution: Won't Do
-
P2: Important
-
None
-
5.13.2, 5.14.1
-
None
-
Debian testing
gcc version 9.2.1 20200224 (Debian 9.2.1-30)
Description
When building qt from source I get following error:
dwojt@debian:~/local/qt5$ ~/sources/external/qt5/configure -developer-build -opensource -confirm-license -nomake examples -nomake tests (...) dwojt@debian:~/local/qt5$ make In file included from /usr/include/c++/9/memory:67, from .moc/moc_qabstractgallery.cpp:9, from /home/dwojt/sources/external/qt5/qtdocgallery/src/gallery/qabstractgallery.cpp:125: /usr/include/c++/9/bits/stl_raw_storage_iter.h:69:22: error: expected template-name before '<' token 69 | : public iterator<output_iterator_tag, void, void, void, void> | ^
When investigating contents of qabstractgallery.cpp, I found that "moc_qabstractgallery.cpp" is included from within QT_{BEGIN|END}_NAMESPACE_DOCGALLERY .
Then moc_qabstractgallery.cpp includes "<memory>". Effectively "<memory>" gets included from namespace "QDocGallery".
Adding "#include <memory>" before QT_BEGIN_NAMESPACE_DOCGALLERY allows compilation of this file to succeed, which confirms my diagnosis.
Please prevent system includes from being included from inside a namespace.
Attachments
Issue Links
- relates to
-
QTBUG-89664 qtdocgallery fails to build from source, incorrect placement of #includes
- Closed