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. Building from repository
Forum Updated to NodeBB v4.3 + New Features

Building from repository

Scheduled Pinned Locked Moved Unsolved General and Desktop
16 Posts 5 Posters 1.1k Views 3 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.
  • PerdrixP Offline
    PerdrixP Offline
    Perdrix
    wrote on last edited by
    #1

    I cloned qt/qt5 from github, and installed flex, bison, and gperf but I still get errors:

    1> [CMake]  * Tool flex is required.
    1> [CMake]  * Tool bison is required.
    1> [CMake]  * Tool gperf is required.
    

    do I need to do something so they can be found? Add C:\Program Files(x86)\GnuWin32 to PATH perhaps?

    I also received this message trying to run cmake:

    1> [CMake]   The package name passed to `find_package_handle_standard_args` (Protobuf)
    1> [CMake]   does not match the name of the calling package (protobuf).  This can lead
    1> [CMake]   to problems in calling code that expects `find_package` result variables
    

    Is that something I need to be concerned about?

    Thanks
    David

    1 Reply Last reply
    0
    • Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote on last edited by
      #2

      Which Qt version? Which operating system?

      Software Engineer
      The Qt Company, Oslo

      1 Reply Last reply
      0
      • PerdrixP Offline
        PerdrixP Offline
        Perdrix
        wrote on last edited by
        #3

        I cloned the git repository qt/qt5 and pulled down the dev branch so that should I think be trying to build 6.9.0

        David

        1 Reply Last reply
        0
        • Axel SpoerlA Offline
          Axel SpoerlA Offline
          Axel Spoerl
          Moderators
          wrote on last edited by
          #4

          Can you please be a bit more verbose about what exactly you did? And maybe answer all my questions?

          Software Engineer
          The Qt Company, Oslo

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

            Hi,

            To add to @Axel-Spoerl, the compiler you are using as well is important.

            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
            • PerdrixP Offline
              PerdrixP Offline
              Perdrix
              wrote on last edited by
              #6

              Operating system Windows 11, compiler/IDE MSVC/VS2022.

              I opened the directory using VS2022 and went to cmake view got those messages and others as it parsed the CMakeLists.txt files

              1 Reply Last reply
              0
              • Axel SpoerlA Offline
                Axel SpoerlA Offline
                Axel Spoerl
                Moderators
                wrote on last edited by Axel Spoerl
                #7

                You must have configured the project somehow. What do you mean by “go to cmake“? Have you created a build tree and called configure.bat? That’s the step where bison, flex, gperf and others are searched. My suspicion is, that the configure step was skipped and you are attempting an in-source-build.
                Have you followed these steps?

                Software Engineer
                The Qt Company, Oslo

                1 Reply Last reply
                1
                • PerdrixP Offline
                  PerdrixP Offline
                  Perdrix
                  wrote on last edited by
                  #8

                  Reading that page it would seem clear that I can't use the VS2022 cmake integration to do this - all needs to be command line ...

                  I will try that.

                  1 Reply Last reply
                  0
                  • PerdrixP Offline
                    PerdrixP Offline
                    Perdrix
                    wrote on last edited by
                    #9

                    Looks like I needed to add C:\Program Files(x86)\GnuWin32\bin to path to get the GNU utilities picked up.

                    jsulmJ 1 Reply Last reply
                    0
                    • PerdrixP Perdrix

                      Looks like I needed to add C:\Program Files(x86)\GnuWin32\bin to path to get the GNU utilities picked up.

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @Perdrix said in Building from repository:

                      Looks like I needed to add C:\Program Files(x86)\GnuWin32\bin to path to get the GNU utilities picked up.

                      I doubt you need the GNU tools to build Qt if you're using MSVC.
                      Did you start from scratch (clean build folder and source tree) and did you call configure.bat?
                      Also, don't forget to call vcvarsall.bat like shown in the link.

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • PerdrixP Offline
                        PerdrixP Offline
                        Perdrix
                        wrote on last edited by Perdrix
                        #11

                        I too doubt it but that's what configure complains about, however they are installed and the relevant bin directory is in path but they can't be found from a command line prompt!!! I've reported this over on elevenforum, as this is clearly not a Qt problem!!! See: https://www.elevenforum.com/t/problem-with-path-environment-variable.31105/

                        I do get a lot of:

                        CMake Warning (dev) at D:/Github/qt-build/qtbase/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:443 (message):
                          INSTALL_SOURCE_QMLTYPES option is deprecated and should not be used.
                          Please port your module to use declarative type registration.
                        

                        and also get

                        -- Configuring submodule 'qtgrpc'
                        CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:441 (message):
                          The package name passed to `find_package_handle_standard_args` (Protobuf)
                          does not match the name of the calling package (protobuf).  This can lead
                          to problems in calling code that expects `find_package` result variables
                          (e.g., `_FOUND`) to follow a certain pattern.
                        Call Stack (most recent call first):
                          C:/Program Files/CMake/share/cmake-3.30/Modules/FindProtobuf.cmake:752 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
                          qtbase/cmake/QtFindPackageHelpers.cmake:141 (find_package)
                          qtgrpc/src/protobuf/configure.cmake:4 (qt_find_package)
                          qtbase/cmake/QtFeature.cmake:727 (include)
                          qtgrpc/src/CMakeLists.txt:5 (qt_feature_evaluate_features)
                        This warning is for project developers.  Use -Wno-dev to suppress it.
                        

                        and

                        -- Configuring submodule 'qtvirtualkeyboard'
                        CMake Warning (dev) at D:/Github/qt-build/qtbase/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:3219 (message):
                          TraceUtils.js is not an ECMAScript module and also doesn't contain '.pragma
                          library'.  It will be re-evaluated in the context of every QML document
                          that explicitly or implicitly imports QtQuick.VirtualKeyboard.Styles.  Set
                          its QT_QML_SKIP_QMLDIR_ENTRY source file property to FALSE if you really
                          want this to happen.  Set it to TRUE to prevent it.
                        Call Stack (most recent call first):
                          D:/Github/qt-build/qtbase/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:896 (qt6_target_qml_sources)
                          D:/Github/qt-build/qtbase/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:312 (qt6_add_qml_module)
                          qtvirtualkeyboard/src/styles/CMakeLists.txt:14 (qt_internal_add_qml_module)
                        

                        as this is my first time attempting to build Qt, I don't know if these are normal or not?

                        1 Reply Last reply
                        0
                        • PerdrixP Offline
                          PerdrixP Offline
                          Perdrix
                          wrote on last edited by
                          #12

                          Missing space between Program Files and (x86) doesn't help :)

                          D.

                          1 Reply Last reply
                          0
                          • Axel SpoerlA Offline
                            Axel SpoerlA Offline
                            Axel Spoerl
                            Moderators
                            wrote on last edited by
                            #13

                            Hi David,
                            a toplevel dev build is kinda asking for trouble. What are your configure arguments? Which submodules do you really need? Does it have to be bleeding edge?
                            I just checked myself (with Linux/X11) and I am struggling with the gtprc submodule on dev as well.
                            I'd either check out a stable branch (6.8.1 being the latest) or fall back to the latest submodule update. For the latter, call git submodule update --recursive in the src root just after cloning. If you don't wanna clone again, you can do a git reset --hard origin dev and a git clean -xdf.

                            Software Engineer
                            The Qt Company, Oslo

                            1 Reply Last reply
                            0
                            • PerdrixP Offline
                              PerdrixP Offline
                              Perdrix
                              wrote on last edited by
                              #14

                              I didn't specify any arguments for configure.

                              The reason I'm building dev branch is that I'm trying out a patch that will likely end up in 6.9.0 (or maybe 6.8.2), as the 6.8.1 ship has already sailed.

                              D 1 Reply Last reply
                              0
                              • Axel SpoerlA Offline
                                Axel SpoerlA Offline
                                Axel Spoerl
                                Moderators
                                wrote on last edited by
                                #15

                                Not specifying any arguments builds all submodules. That’s probably not necessary.
                                If I am not mistaken, your deep sky stacker is a widgets app, so it uses only qtbase.
                                In that case you don’t need a toplevel build at all.
                                Create something like C:\path\to\dev-build\qtbase.
                                There you execute

                                C:\path\to\qt5\qtbase\configure -developer-build
                                ninja
                                

                                That creates a non-prefix debug build which you can import into QtC as an existing build and use it as a kit for DSS. If you need a specific submodule, you need to call configure in the qt5 root directory and add -submodule qtdeclarative (if you need declarative) after the developer build option.

                                Software Engineer
                                The Qt Company, Oslo

                                1 Reply Last reply
                                1
                                • PerdrixP Perdrix

                                  I didn't specify any arguments for configure.

                                  The reason I'm building dev branch is that I'm trying out a patch that will likely end up in 6.9.0 (or maybe 6.8.2), as the 6.8.1 ship has already sailed.

                                  D Offline
                                  D Offline
                                  Durukan
                                  wrote on last edited by
                                  #16

                                  @Perdrix was there any shared folders? May be project needs an argument that this folder contains but you didn't configured.

                                  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