Detection of Clang fails and appropriate options (e.g. -I/usr/lib64/llvm/7/include and -L/usr/lib64/llvm/7/lib64) are not passed to compiler: >>> Configuring source in /var/tmp/portage/dev-qt/qdoc-5.12.9999/work/qdoc-5.12.9999 ... * Running qt5_qmake in src/qdoc Info: creating stash file /var/tmp/portage/dev-qt/qdoc-5.12.9999/work/qdoc-5.12.9999_build/.qmake.stash /var/tmp/portage/dev-qt/qdoc-5.12.9999/work/qdoc-5.12.9999/src/qdoc/qdoc.pro:1: Cannot find feature qt_find_clang Cannot read /var/tmp/portage/dev-qt/qdoc-5.12.9999/work/qdoc-5.12.9999_build/src/qdoc/qtqdoc-config.pri: No such file or directory >>> Source configured. >>> Compiling source in /var/tmp/portage/dev-qt/qdoc-5.12.9999/work/qdoc-5.12.9999 ... * Running emake in src/qdoc make x86_64-pc-linux-gnu-g++ -c -march=native -O2 -fno-ident -frecord-gcc-switches -fstack-clash-protection -fstack-protector-all -mfunction-return=thunk -mindirect-branch=thunk -mindirect-branch-register -pipe -Wall -Werror=terminate -std=c++1z -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -D_REENTRANT -fPIC -D'CLANG_RESOURCE_DIR="/clang//include"' -DQDOC2_COMPAT -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_USE_QSTRINGBUILDER -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_QMLDEVTOOLS_LIB -DQT_CORE_LIB -I/var/tmp/portage/dev-qt/qdoc-5.12.9999/work/qdoc-5.12.9999/src/qdoc -I. -I/src/tools/qdoc -I/src/tools/qdoc/qmlparser -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtQml -isystem /usr/include/qt5/QtQml/5.12.2 -isystem /usr/include/qt5/QtQml/5.12.2/QtQml -isystem /usr/include/qt5/QtCore/5.12.2 -isystem /usr/include/qt5/QtCore/5.12.2/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I/usr/lib64/qt5/mkspecs/linux-g++ -o .obj/atom.o /var/tmp/portage/dev-qt/qdoc-5.12.9999/work/qdoc-5.12.9999/src/qdoc/atom.cpp x86_64-pc-linux-gnu-g++ -c -march=native -O2 -fno-ident -frecord-gcc-switches -fstack-clash-protection -fstack-protector-all -mfunction-return=thunk -mindirect-branch=thunk -mindirect-branch-register -pipe -Wall -Werror=terminate -std=c++1z -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -D_REENTRANT -fPIC -D'CLANG_RESOURCE_DIR="/clang//include"' -DQDOC2_COMPAT -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_USE_QSTRINGBUILDER -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_QMLDEVTOOLS_LIB -DQT_CORE_LIB -I/var/tmp/portage/dev-qt/qdoc-5.12.9999/work/qdoc-5.12.9999/src/qdoc -I. -I/src/tools/qdoc -I/src/tools/qdoc/qmlparser -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtQml -isystem /usr/include/qt5/QtQml/5.12.2 -isystem /usr/include/qt5/QtQml/5.12.2/QtQml -isystem /usr/include/qt5/QtCore/5.12.2 -isystem /usr/include/qt5/QtCore/5.12.2/QtCore -isystem /usr/include/qt5/QtCore -I.moc -I/usr/lib64/qt5/mkspecs/linux-g++ -o .obj/clangcodeparser.o /var/tmp/portage/dev-qt/qdoc-5.12.9999/work/qdoc-5.12.9999/src/qdoc/clangcodeparser.cpp /var/tmp/portage/dev-qt/qdoc-5.12.9999/work/qdoc-5.12.9999/src/qdoc/clangcodeparser.cpp:59:10: fatal error: clang-c/Index.h: No such file or directory #include <clang-c/Index.h> ^~~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:782: .obj/clangcodeparser.o] Error 1 * ERROR: dev-qt/qdoc-5.12.9999::qt failed (compile phase): * emake failed Since commit e181ec2c20ede6b878187f3123d190e8b952deb1: https://code.qt.io/cgit/qt/qttools.git/commit/?id=e181ec2c20ede6b878187f3123d190e8b952deb1 "Port qdoc's libclang detection to the configure system" Dropping this obsolete part of ebuild would fix the "Cannot find feature qt_find_clang" error (in src_configure()): # this is normally loaded in qttools.pro, so skipped by using # QT_TARGET_SUBDIRS causing build to fail sed -e '1iload(qt_find_clang)\' -i src/qdoc/qdoc.pro || die
Here's something I was testing with, and with which I got 5.13.9999 to compile (though it's probably far from an actual fix): src_configure() { # Bug 633776(?) mkdir -p "${QT5_BUILD_DIR}"/src/qdoc || die qt5_qmake "${WORKDIR}/${P}" mv "${WORKDIR}/${P}"/src/qdoc/qtqdoc-config.pri "${QT5_BUILD_DIR}"/src/qdoc || die qt5-build_src_configure } Not sure yet why 'qtqdoc-config.pri' is being generated in the source dir, instead of the build dir (live ebuild). That's different from, for example, 'qtgui' (couldn't spot if it's something due to 'qtbase'). To have it generated, 'qmake' needs to happen in the root source dir from the looks of it. As a side note, in the mentioned bug 633776, "QT_BUILD_DIR" seems to end up being empty... I wonder if that was meant to be "QT5_BUILD_DIR" too.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/qt.git/commit/?id=7e9c2afe9ebaefd10c539abf14496650b8bc7bb9 commit 7e9c2afe9ebaefd10c539abf14496650b8bc7bb9 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2019-02-05 20:35:52 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2019-02-05 20:35:52 +0000 dev-qt/qdoc: Fix build Upstream commit e181ec2c20ede6b878187f3123d190e8b952deb1 Reported-by: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com> Thanks-to: Jimi Huotari <chiitoo@gentoo.org> Bug: https://bugs.gentoo.org/676948 Package-Manager: Portage-2.3.59, Repoman-2.3.12 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> dev-qt/qdoc/qdoc-5.12.1.ebuild | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
dev-qt/qdoc-5.12.9999, dev-qt/qdoc-5.13.9999 and dev-qt/qdoc-5.9999 are still broken.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/proj/qt.git/commit/?id=22dc1a6b170ab0dffd62fc45d5c022636ecdb611 commit 22dc1a6b170ab0dffd62fc45d5c022636ecdb611 Author: Michael Palimaka <kensington@gentoo.org> AuthorDate: 2019-05-18 05:57:31 +0000 Commit: Michael Palimaka <kensington@gentoo.org> CommitDate: 2019-05-18 05:57:53 +0000 dev-qt/qdoc: sync with main tree Closes: https://bugs.gentoo.org/676948 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Michael Palimaka <kensington@gentoo.org> dev-qt/qdoc/qdoc-5.12.9999.ebuild | 15 +++++++++------ dev-qt/qdoc/qdoc-5.13.9999.ebuild | 13 ++++++++----- dev-qt/qdoc/qdoc-5.9999.ebuild | 15 +++++++++------ 3 files changed, 26 insertions(+), 17 deletions(-)
Still broken: ... * Running qt5_qmake in src/qdoc Info: creating stash file /var/tmp/portage/dev-qt/qdoc-5.12.9999/work/qdoc-5.12.9999_build/.qmake.stash Cannot read /var/tmp/portage/dev-qt/qdoc-5.12.9999/work/qdoc-5.12.9999_build/src/qdoc/qtqdoc-config.pri: No such file or directory >>> Source configured. >>> Compiling source in /var/tmp/portage/dev-qt/qdoc-5.12.9999/work/qdoc-5.12.9999 ... * Running emake in src/qdoc ... /var/tmp/portage/dev-qt/qdoc-5.12.9999/work/qdoc-5.12.9999/src/qdoc/clangcodeparser.cpp:59:10: fatal error: clang-c/Index.h: No such file or directory #include <clang-c/Index.h> ^~~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:530: .obj/clangcodeparser.o] Error 1
I have found relevant difference which causes that this problem occurs for live ebuilds, but not for release ebuilds. qt5-build.eclass contains: [[[ # @ECLASS-VARIABLE: QT5_BUILD_DIR # @OUTPUT_VARIABLE # @DESCRIPTION: # Build directory for out-of-source builds. case ${QT5_BUILD_TYPE} in live) : ${QT5_BUILD_DIR:=${S}_build} ;; release) : ${QT5_BUILD_DIR:=${S}} ;; # workaround for bug 497312 esac ]]] Setting QT5_BUILD_DIR="${S}" in all ebuilds of dev-qt/qdoc avoids this problem.
Created attachment 600464 [details, diff] Patch
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #6) > Setting QT5_BUILD_DIR="${S}" in all ebuilds of dev-qt/qdoc avoids this > problem. That's just a workaround, what is the actual root cause of this build failure? It seems to me it could be an upstream issue, Qt is supposed to be buildable out-of-source. That being said, I'd be ok with always setting QT5_BUILD_DIR=$S in the eclass, to make live ebuilds more similar to release ebuilds. OTOH, we should probably revisit bug 497312, it looks like a fix was commit upstream for 5.11.1 and the workaround might no longer be needed.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/qt.git/commit/?id=cc96b86ca21b3b08a503e0394f50ea658597b5be commit cc96b86ca21b3b08a503e0394f50ea658597b5be Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2020-04-08 15:57:13 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2020-04-09 18:33:32 +0000 dev-qt/qdoc: Fix out-of-source build Thanks-to: Jimi Huotari <chiitoo@gentoo.org> Bug: https://bugs.gentoo.org/676948 Package-Manager: Portage-2.3.97, Repoman-2.3.22 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> dev-qt/qdoc/qdoc-5.14.9999.ebuild | 1 + 1 file changed, 1 insertion(+) https://gitweb.gentoo.org/proj/qt.git/commit/?id=548df2493d9801b2503f412ec8c424418cb7721b commit 548df2493d9801b2503f412ec8c424418cb7721b Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2020-03-31 12:21:16 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2020-04-09 18:32:31 +0000 qt5-build.eclass: Drop obsolete in-source build workaround for >=5.14.2 Fixed upstream in 5.11.1. See also: https://bugreports.qt.io/browse/QTBUG-37417 Upstream commit 67aa365d41ebfe082b4efcfd725e4d5f08be678c qtbase forwarding header was introduced to fix bug 599636 in commit: d82f92ed064996dfb187ef668d74ed5b05546b2d Bug: https://bugs.gentoo.org/497312 Bug: https://bugs.gentoo.org/676948 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> eclass/qt5-build.eclass | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f97fded3a21803c278e3dc6478327e43ee7f354 commit 9f97fded3a21803c278e3dc6478327e43ee7f354 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2020-03-31 12:21:16 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2020-04-09 21:36:27 +0000 qt5-build.eclass: Drop obsolete in-source build workaround for >=5.14.2 Fixed upstream in 5.11.1. See also: https://bugreports.qt.io/browse/QTBUG-37417 Upstream commit 67aa365d41ebfe082b4efcfd725e4d5f08be678c qtbase forwarding header was introduced to fix bug 599636 in commit: d82f92ed064996dfb187ef668d74ed5b05546b2d Closes: https://bugs.gentoo.org/676948 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> eclass/qt5-build.eclass | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/qt.git/commit/?id=e86f6c527e9371790330a0f6aac4fa5c2baecf44 commit e86f6c527e9371790330a0f6aac4fa5c2baecf44 Author: Jimi Huotari <chiitoo@gentoo.org> AuthorDate: 2020-04-07 12:37:04 +0000 Commit: Jimi Huotari <chiitoo@gentoo.org> CommitDate: 2020-04-09 22:15:35 +0000 dev-qt: fix 5.15 configure for qttools modules Upstream added configure features for more qttools [1], which requires similar workarounds for out-of-source builds that have been used for some of the modules for a time already. 1. https://code.qt.io/cgit/qt/qttools.git/commit/?h=5.15&id=50ef2ac2 Bug: https://bugs.gentoo.org/633776 Bug: https://bugs.gentoo.org/676948 Closes: https://bugs.gentoo.org/716514 Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Jimi Huotari <chiitoo@gentoo.org> dev-qt/designer/designer-5.15.0_beta3.ebuild | 10 ++++++++++ dev-qt/designer/designer-5.15.9999.ebuild | 10 ++++++++++ dev-qt/linguist-tools/linguist-tools-5.15.0_beta3.ebuild | 10 ++++++++++ dev-qt/linguist-tools/linguist-tools-5.15.9999.ebuild | 10 ++++++++++ dev-qt/pixeltool/pixeltool-5.15.0_beta3.ebuild | 10 ++++++++++ dev-qt/pixeltool/pixeltool-5.15.9999.ebuild | 10 ++++++++++ dev-qt/qdoc/qdoc-5.15.0_beta3.ebuild | 1 + dev-qt/qdoc/qdoc-5.15.9999.ebuild | 1 + dev-qt/qtdiag/qtdiag-5.15.0_beta3.ebuild | 10 ++++++++++ dev-qt/qtdiag/qtdiag-5.15.9999.ebuild | 10 ++++++++++ dev-qt/qtpaths/qtpaths-5.15.0_beta3.ebuild | 10 ++++++++++ dev-qt/qtpaths/qtpaths-5.15.9999.ebuild | 10 ++++++++++ dev-qt/qtplugininfo/qtplugininfo-5.15.0_beta3.ebuild | 10 ++++++++++ dev-qt/qtplugininfo/qtplugininfo-5.15.9999.ebuild | 10 ++++++++++ 14 files changed, 122 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89ddffa778cd820c43b5ab18bb03e914008b29e4 commit 89ddffa778cd820c43b5ab18bb03e914008b29e4 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2020-05-30 20:35:12 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2020-05-30 20:46:00 +0000 qt5-build.eclass: Drop obsolete pre-Qt-5.14.2 quirks Bug: https://bugs.gentoo.org/676948 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> eclass/qt5-build.eclass | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/qt.git/commit/?id=c5a8bc30c940374a54bac471f8c116c14448c9cf commit c5a8bc30c940374a54bac471f8c116c14448c9cf Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2020-05-30 20:35:12 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2020-06-01 08:50:14 +0000 qt5-build.eclass: Drop obsolete pre-Qt-5.14.2 quirks Bug: https://bugs.gentoo.org/676948 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> eclass/qt5-build.eclass | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/qt.git/commit/?id=2cb28882af7a98143b6bacedfa6e1f420d4b8c25 commit 2cb28882af7a98143b6bacedfa6e1f420d4b8c25 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2021-09-05 15:43:27 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2021-09-05 18:23:36 +0000 dev-qt/qdoc: Fix out-of-source build in subdir again Bug: https://bugs.gentoo.org/676948 Package-Manager: Portage-3.0.22, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> dev-qt/qdoc/qdoc-5.15.9999.ebuild | 9 +++++++++ 1 file changed, 9 insertions(+)