[Pkg-ceph-commits] [ceph] 10/59: Support build on s390x:
James Downing Page
jamespage at moszumanska.debian.org
Thu Feb 1 15:27:50 UTC 2018
This is an automated email from the git hooks/post-receive script.
jamespage pushed a commit to branch ubuntu/artful
in repository ceph.
commit 973119d38d4f09e15c8186b7b8be2e8f55547369
Author: James Page <james.page at ubuntu.com>
Date: Thu Jun 1 15:40:18 2017 +0000
Support build on s390x:
* Support build on s390x:
- d/p/*: Cherry pick misc patches to allow conditional
compilation of RGW Beast frontend.
- d/rules: Disable RGW Beast frontend on s390x architecture.
- d/control: Scope libboost-{context,coroutine}-dev to exclude
s390x.
---
debian/changelog | 6 +++++
debian/control | 4 +--
debian/patches/conditional-rgw-beast.patch | 43 ++++++++++++++++++++++++++++++
debian/patches/gf-complete-i386.patch | 28 +++++++++++++++++++
debian/patches/radosgw-boost-linking.patch | 21 +++++++++++++++
debian/patches/series | 5 ++++
debian/rules | 5 ++++
7 files changed, 110 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index e3f01d2..a697e16 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,6 +20,12 @@ ceph (12.0.3-0ubuntu1) UNRELEASED; urgency=medium
upstream VCS to check for Boost.Container headers only.
- d/rules: Enable use of system boost instead of vendored copy.
- d/control: Add required boost dependencies >= 1.61.
+ * Support build on s390x:
+ - d/p/*: Cherry pick misc patches to allow conditional
+ compilation of RGW Beast frontend.
+ - d/rules: Disable RGW Beast frontend on s390x architecture.
+ - d/control: Scope libboost-{context,coroutine}-dev to exclude
+ s390x.
-- James Page <james.page at ubuntu.com> Fri, 26 May 2017 09:42:42 +0000
diff --git a/debian/control b/debian/control
index e097001..b8b2946 100644
--- a/debian/control
+++ b/debian/control
@@ -25,8 +25,8 @@ Build-Depends: cmake,
libbabeltrace-ctf-dev,
libbabeltrace-dev,
libblkid-dev,
- libboost-context-dev (>= 1.61),
- libboost-coroutine-dev (>= 1.61),
+ libboost-context-dev (>= 1.61) [i386 amd64 armhf arm64 ppc64el],
+ libboost-coroutine-dev (>= 1.61) [i386 amd64 armhf arm64 ppc64el],
libboost-date-time-dev (>= 1.61),
libboost-dev (>= 1.61),
libboost-iostreams-dev (>= 1.61),
diff --git a/debian/patches/conditional-rgw-beast.patch b/debian/patches/conditional-rgw-beast.patch
new file mode 100644
index 0000000..d2c8601
--- /dev/null
+++ b/debian/patches/conditional-rgw-beast.patch
@@ -0,0 +1,43 @@
+From b22cde8e88cf2bc0ac8e94ef160553c20971012b Mon Sep 17 00:00:00 2001
+From: Nathan Cutler <ncutler at suse.com>
+Date: Tue, 23 May 2017 09:44:45 +0200
+Subject: [PATCH] cmake: build boost::context and coroutine only with rgw Beast
+ frontend
+
+boost::context is currently (1.63) unsupported for s390x and anyway
+it makes sense to conditionalize Boost components so they are only
+built with the Ceph components that need them (like is already being
+done for mgr).
+
+Fixes: http://tracker.ceph.com/issues/20048
+Signed-off-by: Nathan Cutler <ncutler at suse.com>
+Signed-off-by: Tim Serong <tserong at suse.com>
+Signed-off-by: Casey Bodley <cbodley at redhat.com>
+Signed-off-by: Kefu Chai <kchai at redhat.com>
+---
+ CMakeLists.txt | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -513,14 +513,19 @@ endif()
+ # Boost
+ option(WITH_SYSTEM_BOOST "require and build with system Boost" OFF)
+
++# Boost::thread depends on Boost::atomic, so list it explicitly.
+ set(BOOST_COMPONENTS
+- thread system regex random program_options date_time iostreams coroutine context)
++ atomic thread system regex random program_options date_time iostreams)
+ set(BOOST_HEADER_COMPONENTS container)
+
+ if(WITH_MGR)
+ list(APPEND BOOST_COMPONENTS python)
+ endif()
+
++if(WITH_RADOSGW_BEAST_FRONTEND)
++ list(APPEND BOOST_COMPONENTS coroutine context)
++endif()
++
+ if (WITH_SYSTEM_BOOST)
+ if(ENABLE_SHARED)
+ set(Boost_USE_STATIC_LIBS OFF)
diff --git a/debian/patches/gf-complete-i386.patch b/debian/patches/gf-complete-i386.patch
new file mode 100644
index 0000000..c9912d3
--- /dev/null
+++ b/debian/patches/gf-complete-i386.patch
@@ -0,0 +1,28 @@
+Description: Fix 32bit x86 builds
+Origin: https://github.com/quantcast/qfs/commit/546e3bd8430724a88737321baef7a29eb0d695bf
+
+--- a/src/erasure-code/jerasure/gf-complete/include/gf_complete.h
++++ b/src/erasure-code/jerasure/gf-complete/include/gf_complete.h
+@@ -31,6 +31,22 @@
+
+ #ifdef INTEL_SSE4_PCLMUL
+ #include <wmmintrin.h>
++
++#if ! defined(__x86_64__)
++#if ! defined(_mm_insert_epi64)
++static __inline __m128i _mm_insert_epi64(__m128i a, long long b, int c) {
++ c <<= 1;
++ a = _mm_insert_epi32(a, (unsigned int)b, c);
++ return _mm_insert_epi32(a, (unsigned int)(b >> 32), c + 1);
++}
++#endif
++#if ! defined(_mm_extract_epi64)
++static __inline long long _mm_extract_epi64 (__m128i __X, const int __N)
++{
++ return __builtin_ia32_vec_ext_v2di ((__v2di)__X, __N);
++}
++#endif
++#endif
+ #endif
+
+ #if defined(ARM_NEON)
diff --git a/debian/patches/radosgw-boost-linking.patch b/debian/patches/radosgw-boost-linking.patch
new file mode 100644
index 0000000..42a0f48
--- /dev/null
+++ b/debian/patches/radosgw-boost-linking.patch
@@ -0,0 +1,21 @@
+From 3dfffa59961856d2b220601964e2816c7cd52678 Mon Sep 17 00:00:00 2001
+From: Nathan Cutler <ncutler at suse.com>
+Date: Tue, 30 May 2017 00:37:00 +0200
+Subject: [PATCH] cmake: link radosgw with boost libraries
+
+Signed-off-by: Nathan Cutler <ncutler at suse.com>
+---
+ src/rgw/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/rgw/CMakeLists.txt
++++ b/src/rgw/CMakeLists.txt
+@@ -151,7 +151,7 @@ target_link_libraries(radosgw radosgw_a
+ cls_log_client cls_statelog_client cls_timeindex_client
+ cls_version_client cls_replica_log_client cls_user_client
+ global ${FCGI_LIBRARY} ${LIB_RESOLV}
+- ${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${BLKID_LIBRARIES}
++ ${CURL_LIBRARIES} ${Boost_LIBRARIES} ${EXPAT_LIBRARIES} ${BLKID_LIBRARIES}
+ ${ALLOC_LIBS})
+ # radosgw depends on cls libraries at runtime, but not as link dependencies
+ add_dependencies(radosgw cls_rgw cls_lock cls_refcount
diff --git a/debian/patches/series b/debian/patches/series
index bdaa133..7f13b30 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -16,4 +16,9 @@
#fix-cycles-arch.patch
#skip-setup.py-makefiles.patch
#powerpc_libatomic.patch
+
+# Misc fixes for Boost integration
disable-boost_container-check.patch
+radosgw-boost-linking.patch
+conditional-rgw-beast.patch
+gf-complete-i386.patch
diff --git a/debian/rules b/debian/rules
index 75d0de6..c03bdcb 100755
--- a/debian/rules
+++ b/debian/rules
@@ -35,6 +35,11 @@ ifeq ($(DEB_HOST_ARCH), armel)
extraopts += -DWITH_ATOMIC_OPS=OFF
endif
+ifeq ($(DEB_HOST_ARCH), s390x)
+ # beast depends on libboost_{context,coroutine} which is not supported on s390x
+ extraopts += -DWITH_RADOSGW_BEAST_FRONTEND=OFF
+endif
+
%:
dh $@ --buildsystem=cmake --with javahelper,python2,python3,autoreconf,systemd --parallel --max-parallel=4
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ceph/ceph.git
More information about the Pkg-ceph-commits
mailing list