Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-33457

Configure error caused by Findyaml-cpp.cmake

XMLWordPrintable

    • Linux/X11
    • 9c31d4544 (17.0), 21f5c81d5 (18.0)

      Hello,

      Attempting to update the `qt-creator` package in Guix from version 15 to 17.0.1, I got this configuration failure:
      ```
      CMake Error at cmake/Findyaml-cpp.cmake:21 (add_library):
        add_library cannot create ALIAS target "yaml-cpp" because another target
        with the same name already exists.
      Call Stack (most recent call first):
        src/plugins/clangtools/CMakeLists.txt:1 (find_package)
      ```

      The error goes away if I remove the `yaml-cpp` input (system library). This seems to be caused because yaml-cpp's CMake config files already define the `yaml-cpp` target (at least using the latest commit of yaml-cpp, which is currently 2f86d13775d119edbb69af52e5f566fd65c6953b, see e.g. https://github.com/jbeder/yaml-cpp/blob/2f86d13775d119edbb69af52e5f566fd65c6953b/yaml-cpp-config.cmake.in#L23).

      As a workaround, I removed the line `add_library(yaml-cpp ALIAS yaml-cpp::yaml-cpp)` in the `Findyaml-cpp.cmake` file.

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

            con Eike Ziller
            apteryx Maxim Cournoyer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes