Bug 1547444

Summary: clang package should Provides: clang(major) = <MAJOR>
Product: [Fedora] Fedora Reporter: Richard W.M. Jones <rjones>
Component: clangAssignee: Tom Stellard <tstellar>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: airlied, davejohansen, extras-qa, fabiang, nmavrogi, p, ravnzon, rjones, sbergman, siddharth.kde, tstellar
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: clang-6.0.0-2.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1544964 Environment:
Last Closed: 2018-03-13 22:19:14 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:
Bug Depends On:    
Bug Blocks: 1544964    

Description Richard W.M. Jones 2018-02-21 10:43:48 UTC
+++ This bug was initially created as a clone of Bug #1544964 +++

American Fuzzy Lop recently broken when clang 5 was pushed to Fedora 27.
Apparently clang is not binary compatible between major releases.

Unfortunately it seems as if the clang package doesn't export
any 'clang(major)' symbol as is the case with GCC:

$ rpm -q --provides -f /usr/bin/clang
clang = 6.0.0-0.4.rc1.fc28
clang(x86-64) = 6.0.0-0.4.rc1.fc28

$ rpm -q --provides -f /usr/bin/gcc
bundled(libiberty)
gcc = 7.2.1-6.fc28
gcc(major) = 7           <---------
gcc(x86-64) = 7.2.1-6.fc28
liblto_plugin.so.0()(64bit)

If we had ‘clang(major)’ we could depend on the specific version we were
built against and prevent this problem silently reoccurring in future.

Comment 1 Tom Stellard 2018-02-21 15:05:24 UTC
Can you provide more information about how it fails?  Looking at the generated REQUIRES from rpm, I don't see a run-time dependency on either clang or llvm

Comment 2 Richard W.M. Jones 2018-02-21 15:23:59 UTC
The error is here:

https://bugzilla.redhat.com/show_bug.cgi?id=1547414#c0

The dependencies are in the -clang subpackage, see:

https://koji.fedoraproject.org/koji/rpminfo?rpmID=13101853

Because the dependencies cannot express that we really depend on
a specific major version number of clang, it will break next time
clang is upgraded to a new major release.

Comment 3 Richard W.M. Jones 2018-02-21 15:24:45 UTC
Actually I think it's -clang-fast:

https://koji.fedoraproject.org/koji/rpminfo?rpmID=13101854

Comment 4 Tom Stellard 2018-03-13 22:19:14 UTC
This has been fixed in rawhide: clang-6.0.0-2.fc29

Comment 5 Richard W.M. Jones 2018-03-14 12:53:34 UTC
Thanks, corresponding change made to afl:

https://src.fedoraproject.org/rpms/american-fuzzy-lop/c/69a0278c75fe0eb918e5068ae0fda1455bfeb185?branch=master