Bug 751466

Summary: clthreads: undefined non-weak symbol "clock_gettime"
Product: [Fedora] Fedora Reporter: Jerry James <loganjerry>
Component: clthreadsAssignee: Brendan Jones <brendan.jones.it>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: rawhideCC: brendan.jones.it, nando
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: clthreads-2.4.0-7.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-23 23:29:25 UTC Type: ---
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: 749753    

Description Jerry James 2011-11-04 20:02:32 UTC
Description of problem:
$ rpmlint clthreads
clthreads.x86_64: W: undefined-non-weak-symbol /usr/lib64/libclthreads.so.2.4.0 clock_gettime
clthreads.x86_64: W: unused-direct-shlib-dependency /usr/lib64/libclthreads.so.2.4.0 linux-vdso.so.1
clthreads.x86_64: W: unused-direct-shlib-dependency /usr/lib64/libclthreads.so.2.4.0 /lib64/libm.so.6

This means that libclthreads should be linked with "-lrt" in addition to "-lpthreads".  *Not* linking against libm would be great, too.

Version-Release number of selected component (if applicable):
clthreads-2.4.0-5.fc15.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install clthreads
2. Run "rpmlint clthreads"
3.
  
Actual results:
rpmlint complains about an undefined non-weak symbol

Expected results:
No undefined non-weak symbols.

Additional info:
The practical upshot of this is that clthreads clients have to link with both -lclthreads and -lrt to satisfy the clock_gettime reference.  They should be able to link with just -lclthreads.

Comment 1 Brendan Jones 2011-11-04 22:12:18 UTC
Thanks for the heads up. This is fixed and built in rawhide.

Also, taking note of bug 738082 regarding the linux-vdso warning

http://koji.fedoraproject.org/koji/buildinfo?buildID=272428

diff --git a/clthreads.spec b/clthreads.spec
index fcd68ec..f491475 100644
--- a/clthreads.spec
+++ b/clthreads.spec
@@ -3,7 +3,7 @@
 Summary:       POSIX threads C++ access library
 Name:          clthreads
 Version:       2.4.0
-Release:       5%{?dist}
+Release:       6%{?dist}
 License:       LGPLv2+
 Group:         System Environment/Libraries
 URL:           http://www.kokkinizita.net/linuxaudio/
@@ -31,6 +31,8 @@ sed -i '\|/sbin/ldconfig|d' Makefile
 
 # Preserve timestamps
 sed -i 's|/install|/install -p|' Makefile
+# fix romlint warnings BZ#751466
+sed -i -e 's|-lpthread|-lpthread -lrt|' -e 's! -shared ! -Wl,--as-needed\0!g' Makefile
 
 %build
 export CPPFLAGS="%{optflags}"
@@ -63,6 +65,10 @@ rm -rf %{buildroot}
 %{_libdir}/lib%{name}.so
 
 %changelog
+* Fri Oct 04 2011 Brendan Jones <brendan.s.jones.it> - 2.4.0-6
+- Corrected rpmlint 'undefined-non-weak-symbol /usr/lib64/libclthreads.so.2.4.0
+clock_gettime' and unused-direct-shlib-dependency for libm - BZ#751466
+
 * Tue Feb 08 2011 Fedora Release Engineering <rel-eng.org> - 2.4.0-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

Comment 2 Fedora Update System 2011-11-12 07:59:03 UTC
clthreads-2.4.0-7.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/clthreads-2.4.0-7.fc16

Comment 3 Fedora Update System 2011-11-13 05:34:31 UTC
Package clthreads-2.4.0-7.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing clthreads-2.4.0-7.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-15848
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2011-11-23 23:29:25 UTC
clthreads-2.4.0-7.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2011-12-13 23:03:38 UTC
clthreads-2.4.0-7.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/clthreads-2.4.0-7.fc15

Comment 6 Fedora Update System 2011-12-24 20:52:39 UTC
clthreads-2.4.0-7.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.