Bug 1432403

Summary: regression: build-id is no longer produced by default
Product: [Fedora] Fedora Reporter: Jan Kratochvil <jan.kratochvil>
Component: clangAssignee: Tom Stellard <tstellar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: airlied, davejohansen, jakub, jan.kratochvil, mahmudulhaque, mpolacek, sbergman, tstellar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: clang-3.9.1-2.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-21 22:56:04 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 Jan Kratochvil 2017-03-15 10:23:47 UTC
Description of problem:
Since clang 3.8->3.9 upgrade build-id is no longer produced by default.

Version-Release number of selected component (if applicable):
FAIL clang-3.9.1-1.fc25.x86_64
PASS clang-3.8.1-1.fc25.x86_64

How reproducible:
Always

Steps to Reproduce:
echo 'int main(){}'|gcc                  -x c -;readelf -n a.out|grep NT_GNU_BUILD_ID
echo 'int main(){}'|clang                -x c -;readelf -n a.out|grep NT_GNU_BUILD_ID
echo 'int main(){}'|clang -Wl,--build-id -x c -;readelf -n a.out|grep NT_GNU_BUILD_ID

Actual results:
  GNU                  0x00000014	NT_GNU_BUILD_ID (unique build ID bitstring)
<nothing>
  GNU                  0x00000014	NT_GNU_BUILD_ID (unique build ID bitstring)

Expected results:
  GNU                  0x00000014	NT_GNU_BUILD_ID (unique build ID bitstring)
  GNU                  0x00000014	NT_GNU_BUILD_ID (unique build ID bitstring)
  GNU                  0x00000014	NT_GNU_BUILD_ID (unique build ID bitstring)

Additional info:
I do not have available F-25 with older clang and it is uneasy to downgrade due to all the dependencies.

Comment 1 Tom Stellard 2017-03-15 10:46:24 UTC
I'm not really familiar with build-id, what is the advantage of having it enabled?  Upstream disabled it by default for performance reasons.

Comment 2 Jan Kratochvil 2017-03-15 11:34:26 UTC
build-id is definitely required for binaries in rpms at least for debuginfo installation.  Other features in ABRT are also dependent on it nowadays.  But that would be easily achievable in /usr/lib/rpm/redhat/macros .

Upstream GCC (also) does not default to -Wl,--build-id.  Fedora GCC does default to -Wl,--build-id.  I do not know why.

Therefore I think Fedora clang should default to -Wl,--build-id to be as much compatible as gcc as possible.  The other possibility is to remove default -Wl,--build-id from gcc.  I do not mind either.

Some applications now require their build-id at runtime but I find OK those applications should explicitly request -Wl,--build-id in their Makefiles.

Comment 3 Fedora Update System 2017-03-16 18:54:52 UTC
clang-3.9.1-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-b12f9264a6

Comment 4 Fedora Update System 2017-03-16 19:01:31 UTC
clang-3.9.1-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-9ec8654bf9

Comment 5 Fedora Update System 2017-03-17 02:20:27 UTC
clang-3.9.1-2.fc26 has been pushed to the Fedora 26 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-2017-9ec8654bf9

Comment 6 Fedora Update System 2017-03-17 20:25:57 UTC
clang-3.9.1-2.fc25 has been pushed to the Fedora 25 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-2017-b12f9264a6

Comment 7 Fedora Update System 2017-03-21 22:56:04 UTC
clang-3.9.1-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2017-04-04 16:02:48 UTC
clang-3.9.1-2.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.