Bug 1401228

Summary: Missing symbol versioning in dynamic libraries
Product: [Fedora] Fedora Reporter: Lukas Slebodnik <lslebodn>
Component: redhat-rpm-configAssignee: Florian Festi <ffesti>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: rawhideCC: awilliam, dzickus, ffesti, jonathan, jpazdziora, pmatilai, praiskup, rdieter
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-09 21:37: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:

Description Lukas Slebodnik 2016-12-03 18:08:16 UTC
Description of problem:
Dynamic libraries does not contain version symbols after recent upgrade of redhat-rpm-config.

Version-Release number of selected component (if applicable):
redhat-rpm-config-60-1.fc26

How reproducible:
Deterministic

Steps to Reproduce:
1. wget https://kojipkgs.fedoraproject.org//packages/libtalloc/2.1.8/1.fc25/src/libtalloc-2.1.8-1.fc25.src.rpm
2. dnf install -y 'dnf-command(builddep)'
3. dnf builddep -y libtalloc-2.1.8-1.fc25.src.rpm
4. rm -rf ~/rpmbuild/
5. rpmbuild --rebuild libtalloc-2.1.8-2.fc26.src.rpm
6. rpm -qp --provides ~/rpmbuild/RPMS/x86_64/libtalloc-2.1.8-2.fc26.x86_64.rpm
 
Actual results:
bundled(libreplace)
libtalloc = 2.1.8-2.fc26
libtalloc(x86-64) = 2.1.8-2.fc26
libtalloc.so.2()(64bit)

Expected results:
bundled(libreplace)
libtalloc = 2.1.8-2.fc26
libtalloc(x86-64) = 2.1.8-2.fc26
libtalloc.so.2()(64bit)
libtalloc.so.2(TALLOC_2.0.2)(64bit)
libtalloc.so.2(TALLOC_2.0.3)(64bit)
libtalloc.so.2(TALLOC_2.0.4)(64bit)
libtalloc.so.2(TALLOC_2.0.5)(64bit)
libtalloc.so.2(TALLOC_2.0.6)(64bit)
libtalloc.so.2(TALLOC_2.0.7)(64bit)
libtalloc.so.2(TALLOC_2.0.8)(64bit)
libtalloc.so.2(TALLOC_2.1.0)(64bit)
libtalloc.so.2(TALLOC_2.1.1)(64bit)
libtalloc.so.2(TALLOC_2.1.2)(64bit)
libtalloc.so.2(TALLOC_2.1.3)(64bit)
libtalloc.so.2(TALLOC_2.1.4)(64bit)
libtalloc.so.2(TALLOC_2.1.5)(64bit)
libtalloc.so.2(TALLOC_2.1.6)(64bit)
libtalloc.so.2(TALLOC_2.1.7)(64bit)
libtalloc.so.2(TALLOC_2.1.8)(64bit)

Comment 1 Lukas Slebodnik 2016-12-03 18:32:51 UTC
FYI, here is a change between -59 and -60
diff -u -r 59/usr/lib/rpm/redhat/macros 60/usr/lib/rpm/redhat/macros
--- 59/usr/lib/rpm/redhat/macros        2016-12-03 19:11:47.961580325 +0100
+++ 60/usr/lib/rpm/redhat/macros        2016-12-03 19:11:58.676645157 +0100
@@ -147,7 +147,7 @@
 
 %__global_compiler_flags       -O2 -g -pipe -Wall -Werror=format-security -Wp,-_hardened_cflags}
 
-%__global_cflags       %{optflags}
+%__global_cflags       %{optflags} -Werror=implicit-function-declaration -Werro
 %__global_cxxflags     %{optflags}
 %__global_fflags       %{optflags} -I%_fmoddir
 %__global_fcflags      %{optflags} -I%_fmoddir


Extra compiler error flags caused that -Wl,--version was not recognized by some build systems. The detection should be fixed in all affected packages. So feel free to close this bug.

Comment 2 Rex Dieter 2016-12-06 23:33:57 UTC
For posterity, if these extra -Werror flags were defined by their own macro, then it would be easier for packages to opt-out of them.

maybe something like:

%__global_cflags_werror  -Werror=implicit-function-declaration ...

%__global_cflags       %{optflags} %{?__global_cflags_werror}

Comment 3 Adam Williamson 2016-12-07 07:15:23 UTC
The macro change has been reverted for now, and ldb and tdb rebuilt to get their symbols back. Next compose should work OK.

Comment 4 Lukas Slebodnik 2016-12-08 09:19:24 UTC
*** Bug 1402275 has been marked as a duplicate of this bug. ***