Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-80578

moc failure when includes inside of enums in namespaces

    XMLWordPrintable

Details

    • Linux/X11, macOS, Windows
    • d8a2456fbf18f60e2d1950585d93aa530df077bf (qt/qtbase/dev) 98cb33115089eebccb3f0b7ed46397465a942855 (qt/qtbase/5.15)

    Description

      I'm using Qt 5.13 on macOS together with the MongoCXX driver for MongoDB.

       

      When testing the 5.14 pre-release, moc is not capable handling mongocxx include files.

      The build process stops with the following error:

      [...] }}{{/opt/qt/5.14/bin/moc -DQT_DEPRECATED_WARNINGS -DQT_CORE_LIB --include /home/pi/MongoMoc/build/moc_predefs.h -I/opt/qt/5.14/mkspecs/linux-g++ -I/home/pi/MongoMoc -I/opt/mongodb/driver/include/mongocxx/v_noabi -I/opt/mongodb/driver/include/bsoncxx/v_noabi -I/opt/mongodb/driver/include/libbson-1.0 -I/opt/mongodb/driver/include/libmongoc-1.0 -I/opt/qt/5.14/include -I/opt/qt/5.14/include/QtCore -I. -I/usr/include/c+/8 -I/usr/include/arm-linux-gnueabihf/c/8 -I/usr/include/c+/8/backward -I/usr/lib/gcc/arm-linux-gnueabihf/8/include -I/usr/local/include -I/usr/lib/gcc/arm-linux-gnueabihf/8/include-fixed -I/usr/include/arm-linux-gnueabihf -I/usr/include ../testobject.h -o moc_testobject.cpp
      opt/mongodb/driver-3.3/include/bsoncxx/v_noabi/bsoncxx/types.hp:39: Parse error at "{"[...]

      The very same code compiles fine with Qt 5.11.3 on Linux (Raspbian default install) and the Qt 5.13.x series on macOS.

      The aforementioned error appears with Qt 5.14-something on Raspbian as well as on macOS Catalina (with the corresponding Xcode).

      mongocxx is build from source (https://github.com/mongodb/mongo-cxx-driver.git) and compiled from branch releases/v3.3.

       

      I have attached a minimal (non-)compileable example to this report.

       

      Attachments

        1. MongoMoc.tar.bz2
          1 kB
        2. QTBUG-80578.zip
          0.6 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              fabiankosmale Fabian Kosmale
              jkellmer Jan Kellmer
              Votes:
              12 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes