Bug 1037707

Summary: failure to link against libmemcached
Product: [Fedora] Fedora Reporter: Ruben Kerkhof <ruben>
Component: libmemcachedAssignee: Remi Collet <fedora>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: fedora, jorton, mlichvar, rh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libmemcached-1.0.16-2.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-23 03:44:31 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:
Attachments:
Description Flags
Fix linking against libpthread none

Description Ruben Kerkhof 2013-12-03 15:58:40 UTC
Created attachment 832188 [details]
Fix linking against libpthread

Description of problem:

Somewhere between libmemcached-1.0.8 and libmemcached-1.0.16 libmemcached.so stopped to link to libpthread properly.
This turns out to be a bug in libtool (#661333), or gcc depending on how you look at it.

The following code works with libmemcached-1.0.8:
[root@vm ~]# cat test.c 
#include <libmemcached/memcached.h>

int main()
{
	memcached_st ms;
	memcached_create(&ms);
	return 0;
}
[root@vm ~]# gcc -o test test.c -lmemcached

And returns an error with libmemcached-1.0.16:
[root@vm ~]# gcc -o test test.c -lmemcached
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../lib64/libmemcached.so: undefined reference to `pthread_once'
collect2: error: ld returned 1 exit status

I've attached a patch which works around bug #661333. I'd appreciate it if you can apply the patch so I can enable the memcachec plugin in collectd.

Comment 1 Remi Collet 2013-12-03 16:28:52 UTC
Thanks for the patch, I will have deeper look ASAP

Have you reported this upstream ?
Having a link to upstream bug will be nice (required by Guidelines)

Comment 2 Ruben Kerkhof 2013-12-03 17:41:39 UTC
Hi Remi,

Thanks for looking into it.
I'll report it upstream as well as soon as I can find my Launchpad account.

Comment 3 Fedora Update System 2013-12-14 07:14:52 UTC
libmemcached-1.0.16-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/libmemcached-1.0.16-2.fc20

Comment 4 Fedora Update System 2013-12-14 07:15:03 UTC
libmemcached-1.0.16-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/libmemcached-1.0.16-2.fc19

Comment 5 Remi Collet 2013-12-14 07:17:59 UTC
Update pushed to testing (F19 and F20).

If you need a buildroot overrides, I think you can submit it yourself, else, just ask.

NB: if you plan to also build collectd for EPEL-7, probably you will hit the same issue, so probably you need to file a RHEL-7 bug.

Comment 6 Fedora Update System 2013-12-15 03:29:16 UTC
Package libmemcached-1.0.16-2.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libmemcached-1.0.16-2.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-23397/libmemcached-1.0.16-2.fc20
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2013-12-23 03:44:31 UTC
libmemcached-1.0.16-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2013-12-23 03:48:13 UTC
libmemcached-1.0.16-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.