make fails with: libmemcached/.libs/libmemcached.so: undefined reference to `pthread_once'

Bug #1281907 reported by Victor Trac on 2014-02-19
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
libmemcached
Undecided
Unassigned

Bug Description

On Ubuntu 13.10.

Steps to reproduce:

tar zxvf libmemcached-1.0.18.tar.gz
cd libmemcached-1.0.18
./configure
make

Output:
...
  CXXLD libmemcachedinternal/libmemcachedinternal.la
copying selected object files to avoid basename conflicts...
  CXX libmemcached/libmemcachedinternal_libmemcachedutilinternal_la-backtrace.lo
  CXX libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-flush.lo
  CXX libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-pid.lo
  CXX libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-ping.lo
  CXX libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-pool.lo
  CXX libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-version.lo
  CXXLD libmemcachedinternal/libmemcachedutilinternal.la
  CXX clients/clients_memcapable-memcapable.o
  CXX libmemcached/clients_memcapable-byteorder.o
  CXXLD clients/memcapable
  CXX clients/memcat.o
  CXXLD clients/memcat
  CXX clients/memcp.o
  CXXLD clients/memcp
  CXX clients/memdump.o
  CXXLD clients/memdump
  CXX clients/memerror.o
  CXXLD clients/memerror
  CXX clients/memexist.o
  CXXLD clients/memexist
  CXX clients/memtouch.o
  CXXLD clients/memtouch
  CXX clients/memflush.o
  CXXLD clients/memflush
  CXX clients/memparse.o
  CXXLD clients/memparse
libmemcached/.libs/libmemcached.so: undefined reference to `pthread_once'
collect2: error: ld returned 1 exit status
make[1]: *** [clients/memparse] Error 1
make[1]: Leaving directory `/mnt/scratch/Downloads/libmemcached-1.0.18'
make: *** [all] Error 2

Victor Trac (victor-trac) wrote :
description: updated
Evangelos Foutras (foutrelis) wrote :

This appears to be a libtool bug:

https://bugzilla.redhat.com/show_bug.cgi?id=661333

Fedora has applied a workaround to their libmemcached package:

https://bugzilla.redhat.com/show_bug.cgi?id=1037707

jethro.sun (jethro-sun7) wrote :

While I am trying to use memaslap, I got errors like:

/usr/bin/ld: clients/ms_thread.o: undefined reference to symbol 'pthread_key_delete@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:4454: recipe for target 'clients/memaslap' failed
make[1]: *** [clients/memaslap] Error 1
make[1]: *** Waiting for unfinished jobs....
ar: `u' modifier ignored since `D' is the default (see `U')
make[1]: Leaving directory '/home/admin/test/libmemcached-1.0.17'
Makefile:3481: recipe for target 'all' failed
make: *** [all] Error 2

Presumably it is also because of this upstream bug. Is that right?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.