Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1667694

Summary: Clang plugin broken after clang 7.0.1 update due to hardcoded include path (patch available)
Product: [Fedora] Fedora Reporter: Andrew Gunnerson <accounts+fedora>
Component: kdevelopAssignee: Than Ngo <than>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 29CC: accounts+fedora, jgrulich, kde-sig, me, mwoehlke.floss, rdieter, smparrish, than
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kdevelop-5.3.1-2.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-13 02:46:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrew Gunnerson 2019-01-20 02:08:58 UTC
Description of problem:

KDevelop 5.3.1 determines clang's include path at built time and the path is hardcoded into the executable. This makes it impossible for clang to be updated without rebuilding kdevelop too. The recent clang 7.0.1 update broke the clang plugin because it was compiled with 7.0.0 and contains a hardcoded path:

---
$ strings /usr/lib64/libKDevClangPrivate.so.31 | grep 7.0.0
/usr/lib64/clang/7.0.0/include
---

The upstream 'master' branch of kdevelop includes the following patch to determine the include path at runtime. Could this be added to the Fedora package?

https://github.com/KDE/kdevelop/commit/41a0f0ce51979363c795919e00f914048d61326e

Version-Release number of selected component (if applicable):

kdevelop-5.3.1-1.fc29.x86_64
kdevelop-libs-5.3.1-1.fc29.x86_64
clang-7.0.1-1.fc29.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Install the versions mentioned above
2. Run "QT_LOGGING_RULES='kdevelop.plugins.clang=true' kdevelop" in a terminal

Actual results:

Clang plugin fails with debug output:

---
kdevelop.plugins.clang: Detected Clang version: "7.0.1"
kdevplatform.shell: Could not load plugin "kdevclangsupport" , it reported the error: "The clang builtin include path \"/usr/lib64/clang/7.0.0/include\" is invalid (missing cpuid.h header).\nTry setting the KDEV_CLANG_BUILTIN_DIR environment variable manually to fix this.\nSee also: https://bugs.kde.org/show_bug.cgi?id=393779" Disabling the plugin now.
---

Expected results:

The plugin should load successfully.

Comment 1 Fedora Update System 2019-01-31 06:56:08 UTC
kdevelop-5.3.1-2.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-d839cb3b57

Comment 2 Fedora Update System 2019-02-01 03:26:04 UTC
kdevelop-5.3.1-2.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-d839cb3b57

Comment 3 Jan Grulich 2019-02-04 08:13:12 UTC
*** Bug 1671495 has been marked as a duplicate of this bug. ***

Comment 4 Fedora Update System 2019-02-13 02:46:52 UTC
kdevelop-5.3.1-2.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.