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

5.14.2 -> 5.15: cmake errors about conflicting targets

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Invalid
    • Affects Version/s: 5.15.0 Beta4
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Tried on ubuntu focal build server with docker installed.
    • Platform/s:
      Linux/X11

      Description

      I am trying to build rstudio with 5.15.0 (is the compiled version which is available to download now from https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_5150/ beta 4?).

      This is the error I get.

       

      -- Found Qt: /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/bin/qmake
      CMake Error at /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5Qml_QDebugMessageServiceFactory.cmake:2 (add_library):
       add_library cannot create imported target
       "Qt5::QDebugMessageServiceFactory" because another target with the same
       name already exists.
      Call Stack (most recent call first):
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfigExtras.cmake:4 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfig.cmake:240 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5WebChannel/Qt5WebChannelConfig.cmake:99 (find_package)
       src/cpp/desktop/CMakeLists.txt:118 (find_package)
      
      CMake Error at /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5Qml_QLocalClientConnectionFactory.cmake:2 (add_library):
       add_library cannot create imported target
       "Qt5::QLocalClientConnectionFactory" because another target with the same
       name already exists.
      Call Stack (most recent call first):
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfigExtras.cmake:4 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfig.cmake:240 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5WebChannel/Qt5WebChannelConfig.cmake:99 (find_package)
       src/cpp/desktop/CMakeLists.txt:118 (find_package)
      
      CMake Error at /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5Qml_QQmlDebugServerFactory.cmake:2 (add_library):
       add_library cannot create imported target "Qt5::QQmlDebugServerFactory"
       because another target with the same name already exists.
      Call Stack (most recent call first):
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfigExtras.cmake:4 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfig.cmake:240 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5WebChannel/Qt5WebChannelConfig.cmake:99 (find_package)
       src/cpp/desktop/CMakeLists.txt:118 (find_package)
      
      CMake Error at /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5Qml_QQmlDebuggerServiceFactory.cmake:2 (add_library):
       add_library cannot create imported target "Qt5::QQmlDebuggerServiceFactory"
       because another target with the same name already exists.
      Call Stack (most recent call first):
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfigExtras.cmake:4 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfig.cmake:240 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5WebChannel/Qt5WebChannelConfig.cmake:99 (find_package)
       src/cpp/desktop/CMakeLists.txt:118 (find_package)
      
      CMake Error at /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5Qml_QQmlInspectorServiceFactory.cmake:2 (add_library):
       add_library cannot create imported target
       "Qt5::QQmlInspectorServiceFactory" because another target with the same
       name already exists.
      Call Stack (most recent call first):
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfigExtras.cmake:4 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfig.cmake:240 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5WebChannel/Qt5WebChannelConfig.cmake:99 (find_package)
       src/cpp/desktop/CMakeLists.txt:118 (find_package)
      
      CMake Error at /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5Qml_QQmlNativeDebugConnectorFactory.cmake:2 (add_library):
       add_library cannot create imported target
       "Qt5::QQmlNativeDebugConnectorFactory" because another target with the same
       name already exists.
      Call Stack (most recent call first):
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfigExtras.cmake:4 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfig.cmake:240 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5WebChannel/Qt5WebChannelConfig.cmake:99 (find_package)
       src/cpp/desktop/CMakeLists.txt:118 (find_package)
      
      CMake Error at /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5Qml_QQmlNativeDebugServiceFactory.cmake:2 (add_library):
       add_library cannot create imported target
       "Qt5::QQmlNativeDebugServiceFactory" because another target with the same
       name already exists.
      Call Stack (most recent call first):
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfigExtras.cmake:4 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfig.cmake:240 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5WebChannel/Qt5WebChannelConfig.cmake:99 (find_package)
       src/cpp/desktop/CMakeLists.txt:118 (find_package)
      
      CMake Error at /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5Qml_QQmlPreviewServiceFactory.cmake:2 (add_library):
       add_library cannot create imported target "Qt5::QQmlPreviewServiceFactory"
       because another target with the same name already exists.
      Call Stack (most recent call first):
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfigExtras.cmake:4 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfig.cmake:240 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5WebChannel/Qt5WebChannelConfig.cmake:99 (find_package)
       src/cpp/desktop/CMakeLists.txt:118 (find_package)
      
      CMake Error at /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5Qml_QQmlProfilerServiceFactory.cmake:2 (add_library):
       add_library cannot create imported target "Qt5::QQmlProfilerServiceFactory"
       because another target with the same name already exists.
      Call Stack (most recent call first):
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfigExtras.cmake:4 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfig.cmake:240 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5WebChannel/Qt5WebChannelConfig.cmake:99 (find_package)
       src/cpp/desktop/CMakeLists.txt:118 (find_package)
      
      CMake Error at /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5Qml_QQuickProfilerAdapterFactory.cmake:2 (add_library):
       add_library cannot create imported target
       "Qt5::QQuickProfilerAdapterFactory" because another target with the same
       name already exists.
      Call Stack (most recent call first):
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfigExtras.cmake:4 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfig.cmake:240 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5WebChannel/Qt5WebChannelConfig.cmake:99 (find_package)
       src/cpp/desktop/CMakeLists.txt:118 (find_package)
      
      CMake Error at /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5Qml_QTcpServerConnectionFactory.cmake:2 (add_library):
       add_library cannot create imported target
       "Qt5::QTcpServerConnectionFactory" because another target with the same
       name already exists.
      Call Stack (most recent call first):
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfigExtras.cmake:4 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5Qml/Qt5QmlConfig.cmake:240 (include)
       /opt/RStudio-QtSDK/Qt5.15.0/5.15.0/gcc_64/lib/cmake/Qt5WebChannel/Qt5WebChannelConfig.cmake:99 (find_package)
       src/cpp/desktop/CMakeLists.txt:118 (find_package)
      

       

       This is completely reproducible.

      Here's the simple script & patch  (put in the same folder) I use via docker to build this:

      build_rstudio_focal.sh

      rstudio-1.3.patch

       

      Here is the complete build output:

      5.15.0.out

       

       

        Attachments

        1. 5.15.0.out
          13 kB
        2. build_rstudio_focal.sh
          1 kB
        3. rstudio-1.3.patch
          6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            qtbuildsystem Qt Build System Team
            Reporter:
            satadru Satadru Pramanik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes