RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1116949 - libmemcached fails to link libpthread in RHEL 7
Summary: libmemcached fails to link libpthread in RHEL 7
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libmemcached
Version: 7.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Miroslav Lichvar
QA Contact: Tomas Dolezal
URL:
Whiteboard:
: 1139270 (view as bug list)
Depends On:
Blocks: 1133060 1191020
TreeView+ depends on / blocked
 
Reported: 2014-07-07 16:46 UTC by Deepu K S
Modified: 2019-07-11 08:02 UTC (History)
7 users (show)

Fixed In Version: libmemcached-1.0.16-4.el7
Doc Type: Bug Fix
Doc Text:
Prior to this update, programs attempting to use the libmemcached library could not link to it due to a missing dependency on the libpthread library. Consequently, a link error occurred. A patch has been applied to fix this bug, and programs can now link with libmemcached without errors.
Clone Of:
Environment:
Last Closed: 2015-07-27 09:29:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
libmemcached-pthread.patch (717 bytes, patch)
2014-07-07 16:49 UTC, Deepu K S
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1504 0 normal SHIPPED_LIVE libmemcached bug fix update 2015-07-27 13:28:50 UTC

Description Deepu K S 2014-07-07 16:46:20 UTC
Description of problem:
libmemcached fails to link libpthread. In RHEL 7, libmemcached doesn't have dependency on libpthread as compared with older RHEL versions.

Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux 7.0
libmemcached-1.0.16-3.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1.# cat > test.c
#include <libmemcached/memcached.h>

int main()
{
	memcached_st ms;
	memcached_create(&ms);
        return 0;
}

2. # gcc -Wall -o test test.c -lmemcached
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libmemcached.so: undefined reference to `pthread_once'
collect2: error: ld returned 1 exit status

Actual results:
Program throws a linker error.

Expected results:
Fix linking against libpthread. Program should build without any link errors. 

Additional info:
RHEL 7 :
# ldd /usr/lib64/libmemcached.so
	linux-vdso.so.1 =>  (0x00007fff985fe000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007fce89122000)
	libsasl2.so.3 => /lib64/libsasl2.so.3 (0x00007fce88f05000)
	libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fce88bfd000)
	libm.so.6 => /lib64/libm.so.6 (0x00007fce888fb000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fce8853a000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fce88323000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fce8956c000)
	libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fce88109000)
	libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fce87ed2000)
	libfreebl3.so => /lib64/libfreebl3.so (0x00007fce87c52000)

RHEL 6 :
# ldd /usr/lib64/libmemcached.so
	linux-vdso.so.1 =>  (0x00007fff4dbf4000)
	libm.so.6 => /lib64/libm.so.6 (0x00007fe1a3be7000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fe1a39ca000)  <--====
	libc.so.6 => /lib64/libc.so.6 (0x00007fe1a3635000)
	/lib64/ld-linux-x86-64.so.2 (0x0000003379e00000)

Workaround :
# gcc -Wall -o test test.c -lmemcached -lpthread

Fedora BZ : https://bugzilla.redhat.com/show_bug.cgi?id=1037707
A patch is provided in above BZ which fixes this issue. (patch attached to bug report).

Comment 2 Deepu K S 2014-07-07 16:49:38 UTC
Created attachment 916136 [details]
libmemcached-pthread.patch

Comment 5 Miroslav Lichvar 2015-01-05 12:54:52 UTC
*** Bug 1139270 has been marked as a duplicate of this bug. ***

Comment 11 errata-xmlrpc 2015-07-27 09:29:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1504.html


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