Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Compiling QtCreator 5.0 from source

Compiling QtCreator 5.0 from source

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
qtcreator 5.0
10 Posts 6 Posters 2.9k Views 1 Watching
  • 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.
  • H Offline
    H Offline
    haitaur_t
    wrote on last edited by
    #1

    Hi, I need help.
    I am trying to compile Qt Creator from source according to this instruction: https://github.com/qt-creator/qt-creator

    mkdir qtcreator_build
    cd qtcreator_build
    cmake -DCMAKE_BUILD_TYPE=Release -G Ninja -DPYTHON_EXECUTABLE=/usr/bin/python3 '../qt-creator'
    

    The result is an error:

    CMake Warning (dev) at /usr/local/share/cmake-3.21/Modules/GNUInstallDirs.cmake:236 (message):
      Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
      target architecture is known.  Please enable at least one language before
      including GNUInstallDirs.
    Call Stack (most recent call first):
      cmake/QtCreatorAPIInternal.cmake:69 (include)
      cmake/QtCreatorAPI.cmake:8 (include)
      CMakeLists.txt:10 (include)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    -- The C compiler identification is GNU 10.3.0
    -- The CXX compiler identification is GNU 10.3.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /usr/bin/cc - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/c++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Looking for pthread.h
    -- Looking for pthread.h - found
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
    -- Looking for pthread_create in pthreads
    -- Looking for pthread_create in pthreads - not found
    -- Looking for pthread_create in pthread
    -- Looking for pthread_create in pthread - found
    -- Found Threads: TRUE  
    CMake Error at cmake/QtCreatorAPI.cmake:401 (get_property):
      get_property could not find TARGET Designer.  Perhaps it has not yet been
      created.
    Call Stack (most recent call first):
      src/plugins/mesonprojectmanager/CMakeLists.txt:1 (add_qtc_plugin)
    
    
    CMake Error at cmake/QtCreatorAPI.cmake:401 (get_property):
      get_property could not find TARGET Designer.  Perhaps it has not yet been
      created.
    Call Stack (most recent call first):
      src/plugins/qmakeprojectmanager/CMakeLists.txt:1 (add_qtc_plugin)
    
    
    CMake Error at cmake/QtCreatorAPI.cmake:401 (get_property):
      get_property could not find TARGET Designer.  Perhaps it has not yet been
      created.
    Call Stack (most recent call first):
      src/plugins/cmakeprojectmanager/CMakeLists.txt:1 (add_qtc_plugin)
    
    
    CMake Error at src/plugins/qmlpreview/CMakeLists.txt:28 (get_target_property):
      get_target_property() called with non-existent target "Qt5::QmlPrivate".
    
    
    -- Found PythonInterp: /usr/bin/python3 (found version "3.8.6") 
    CMake Warning at cmake/QtCreatorTranslations.cmake:100 (message):
      No Qt translation tools found, skipping translation targets.  Add
      find_package(Qt5 COMPONENTS LinguistTools) to CMake to enable.
    Call Stack (most recent call first):
      share/qtcreator/translations/CMakeLists.txt:47 (add_translation_targets)
    
    
    -- The following packages have been found:
    
     * Qt5Concurrent
     * Qt5Gui
     * Qt5Network
     * Qt5PrintSupport
     * Qt5Qml
     * Qt5QmlModels (required version >= 5.14.2)
     * Qt5Quick
     * Qt5QuickWidgets
     * Qt5Sql
     * Qt5Widgets
     * Qt5Xml
     * Qt5SerialPort
     * Threads
     * LLVM
     * Clang
     * Qt5Test
     * yaml-cpp, using internal src/libs/3rdparty/yaml-cpp
     * Qt5Core
     * Qt5
     * PythonInterp
    
    -- The following packages have not been found:
    
     * Qt5LinguistTools
     * Qt5Designer
     * Qt5DesignerComponents
     * Qt5Help
     * Qt5Svg
     * KF5SyntaxHighlighting
     * Qt5SvgWidgets
     * Qt5WebEngineWidgets
    
    -- The following features have been enabled:
    
     * Library 3rd_cplusplus
     * Library KSyntaxHighlighting
     * Library AdvancedDockingSystem
     * Library Aggregation
     * Library ExtensionSystem
     * Library Utils
     * Library LanguageUtils
     * Library CPlusPlus
     * Library Modeling
     * Library QmlJS
     * Library QmlDebug
     * Library QmlEditorWidgets
     * Library GLSL
     * Library LanguageServerProtocol
     * Library QtcSsh
     * Library Sqlite
     * Library ClangSupport
     * Library Tracing
     * Library ProParser
     * Plugin Core
     * Plugin TextEditor
     * Plugin SerialTerminal, with CONDITION TARGET Qt5::SerialPort
     * Plugin HelloWorld
     * Plugin ImageViewer
     * Plugin Marketplace
     * Plugin UpdateInfo
     * Plugin Welcome
     * Plugin BinEditor
     * Plugin CodePaster
     * Plugin DiffEditor
     * Plugin EmacsKeys
     * Plugin Macros
     * Plugin ProjectExplorer
     * Plugin SilverSearcher
     * Plugin Bookmarks
     * Plugin CppTools
     * Plugin ResourceEditor
     * Plugin TaskList
     * Plugin Nim
     * Plugin Conan
     * Plugin ClassView
     * Plugin CppEditor
     * Plugin GLSLEditor
     * Plugin ModelEditor
     * Plugin QtSupport
     * Plugin Todo
     * Plugin VcsBase
     * Plugin Bazaar
     * Plugin Beautifier
     * Plugin ClangFormat, with CONDITION TARGET libclang AND LLVM_PACKAGE_VERSION VERSION_GREATER_EQUAL 10.0.0 AND QTC_CLANG_BUILDMODE_MATCH
     * Plugin ClearCase
     * Plugin CVS
     * Plugin Docker
     * Plugin FakeVim
     * Plugin GenericProjectManager
     * Plugin Git
     * Plugin Mercurial
     * Plugin MesonProjectManager
     * Plugin Perforce
     * Plugin QmakeProjectManager
     * Plugin QmlJSTools
     * Plugin QmlProjectManager
     * Plugin ScxmlEditor
     * Plugin Subversion
     * Plugin CompilationDatabaseProjectManager
     * Plugin LanguageClient
     * Plugin StudioWelcome
     * Plugin CMakeProjectManager
     * Plugin Debugger
     * Plugin Android
     * Plugin AutoTest
     * Plugin AutotoolsProjectManager
     * Plugin BareMetal
     * Plugin ClangCodeModel, with CONDITION TARGET libclang
     * Library yaml-cpp
     * Plugin ClangTools, with CONDITION TARGET yaml-cpp
     * Plugin Cppcheck
     * Plugin IncrediBuild
     * Plugin Ios
     * Plugin Python
     * Plugin QmlJSEditor
     * Plugin QmlPreview
     * Plugin QmlProfiler, with CONDITION TARGET Tracing
     * Plugin RemoteLinux
     * Plugin Valgrind
     * Plugin WinRt
     * Plugin PerfProfiler, with CONDITION TARGET Tracing
     * Plugin QbsProjectManager
     * Plugin CtfVisualizer, with CONDITION TARGET Tracing
     * Plugin Boot2Qt
     * Plugin QmlDesigner
     * Plugin assetexporterplugin, with CONDITION TARGET QmlDesigner
     * Plugin componentsplugin, with CONDITION TARGET QmlDesigner
     * Plugin qmlpreviewplugin, with CONDITION TARGET QmlDesigner
     * Plugin qtquickplugin, with CONDITION TARGET QmlDesigner
     * Plugin Qnx
     * Plugin WebAssembly
     * Plugin McuSupport
     * Library clangbackend_lib
     * Library qml2puppet_static
    
    -- The following features have been disabled:
    
     * Build documentation
     * Build online documentation
     * Build tests
     * Build with Crashpad
     * Library Minitrace
     * Build Qbs, with CONDITION TARGET Qt5::Script
     * Plugin Help, with CONDITION TARGET Qt5::Help
     * Plugin Designer, with CONDITION TARGET Qt5::DesignerComponents AND TARGET Qt5::Designer
     * Qt Quick 3D support, with CONDITION TARGET Qt5::Quick3D
     * Qt Quick 3D asset import, with CONDITION TARGET Qt5::Quick3DAssetImport
     * multilanguage-support in qml2puppet, with CONDITION TARGET QtCreator::multilanguage-support
     * Include developer documentation
    
    -- Configuring incomplete, errors occurred!
    See also "/Project/qt-creator/qt-creator-build/CMakeFiles/CMakeOutput.log".
    See also "/Project/qt-creator/qt-creator-build/CMakeFiles/CMakeError.log".
    
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Which version of Qt are you using ?
      How did you install it ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      S 1 Reply Last reply
      1
      • H Offline
        H Offline
        haitaur_t
        wrote on last edited by
        #3

        Thanks!

        Using Qt version 5.15.2 in /opt/Qt/5.15.2/gcc_64/lib

        It's installed from source

        I used:

        cmake -DCMAKE_BUILD_TYPE=Release -G Ninja "-DCMAKE_PREFIX_PATH=/opt/Qt/5.15.2" -DPYTHON_EXECUTABLE=/usr/bin/python3 '../qt-creator'
        

        it didn't help

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          For the prefix path I usually point it to the cmake folder in the libs folder of the Qt installation I want to use.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • B Offline
            B Offline
            Borwe
            wrote on last edited by
            #5

            How did you solve this? Having same problem.

            1 Reply Last reply
            1
            • L Offline
              L Offline
              Lo__
              wrote on last edited by
              #6

              Same problem here. Any ideas?

              1 Reply Last reply
              0
              • Cobra91151C Offline
                Cobra91151C Offline
                Cobra91151
                wrote on last edited by
                #7

                Hello!

                I had the same issue with pthread.h on Windows. So, I reported it here: https://bugreports.qt.io/browse/QTCREATORBUG-27158
                Thanks to Eike Ziller, I know how to fix this issue with pthread.h, which is not required on Windows.
                So, to fix this issue and compile Qt Creator successfully, you must add the following commands: -DBUILD_EXECUTABLE_QML2PUPPET=OFF -DBUILD_LIBRARY_QML2PUPPET_STATIC=OFF to disable some plugins.

                For example, I run these commands using x64 Native Tools Command Prompt for VS 2019/2022 to built Qt Creator 7 using Qt 5.15.2:

                cmake -DCMAKE_BUILD_TYPE=Release -G Ninja "-DCMAKE_PREFIX_PATH=C:/Qt/5.15.2/msvc2019_64;C:/LLVM" -DBUILD_EXECUTABLE_QML2PUPPET=OFF -DBUILD_LIBRARY_QML2PUPPET_STATIC=OFF C:/Users/cobra/Downloads/qt-creator-opensource-src-7.0.0-rc1
                
                cmake --build .
                
                cmake --install . --prefix C:/Qt/qtcreator-7.0.0-rc1
                
                cmake --install . --prefix C:/Qt/qtcreator-7.0.0-rc1 --component Dependencies
                

                Note: Using forward slashes for paths in CMAKE_PREFIX_PATH is usually the safer way even on Windows.
                The last 2 commands is required. It will install all the necessary Qt Creator components in following directory: C:/Qt/qtcreator-7.0.0-rc1

                Screenshot:
                2022-03-10_125742.png

                1 Reply Last reply
                0
                • SGaistS SGaist

                  Hi and welcome to devnet,

                  Which version of Qt are you using ?
                  How did you install it ?

                  S Offline
                  S Offline
                  srgmatveev
                  wrote on last edited by
                  #8

                  @SGaist I had the same error
                  As a result, compiled by make with fix some errors.
                  Create qt creator build dir
                  Go to this dir
                  and run /Path_to_Qt_lib_build/bin/qmake -o Makefile /Path_to_Qt_creator_src/qtcreator.pro
                  Make file will be created.
                  run make -j $(nproc) from this dir
                  or simple make
                  Then fix errors and run make again

                  S 1 Reply Last reply
                  0
                  • S srgmatveev

                    @SGaist I had the same error
                    As a result, compiled by make with fix some errors.
                    Create qt creator build dir
                    Go to this dir
                    and run /Path_to_Qt_lib_build/bin/qmake -o Makefile /Path_to_Qt_creator_src/qtcreator.pro
                    Make file will be created.
                    run make -j $(nproc) from this dir
                    or simple make
                    Then fix errors and run make again

                    S Offline
                    S Offline
                    srgmatveev
                    wrote on last edited by
                    #9

                    Plugin Designer, with CONDITION TARGET Qt5::DesignerComponents AND TARGET Qt5::Designer

                    • Qt Quick 3D support, with CONDITION TARGET Qt5::Quick3D
                    • Qt Quick 3D asset import, with CONDITION TARGET Qt5::Quick3DAssetImport
                    • multilanguage-support in qml2puppet, with CONDITION TARGET QtCreator::multilanguage-support
                    • Include developer documentation

                    You could not build plugin Designer for Design mode and this gave this error.

                    S 1 Reply Last reply
                    0
                    • S srgmatveev

                      Plugin Designer, with CONDITION TARGET Qt5::DesignerComponents AND TARGET Qt5::Designer

                      • Qt Quick 3D support, with CONDITION TARGET Qt5::Quick3D
                      • Qt Quick 3D asset import, with CONDITION TARGET Qt5::Quick3DAssetImport
                      • multilanguage-support in qml2puppet, with CONDITION TARGET QtCreator::multilanguage-support
                      • Include developer documentation

                      You could not build plugin Designer for Design mode and this gave this error.

                      S Offline
                      S Offline
                      srgmatveev
                      wrote on last edited by srgmatveev
                      #10

                      In my case it had not qttools package in qt build library.
                      I build qt lib from sources.

                      1 Reply Last reply
                      0

                      • Login

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