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

qvulkanwindow.cpp:451:3: error: redefinition of 'qvk_sampleCounts

    XMLWordPrintable

Details

    • macOS
    • c90cc8c90 (dev), 5cf68eb15 (6.6), 7e12c2ac4 (6.5)

    Description

      on macos qtgui build fails with both unity build and vulkan enabled:

       

      2023-06-28T02:58:52.3731740Z FAILED: qtbase/src/gui/CMakeFiles/Gui.dir/Unity/unity_6_cxx.cxx.o 2023-06-28T02:58:52.3814600Z $BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-clang++ -DENABLE_PIXMAN_DRAWHELPERS -DGL_SILENCE_DEPRECATION -DGui_EXPORTS -DMD4C_USE_UTF8 -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_GUI_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_UP_TO=0x050000 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_LEAN_HEADERS=1 -DQT_MOC_COMPAT -DQT_NO_AS_CONST=1 -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_USING_NAMESPACE -DQT_QPA_DEFAULT_PLATFORM_NAME=\"cocoa\" -DQT_USE_QSTRINGBUILDER -DQT_WARN_DEPRECATED_UP_TO=0x070000 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I$SRC_DIR/build/qtbase/src/gui/Gui_autogen/include -I$SRC_DIR/build/qtbase/include -I$SRC_DIR/build/qtbase/include/QtGui -I$SRC_DIR/qtbase/src/gui -I$SRC_DIR/build/qtbase/src/gui -I$SRC_DIR/qtbase/src/gui/../3rdparty/VulkanMemoryAllocator -I$SRC_DIR/build/qtbase/include/QtGui/6.5.1 -I$SRC_DIR/build/qtbase/include/QtGui/6.5.1/QtGui -I$SRC_DIR/qtbase/src/gui/../3rdparty/md4c -I$SRC_DIR/build/qtbase/include/QtCore -I$SRC_DIR/qtbase/mkspecs/macx-clang -I$SRC_DIR/build/qtbase/src/corelib -I$SRC_DIR/build/qtbase/include/QtCore/6.5.1 -I$SRC_DIR/build/qtbase/include/QtCore/6.5.1/QtCore -I$SRC_DIR/qtbase/src/3rdparty/harfbuzz-ng/include/harfbuzz -I$SRC_DIR/build/qtbase/include/QtDBus -isystem $PREFIX/include/freetype2 -isystem $PREFIX/include/glib-2.0 -isystem $PREFIX/lib/glib-2.0/include -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/qt6-main-6.5.1 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -DNDEBUG -O3 -std=c++17 -isysroot /Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -mmacosx-version-min=10.14 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fno-exceptions -fPIC -fapplication-extension -Winvalid-pch -Xclang -include-pch -Xclang $SRC_DIR/build/qtbase/src/gui/CMakeFiles/Gui.dir/cmake_pch.hxx.pch -Xclang -include -Xclang $SRC_DIR/build/qtbase/src/gui/CMakeFiles/Gui.dir/cmake_pch.hxx -MD -MT qtbase/src/gui/CMakeFiles/Gui.dir/Unity/unity_6_cxx.cxx.o -MF qtbase/src/gui/CMakeFiles/Gui.dir/Unity/unity_6_cxx.cxx.o.d -o qtbase/src/gui/CMakeFiles/Gui.dir/Unity/unity_6_cxx.cxx.o -c $SRC_DIR/build/qtbase/src/gui/CMakeFiles/Gui.dir/Unity/unity_6_cxx.cxx 2023-06-28T02:58:52.3902320Z In file included from $SRC_DIR/build/qtbase/src/gui/CMakeFiles/Gui.dir/Unity/unity_6_cxx.cxx:55: 2023-06-28T02:58:52.3917140Z $SRC_DIR/qtbase/src/gui/vulkan/qvulkanwindow.cpp:451:3: error: redefinition of 'qvk_sampleCounts' with a different type: 'struct (unnamed struct at $SRC_DIR/qtbase/src/gui/vulkan/qvulkanwindow.cpp:448:8)[]' vs 'struct (unnamed struct at $SRC_DIR/qtbase/src/gui/rhi/qrhivulkan.cpp:3694:8)[7]' 2023-06-28T02:58:52.4018440Z } qvk_sampleCounts[] = { 2023-06-28T02:58:52.4035080Z ^ 2023-06-28T02:58:52.4135070Z $SRC_DIR/qtbase/src/gui/rhi/qrhivulkan.cpp:3697:3: note: previous definition is here 2023-06-28T02:58:52.4212750Z } qvk_sampleCounts[] = { 2023-06-28T02:58:52.4314060Z ^ 2023-06-28T02:58:52.4340820Z 1 error generated. 2023-06-28T02:59:41.3367130Z [1021/4012] Building CXX object qtbase/src/gui/CMakeFiles/Gui.dir/Unity/unity_5_cxx.cxx.o 2023-06-28T02:59:57.2545660Z [1022/4012] Building CXX object qtbase/src/gui/CMakeFiles/Gui.dir/Unity/unity_2_cxx.cxx.o 2023-06-28T03:00:30.2966300Z [1023/4012] Building CXX object qtbase/src/gui/CMakeFiles/Gui.dir/Unity/unity_4_cxx.cxx.o 2023-06-28T03:00:32.8901230Z [1024/4012] Building CXX object qtbase/src/gui/CMakeFiles/Gui.dir/Unity/unity_3_cxx.cxx.o 2023-06-28T03:00:32.8908290Z ninja: build stopped: subcommand failed.

      (unity build is disabled on other platforms for this target)

       

      it is due to a simple redefinition of a global variable:

      $ grep -nr qvk_sampleCounts src/ 
      src/gui/vulkan/qvulkanwindow.cpp:451:} qvk_sampleCounts[] = { 
      src/gui/vulkan/qvulkanwindow.cpp:491:    for (const auto &qvk_sampleCount : qvk_sampleCounts) { 
      src/gui/vulkan/qvulkanwindow.cpp:540:    for (const auto &qvk_sampleCount : qvk_sampleCounts) { 
      src/gui/rhi/qrhivulkan.cpp:3697:} qvk_sampleCounts[] = { 
      src/gui/rhi/qrhivulkan.cpp:3716:    for (const auto &qvk_sampleCount : qvk_sampleCounts) { 
      src/gui/rhi/qrhivulkan.cpp:3738:    for (const auto &qvk_sampleCount : qvk_sampleCounts) {

       

      Attachments

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

        Activity

          People

            mrmsdbdl Amir Masoud Abdol
            jschueller Julien Schueller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes