See attached build.log CMake Error at cmake/modules/FindClang.cmake:113 (message): Could not find Clang builtin directory Call Stack (most recent call first): plugins/CMakeLists.txt:39 (find_package) Reproducible: Always Steps to Reproduce: 1. emerge --sync 2. emerge -auvDN world Actual Results: Failed to build Expected Results: Not to fail
Created attachment 858261 [details] build.log
Created attachment 858263 [details] emerge -pqv '=dev-util/kdevelop-22.12.3::gentoo'
Created attachment 858265 [details] emerge --info '=dev-util/kdevelop-22.12.3::gentoo'
I had the same problem after upgrading llvm and clang to 16.0, Not sure what the actual problem is, but i worked around this temporarily by hardcoding the dir with all the builtin* files (/usr/lib/llvm/16/include/clang/Basic for me) into the corresponding cmake file of kdevelop. See attached patch
Created attachment 858355 [details, diff] hardcode CLANG_BUILTIN_DIR
This needs to use llvm.eclass instead.
Created attachment 858505 [details, diff] Fix build with x.0.0 versions of llvm The problem is dumb. The cmake looks for cpuid.h in directory ../../../clang/${CLANG_VERSION}/include, where CLANG_VERSION is 16.0.0. But the headers are in the ../../../clang/16/include directory. This error occurs only for versions like x.0.0. I'm attaching the patch, but it needs to be tested for rc, pre and git versions of llvm.
Created attachment 858575 [details, diff] Fix build with x.0.0 versions of llvm (In reply to Michael Uleysky from comment #7) > The problem is dumb. The cmake looks for cpuid.h in directory > ../../../clang/${CLANG_VERSION}/include, where CLANG_VERSION is 16.0.0. But > the headers are in the ../../../clang/16/include directory. This error > occurs only for versions like x.0.0. I'm attaching the patch, but it needs > to be tested for rc, pre and git versions of llvm. This worked fine for 16.0.0.9999 (llvm-config --version = 16.0.0) but not for 17.0.0_pre20230314 (llvm-config --version = 17.0.0git4bf004e0) For that i changed the svn/git replace lines to a regex that also matches everything after the keyword and kept your changes. That worked on both the 9999 and pre version. no rc version in tree for me to test with. Uploading yet another patch keeping your name.
Comment on attachment 858505 [details, diff] Fix build with x.0.0 versions of llvm cpfuhl, thanks for testing and updating.
*** Bug 902815 has been marked as a duplicate of this bug. ***
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=51211f99f14f80bc92049cbbf1717a39c50887b2 commit 51211f99f14f80bc92049cbbf1717a39c50887b2 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-03-26 22:55:54 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-03-26 22:56:52 +0000 dev-util/kdevelop: fix build with Clang 16, use llvm.eclass Closes: https://bugs.gentoo.org/902101 Thanks-to: Michael Uleysky <uleysky@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> .../kdevelop/files/kdevelop-22.12.3-clang16.patch | 24 ++++++++++++++++++++++ ...p-22.12.3.ebuild => kdevelop-22.12.3-r1.ebuild} | 18 ++++++++++------ 2 files changed, 36 insertions(+), 6 deletions(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/proj/kde.git/commit/?id=856936687150763b48e5d59e94d2f02761ceb593 commit 856936687150763b48e5d59e94d2f02761ceb593 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-03-26 22:58:36 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-03-26 22:58:36 +0000 dev-util/kdevelop: fix build with Clang 16, use llvm.eclass Closes: https://bugs.gentoo.org/902101 Thanks-to: Michael Uleysky <uleysky@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> dev-util/kdevelop/kdevelop-23.03.80.ebuild | 18 ++++++++++++------ dev-util/kdevelop/kdevelop-23.04.49.9999.ebuild | 18 ++++++++++++------ dev-util/kdevelop/kdevelop-9999.ebuild | 18 ++++++++++++------ 3 files changed, 36 insertions(+), 18 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/kde.git/commit/?id=2baa6d7fd846f14129d04312728744013acea492 commit 2baa6d7fd846f14129d04312728744013acea492 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-03-26 23:22:59 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-03-26 23:23:09 +0000 dev-util/kdevelop: add missing patch Bug: https://bugs.gentoo.org/902101 Fixes: 856936687150763b48e5d59e94d2f02761ceb593 Signed-off-by: Sam James <sam@gentoo.org> .../kdevelop/files/kdevelop-22.12.3-clang16.patch | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/kde.git/commit/?id=4452c53936e4eb6df13f7b28961b4b4857420c85 commit 4452c53936e4eb6df13f7b28961b4b4857420c85 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-03-29 13:31:48 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-03-29 13:32:25 +0000 dev-util/kdevelop: drop obsolete clang 16 patch Fixed upstream in 1a92bed73ae31e6f90c3bffe455f8e3c46ac4905 by using the proper FindClang module. Fixed on both the 23.03 branch & master. Bug: https://bugs.gentoo.org/902101 Signed-off-by: Sam James <sam@gentoo.org> .../kdevelop/files/kdevelop-22.12.3-clang16.patch | 24 ---------------------- dev-util/kdevelop/kdevelop-23.03.80.ebuild | 4 ---- dev-util/kdevelop/kdevelop-23.04.49.9999.ebuild | 4 ---- dev-util/kdevelop/kdevelop-9999.ebuild | 4 ---- 4 files changed, 36 deletions(-)
*** Bug 878549 has been marked as a duplicate of this bug. ***