[Interest] 'help'
Volker Hilsheimer
volker.hilsheimer at qt.io
Wed Sep 18 14:26:37 CEST 2024
> On 18 Sep 2024, at 13:08, Suhas Krishanamurthy <suhaskrishanamurthy2076 at outlook.com> wrote:
>
> Hello All,
>
> I am trying to build qt latest source code along with the documentation files to fix the bugs related to the documentation as well as qt source code bug.
>
> We need the guidance to clone and build.
>
> Also if you give the command to build it, It will be very helpful for us, I have tried to build several time but I failed.
>
> Thank You
> Suhas
Hi Suhas,
Thanks for trying to contribute, here’s more or less what I do:
Assuming that you have the toolchain and dependencies installed to be able to build Qt, and especially qdoc:
% git clone git://code.qt.io/qt/qt5.git
% cd qt5
% ./init-repository --module-subset=essential,-qtwebengine # adapt as needed
% mkdir ../qt5-build
% cd ../qt5-build
% ../qt5/configure -developer-build
Confirm here that the output here doesn’t report errors or warnings about e.g. qdoc not being built because of missing dependencies. If you see any such warnings, make sure that LLVM_INSTALL_DIR environment points at wherever you have llvm installed. On my macbook (where it’s installed via `brew install llvm`), that would be `/opt/homebrew/opt/llvm`. For other warnings or errors the solution will be different, but installing dependencies and/or pointing environment variables at the right paths should help with most.
To build the documentation (but not all of Qt), run:
% ninja html_docs
The documentation’s index page will then be in ./qtbase/doc/qtdoc/index.html (since this is an uninstalled -developer-build, binaries and other artefacts are in the qtbase build tree). The build process will produce some warnings from qdoc - that’s not unexpected.
To build the documentation of a specific module, run `ninja html_docs_<Module>`, e.g. `ninja html_docs_Widgets`. To build of all Qt, just run `ninja`.
Note: that process builds the sources for each submodule from the revisions as per the qt5.git super-repository, e.g. the most recent versions of each submodule that have successfully been tested with each other. Some of them, most probably qtbase, will not be at the tip of origin/dev, but a few commits behind. If you want to build everything from dev (which might be a good idea if you are making changes), then in your qt5 worktree, run
% git submodule foreach ‘git rebase origin/dev || true’
(the || true is needed because some helper-repos don’t have a ‘dev’ branch).
before configuring.
The process is documented at https://wiki.qt.io/Building_Qt_6_from_Git; if you spot anything on that page that could be improved, feel free to make changes.
Cheers,
Volker
More information about the Interest
mailing list