[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#908328: qtbase5-doc-html: Class docs are missing in 5.11.1+dfsg-7



I want to follow-up on this bug discussing the future handling of this issue,
mostly for my co-maintainers.

On Sun, Sep 09, 2018 at 05:47:28PM +0300, Dmitry Shachnev wrote:
> As the changes in qtbase-opensource-src itself were minimal between the two
> uploads, it looks like this bug is caused by a dependency update.
>
> Here is what changed in llvm-toolchain-6.0 between the good and broken qtbase
> builds [3]. This does not give me any clue though.
> [...]
>
> [3]: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/compare/debian%2F6.0.1-2...debian%2F6.0.1-5

Answering my own question: it turned out that it was caused by llvm-toolchain
maintainers dropping the force-gcc-header-obj.diff patch [1]. That patch was
adding GCC’s include path to clang default search paths.

How this is related to qdoc: as qdoc parses C++ files, it needs all headers
to be present, including the C++ standard library headers. We need to make a
decision on what headers we will use. There are two choices here:

Choice 1: Use clang standard library (libclang-common-*-dev).

This is what upstream uses (the path to that library is built into qdoc
executable [2]).

➕: No patches needed.
➖: qttools5-dev-tools will need to depend on the headers package it was built
    against. E.g. from the latest build log you can see that it was built with
    -D'CLANG_RESOURCE_DIR="/usr/lib/llvm-6.0/lib/clang/6.0.1/include"'. That
    means it should depend on libclang-common-6.0-dev.
➖: Every time the major clang version changes, we should rebuild qttools.

Choice 2: Use GCC standard library (libstdc++-*-dev).

➕: No additional dependencies or rebuilds are needed. During package builds
    the GCC standard library will be always installed.
➖: This will require a patch to add GCC library path to clang search paths.
    Currently I have a patch [3] in qttools to add that, but the logic can be
    moved to qtbase (namely to mkspecs/features/qt_docs.prf).
➖: Clang emits more warnings when used with the GCC standard library.
    I don‘t know how reliable such a combination is, maybe in future some of
    these warnings will become errors.

For now I went with choice 2, but my changes need to be reverted anyway,
as it is better when the logic is at runtime (in the .prf file).

Alternatively, we can modify choice 1 and move the clang detection logic from
build-time to run-time. However to make that possible, qdoc will need to
depend on llvm package because it provides llvm-config executable. This is a
larger build dependency: in a clean chroot installing libclang-common-6.0-dev
will use 140 MB of disk space, but installing llvm + clang will use 205 MB of
space.

[1]: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/blob/7/debian/patches/force-gcc-header-obj.diff
[2]: https://code.qt.io/cgit/qt/qttools.git/tree/src/qdoc/qdoc.pro?h=5.11#n19
[3]: https://salsa.debian.org/qt-kde-team/qt/qttools/blob/master/debian/patches/qdoc_gcc_includepath.diff

--
Dmitry Shachnev

Attachment: signature.asc
Description: PGP signature


Reply to: