Building from repository
-
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 -
Which Qt version? Which operating system?
-
Can you please be a bit more verbose about what exactly you did? And maybe answer all my questions?
-
Hi,
To add to @Axel-Spoerl, the compiler you are using as well is important.
-
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? -
Looks like I needed to add C:\Program Files(x86)\GnuWin32\bin to path to get the GNU utilities picked up.
@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. -
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?
-
Hi David,
a toplevel dev build is kinda asking for trouble. What are yourconfigure
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 thegtprc
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, callgit submodule update --recursive
in the src root just after cloning. If you don't wanna clone again, you can do agit reset --hard origin dev
and agit clean -xdf
. -
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 likeC:\path\to\dev-build\qtbase
.
There you executeC:\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. -
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.