Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2288

qcalendar_wrapper.cpp:502:34: error: expected unqualified-id before '(' token with llvm 16

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.5.1, 6.6.0
    • 6.5.0
    • Other
    • None
    • All
    • e20e1ea0f (dev), 87921e5a6 (dev), cf2cdc876 (6.5), 3f1318522 (6.5), 1262c2913 (tqtc/lts-6.2), 9b07c2840 (tqtc/lts-6.2), 4bfd382c0 (tqtc/lts-5.15), d5bbbbf4a (tqtc/lts-5.15), a08e2b060 (dev), 9b87468d3 (6.5), e22f71715 (dev), ab8a34060 (dev)

    Description

      on linux (and windows), with latest 6.5.0 version I'm seeing this error:

       

      2023-04-07T07:57:20.0111325Z FAILED: PySide6/QtCore/CMakeFiles/QtCore.dir/PySide6/QtCore/qcalendar_wrapper.cpp.o 2023-04-07T07:57:20.0118999Z $BUILD_PREFIX/bin/x86_64-conda-linux-gnu-c++ -DNDEBUG -DPy_LIMITED_API=0x03060000 -DQT_CORE_LIB -DQT_LEAN_HEADERS=1 -DQT_NO_DEBUG -DQtCore_EXPORTS -I$SRC_DIR/sources/pyside6/PySide6/QtCore/QtCore -I$SRC_DIR/sources/pyside6/PySide6/QtCore -I$SRC_DIR/sources/pyside6/build/PySide6/QtCore -I$SRC_DIR/sources/pyside6/PySide6 -I$SRC_DIR/sources/pyside6/libpyside -isystem $PREFIX/include/qt6/QtCore -isystem $PREFIX/include/qt6 -isystem $PREFIX/lib/qt6/mkspecs/linux-g++ -isystem $PREFIX/include/shiboken6 -isystem $PREFIX/include/python3.9 -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/pyside6-6.5.0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -Wall -Wextra -Wno-strict-aliasing -Wno-cast-function-type -fvisibility=hidden -Os -DNDEBUG -std=gnu++17 -fPIC -fPIC -ffunction-sections -fdata-sections -fno-exceptions -fPIC -pthread -MD -MT PySide6/QtCore/CMakeFiles/QtCore.dir/PySide6/QtCore/qcalendar_wrapper.cpp.o -MF PySide6/QtCore/CMakeFiles/QtCore.dir/PySide6/QtCore/qcalendar_wrapper.cpp.o.d -o PySide6/QtCore/CMakeFiles/QtCore.dir/PySide6/QtCore/qcalendar_wrapper.cpp.o -c $SRC_DIR/sources/pyside6/build/PySide6/QtCore/PySide6/QtCore/qcalendar_wrapper.cpp 2023-04-07T07:57:20.0126327Z $SRC_DIR/sources/pyside6/build/PySide6/QtCore/PySide6/QtCore/qcalendar_wrapper.cpp: In function 'PyObject* Sbk_QCalendarFunc_daysInMonth(PyObject*, PyObject*, PyObject*)': 2023-04-07T07:57:20.0131395Z $SRC_DIR/sources/pyside6/build/PySide6/QtCore/PySide6/QtCore/qcalendar_wrapper.cpp:502:34: error: expected unqualified-id before '(' token 2023-04-07T07:57:20.0135972Z 502 | int cppArg1 = QCalendar::(unnamed enum at $PREFIX/include/qt6/QtCore/qcalendar.h:57:5)::Unspecified;
      
      

       

      the offending line seems to come from an enum in qcalendar.h:

      class Q_CORE_EXPORT QCalendar 
      { 
         Q_GADGET 
      public: 
         // (Extra parentheses to suppress bogus reading of min() as a macro.) 
         enum : int { Unspecified = (std::numeric_limits<int>::min)() };

       

      and shiboken writes incorrect text as plain code in the wrapper code:

      int cppArg1 = QCalendar::(unnamed enum at $PREFIX/include/qt6/QtCore/qcalendar.h:57:5)::Unspecified;

       

      I tried downgrading clang/llvm libs v16 to v15 and it fixed the build (we still use gcc (and msvc) as the main compiler for linux (resp windows).

      Attachments

        Issue Links

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

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              jschueller Julien Schueller
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are 8 open Gerrit changes