Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Creator requests Qt5?
Forum Updated to NodeBB v4.3 + New Features

Qt Creator requests Qt5?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 359 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GalHA
    wrote on 24 Jul 2022, 12:01 last edited by
    #1

    I'm running on Ubuntu 20.04 and I have qt 6.3.1 installed. When trying to build Qt Creator from git I'm getting the following error:
    bd2e0e8d-d8ce-4fe9-af36-9002d01df68c-image.png

    This is the command I entered:
    cmake -DCMAKE_BUILD_TYPE=Release -G Ninja "-DCMAKE_PREFIX_PATH=~/qt6-build/bin;~/llvm-build/bin" ~/qt-creator

    My question is why would it request Qt 5 if under the requirements it states Qt 6.2 or later... and how do I continue about building Qt Creator from source?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      cristian-adam
      wrote on 24 Jul 2022, 12:22 last edited by
      #2

      The Qt Creator CMake code still tries to find Qt6 and Qt5 CMake packages. We'll move to only Qt6 in the near future.

      You are passing the wrong paths in the CMAKE_PREFIX_PATH. Have a look at find_package's documentation about how CMake is trying to find out where the CMake packages are located.

      In your case it would be just "-DCMAKE_PREFIX_PATH=~/qt6-build;~/llvm-build" since CMake will use these paths as prefixes and add automatically lib/cmake.

      You can also use CMake's --debug-find argument, which is descriebed as:

      Put cmake find commands in a debug mode.

      Print extra find call information during the cmake run to standard error. Output is designed for human consumption and not for parsing. See also the CMAKE_FIND_DEBUG_MODE variable for debugging a more local part of the project.

      G 1 Reply Last reply 24 Jul 2022, 14:04
      3
      • C cristian-adam
        24 Jul 2022, 12:22

        The Qt Creator CMake code still tries to find Qt6 and Qt5 CMake packages. We'll move to only Qt6 in the near future.

        You are passing the wrong paths in the CMAKE_PREFIX_PATH. Have a look at find_package's documentation about how CMake is trying to find out where the CMake packages are located.

        In your case it would be just "-DCMAKE_PREFIX_PATH=~/qt6-build;~/llvm-build" since CMake will use these paths as prefixes and add automatically lib/cmake.

        You can also use CMake's --debug-find argument, which is descriebed as:

        Put cmake find commands in a debug mode.

        Print extra find call information during the cmake run to standard error. Output is designed for human consumption and not for parsing. See also the CMAKE_FIND_DEBUG_MODE variable for debugging a more local part of the project.

        G Offline
        G Offline
        GalHA
        wrote on 24 Jul 2022, 14:04 last edited by
        #3

        @cristian-adam
        After editing to match your fixes I still got this error over and over again:
        2566fec3-fe13-42b4-b716-a21a06c0c460-image.png

        1 Reply Last reply
        0
        • C Offline
          C Offline
          cristian-adam
          wrote on 24 Jul 2022, 14:17 last edited by
          #4

          I think what you are trying do doesn't work that well, namely consuming a llvm build from a 3rd party application – Qt Creator.

          You need to:

          1. build llvm/clang  cmake --build llvm-build-dir
          2. install llvm/clang cmake --install llvm-build-dir --prefix  llvm-install-dir
          3. use the llvm-install-dir with Qt Creator in CMAKE_PREFIX_PATH
          

          I would say you need to have the same thing with Qt.

          Always use an installed version of a project in a different project. This is normally the only supported version of a library.

          G 1 Reply Last reply 24 Jul 2022, 14:42
          2
          • C cristian-adam
            24 Jul 2022, 14:17

            I think what you are trying do doesn't work that well, namely consuming a llvm build from a 3rd party application – Qt Creator.

            You need to:

            1. build llvm/clang  cmake --build llvm-build-dir
            2. install llvm/clang cmake --install llvm-build-dir --prefix  llvm-install-dir
            3. use the llvm-install-dir with Qt Creator in CMAKE_PREFIX_PATH
            

            I would say you need to have the same thing with Qt.

            Always use an installed version of a project in a different project. This is normally the only supported version of a library.

            G Offline
            G Offline
            GalHA
            wrote on 24 Jul 2022, 14:42 last edited by
            #5

            @cristian-adam
            Thank you! We can definitely count this ticket as solved

            1 Reply Last reply
            0

            1/5

            24 Jul 2022, 12:01

            • Login

            • Login or register to search.
            1 out of 5
            • First post
              1/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved