[packages/mcrouter] fix boost-context detection
glen
glen at pld-linux.org
Mon Apr 6 13:47:48 CEST 2015
commit 1d1766bf3271e36ca968fbca1968c36dfdb83b0a
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Apr 6 14:44:46 2015 +0300
fix boost-context detection
i'm not sure this fix is accurate, but it fixes detection failure
configure:18038: x86_64-pld-linux-g++ -c -DLIBMC_FBTRACE_DISABLE -Wno-missing-field-initializers -Wno-deprecated -O3 -g -W -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -std=gnu++0x -O2 -fwrapv -pipe -Wformat -Werror=format-security -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC -march=x86-64 -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2 -I/usr/include conftest.cpp >&5
conftest.cpp: In function 'int main()':
conftest.cpp:32:71: error: invalid conversion from 'boost::context::fcontext_t {aka void*}' to 'void**' [-fpermissive]
boost::context::fcontext_t* fc = boost::context::make_fcontext(0, 0, 0);
^
conftest.cpp:32:29: warning: unused variable 'fc' [-Wunused-variable]
boost::context::fcontext_t* fc = boost::context::make_fcontext(0, 0, 0);
^
configure:18038: $? = 1
configure: failed program was:
| #include <boost/context/all.hpp>
| int
| main ()
| {
| boost::context::fcontext_t* fc = boost::context::make_fcontext(0, 0, 0);
autoconf-archive seems to have same code as mcrouter's copy
http://www.gnu.org/software/autoconf-archive/ax_boost_context.html#ax_boost_context
boost-context.patch | 11 +++++++++++
mcrouter.spec | 4 +++-
2 files changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/mcrouter.spec b/mcrouter.spec
index 6d95d3b..ea95d19 100644
--- a/mcrouter.spec
+++ b/mcrouter.spec
@@ -1,5 +1,5 @@
# TODO:
-# - compile fails: undefined reference to `jump_fcontext'
+# - compile fails: undefined reference to `jump_fcontext', check boost-context.patch for proper fix
%define gitrev 39a7572
Summary: Memcached protocol router for scaling memcached deployments
Name: mcrouter
@@ -10,6 +10,7 @@ License: BSD
Group: Daemons
Source0: https://github.com/facebook/mcrouter/archive/%{gitrev}/%{name}-%{gitrev}.tar.gz
# Source0-md5: f99eb19ccd41169e9570ca2b1d152b8a
+Patch0: boost-context.patch
URL: https://github.com/facebook/mcrouter
BuildRequires: autoconf
BuildRequires: automake
@@ -35,6 +36,7 @@ infrastructure at Facebook and Instagram where mcrouter handles almost
%prep
%setup -qc
mv mcrouter-*/* .
+%patch0 -p1
%build
cd mcrouter
diff --git a/boost-context.patch b/boost-context.patch
new file mode 100644
index 0000000..2dbea1f
--- /dev/null
+++ b/boost-context.patch
@@ -0,0 +1,11 @@
+--- mcrouter/mcrouter/m4/ax_boost_context.m4~ 2015-04-01 04:20:13.000000000 +0300
++++ mcrouter/mcrouter/m4/ax_boost_context.m4 2015-04-06 13:47:27.995041619 +0300
+@@ -70,7 +70,7 @@
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[@%:@include <boost/context/all.hpp>]],
+- [[boost::context::fcontext_t* fc = boost::context::make_fcontext(0, 0, 0);]])],
++ [[boost::context::fcontext_t fc = boost::context::make_fcontext(0, 0, 0);]])],
+ ax_cv_boost_context=yes, ax_cv_boost_context=no)
+ CXXFLAGS=$CXXFLAGS_SAVE
+ AC_LANG_POP([C++])
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/mcrouter.git/commitdiff/1d1766bf3271e36ca968fbca1968c36dfdb83b0a
More information about the pld-cvs-commit
mailing list