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.
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)
Hi Remi, Thanks for looking into it. I'll report it upstream as well as soon as I can find my Launchpad account.
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
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
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.
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).
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.
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.