From 609988b84b28aec0cc2122099b908854e06bceebe04bd0a47d57daf31ceb47bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Thu, 18 Apr 2013 21:11:20 +0000 Subject: [PATCH] Accepting request 172385 from home:dimstar:branches:server:monitoring More fixes for sasl linking... with this, collectd finally builds OBS-URL: https://build.opensuse.org/request/show/172385 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libmemcached?expand=0&rev=38 --- libmemcached-pthread.patch | 14 ++++++++++++++ libmemcached.changes | 9 +++++++++ libmemcached.spec | 7 +++++-- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 libmemcached-pthread.patch diff --git a/libmemcached-pthread.patch b/libmemcached-pthread.patch new file mode 100644 index 0000000..bdb9b7b --- /dev/null +++ b/libmemcached-pthread.patch @@ -0,0 +1,14 @@ +=== modified file 'm4/ax_pthread.m4' +--- m4/ax_pthread.m4 2012-07-27 04:00:47 +0000 ++++ m4/ax_pthread.m4 2012-11-09 03:56:45 +0000 +@@ -123,7 +123,7 @@ + # which indicates that we try without any flags at all, and "pthread-config" + # which is a program returning the flags for the Pth emulation library. + +-ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" ++ax_pthread_flags="pthreads none -Kthread -kthread lthread -lpthread -lpthreads -mthreads pthread --thread-safe -mt pthread-config" + + # The ordering *is* (sometimes) important. Some notes on the + # individual items follow: + + diff --git a/libmemcached.changes b/libmemcached.changes index 8023bad..ba603c5 100644 --- a/libmemcached.changes +++ b/libmemcached.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Apr 18 20:55:07 UTC 2013 - dimstar@opensuse.org + +- Add libmemcached-pthread.patch: fix linking agains pthread: + when built with SASL support, libmemcached.so needs to be linked + against libpthread, or we have undefined symbols in the library. +- Add libtool BuildRequires and call autorecon, as above patch + requires to boostrap. + ------------------------------------------------------------------- Sat Apr 13 21:53:59 UTC 2013 - dimstar@opensuse.org diff --git a/libmemcached.spec b/libmemcached.spec index 66f6d05..598499c 100644 --- a/libmemcached.spec +++ b/libmemcached.spec @@ -27,6 +27,8 @@ Url: http://libmemcached.org Source0: https://launchpad.net/libmemcached/1.0/%{version}/+download/libmemcached-%{version}.tar.gz Source1: https://launchpad.net/libmemcached/1.0/%{version}/+download/libmemcached-%{version}.tar.gz.asc Source2: %{name}.keyring +# PATCH-FIX-UPSTREAM libmemcached-pthread.patch lp#133614 dimstar@opensuse.org -- Fix pthread detection +Patch0: libmemcached-pthread.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # List of additional build dependencies BuildRequires: bison @@ -34,6 +36,7 @@ BuildRequires: cyrus-sasl-devel BuildRequires: gcc-c++ BuildRequires: gpg-offline BuildRequires: libevent-devel +BuildRequires: libtool BuildRequires: memcached BuildRequires: pkgconfig # needed for man pages @@ -92,15 +95,15 @@ methods. %prep %gpg_verify %{S:1} %setup -q +%patch0 %build -#autoreconf -fiv +autoreconf -fiv %configure \ --disable-static \ --enable-libmemcachedprotocol \ --with-memcached=%{_sbindir}/memcached make %{?_smp_mflags} -#make %install %makeinstall