Bug 751466 - clthreads: undefined non-weak symbol "clock_gettime"
Summary: clthreads: undefined non-weak symbol "clock_gettime"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: clthreads
Version: rawhide
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Brendan Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 749753
TreeView+ depends on / blocked
 
Reported: 2011-11-04 20:02 UTC by Jerry James
Modified: 2011-12-24 20:52 UTC (History)
2 users (show)

Fixed In Version: clthreads-2.4.0-7.fc15
Clone Of:
Environment:
Last Closed: 2011-11-23 23:29:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.