Commit Graph

246 Commits

Author SHA1 Message Date
Kefu Chai
4231cfbc99 cmake: DPDK works w/o CRYPTOPP
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-12-13 14:54:17 +08:00
Kefu Chai
4c2216de6a cmake: add WITH_STATIC_LIBSTDCXX option
to link libceph-common with libstdc++ if it is enabled.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-12-12 00:26:52 +08:00
Kefu Chai
a5190c9887
Merge pull request #19202 from tchaikov/wip-check-pthread-ext
cmake,common/RWLock: check for libpthread extensions

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2017-12-01 10:36:21 +08:00
Kefu Chai
12dc5733c9
Merge pull request #18938 from tchaikov/wip-cmake
cmake: check gcc version not release date for libstdc++ saneness

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2017-11-29 15:38:16 +08:00
Kefu Chai
cf50fb941e cmake,common/RWLock: check for libpthread extensions
pthread_rwlockattr_setkind_np() is a GNU extension of libpthread. and
Tianshan Qu pointed out, we cannot use
ifdef(PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP) to detect the
availability of this function, because it's an enum not a macro. so,
like other *_np() extensions, we check this one also using cmake at
the configure phase.

Reported-by: Tianshan Qu <tianshan@xsky.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-28 23:50:36 +08:00
Kefu Chai
764c2c0e1c cmake: silence CMP0054 warning
see https://gitlab.kitware.com/cmake/cmake/issues/17381 and
a8be8b1b54,
so before the updated cmake is released and packaged. we should
add this setting.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-27 12:50:38 +08:00
Kefu Chai
68c52a669c
Merge pull request #19017 from tchaikov/wip-bluestore-without-aio
bluestore,cmake: enable building bluestore without aio

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
Reviewed-by: Mykola Golub <to.my.trociny@gmail.com>
2017-11-22 12:26:34 +08:00
Kefu Chai
89a48189ea cmake: only create sysctl file on linux
and check 64bit platform by using the sizeof(void*)

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-20 15:45:03 +08:00
Kefu Chai
586da3da4f
Merge pull request #18544 from ddiss/pid_max
sysctl.d: set kernel.pid_max=4194304

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-11-20 14:37:08 +08:00
Kefu Chai
346fd43bf8 cmake: complain if spdk/pmem is enabled w/o bluestore
and complain if bluestore is enabled w/o any backend found.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-20 13:04:07 +08:00
Kefu Chai
57e792bcae bluestore: enable building bluestore w/o libaio
KernelDevice is tightly coupled with libaio. more work is needed to
decouple aio from it. but by guarding KernelDevice with HAVE_LIBAIO, we
can enable bluestore on platforms w/o libaio.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-20 11:18:02 +08:00
Kefu Chai
a69bd61b8c cmake: use BuildDPDK if libdpdk not found
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-18 10:45:26 +08:00
Kefu Chai
dbe04b4a85 cmake: refactor dpdk related code
* move the check of `USE_CRYPTOPP` to $top_srcdir/CMakeLists.txt
* remove reference of DPDK_LIBRARY, it's defined nowhere
* move the dpdk code to a single place

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-18 10:43:33 +08:00
David Disseldorp
14a0c2a727 sysctl.d: set kernel.pid_max=4194304 on 64-bit systems
For CONFIG_BASE_FULL Linux kernels, the maximum number of proc/thread
IDs is set to 32768 by default. This default limit can be quite easily
hit during recovery on nodes with high OSD counts.
To avoid hitting the pid_max default limit, attempt to configure it to
4194304, which corresponds to the maximum limit possible on 64-bit
CONFIG_BASE_FULL kernels.

Fixes: http://tracker.ceph.com/issues/21929

Signed-off-by: David Disseldorp <ddiss@suse.de>
2017-11-17 14:40:23 +01:00
Kefu Chai
df446f06cb cmake: WITH_SPDK=ON by default
Signed-off-by: wanjun.lp <wanjun.lp@alibaba-inc.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-17 15:40:00 +08:00
Kefu Chai
01a9f17825 cmake: build spdk/dpdk in cmake modules
Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: wanjun.lp <wanjun.lp@alibaba-inc.com>
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
2017-11-17 15:37:53 +08:00
Kefu Chai
10ab96be4d
Merge pull request #18711 from adamemerson/wip-system-includes
cmake: System Includes to silence warnings from submodules and libraries!

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-11-04 16:03:37 +08:00
Kefu Chai
2ce53a7b30
Merge pull request #18597 from tchaikov/wip-cmake-cleanup
cmake: cleanups

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Ali Maredia <amaredia@redhat.com>
2017-11-04 16:00:47 +08:00
Adam C. Emerson
8d4a07f89f build: Mark dependency includes as SYSTEM
It is not really our business to debug python, boost, or our other
dependencies. Mark them as system includes.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2017-11-03 23:58:41 -04:00
Kefu Chai
c43bac48b0 cmake: fix indent
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-03 16:23:26 +08:00
Kefu Chai
4c2dd1607f cmake: remove unused definitions
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-03 16:23:12 +08:00
Casey Bodley
b904b57504 rgw: remove boost::coroutine and context deps
the beast frontend no longer uses stackful coroutines, so these
dependencies aren't necessary

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-10-27 11:28:40 -04:00
Kefu Chai
4ec719bf9e Merge pull request #18357 from asomers/have_libaio
Build: create a proper WITH_BLUESTORE option

Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
Reviewed-By: Kefu Chai <kchai@redhat.com>
2017-10-21 10:38:37 +08:00
Ali Maredia
2e477f3c05 Merge pull request #17673 from mogeb/blkin
blkin: link against lttng-ust-fork
2017-10-20 15:52:55 -04:00
Jianpeng Ma
b4cc9a9aa8 cmake: Build libpmem from source code.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2017-10-20 00:44:09 +08:00
Alan Somers
1430f36f67 Build: create a proper WITH_BLUESTORE option
Using Bluestore is not the same thing as having libaio, especially on
non-Linux platforms.

Signed-off-by: Alan Somers <asomers@gmail.com>
2017-10-18 10:20:06 -06:00
Ali Maredia
756d539d92 Merge pull request #18285 from tchaikov/wip-cmake
cmake: bump up required cmake version to 2.8.12
2017-10-13 10:47:34 -04:00
Kefu Chai
3f27dbbdb0 cmake: s/LINK_PRIVATE/PRIVATE/
as 2.8.12 is required not, no need to be compatible with 2.8.11 anymore.

this reverts 457f023.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-10-13 14:32:32 +08:00
Kefu Chai
77ab5eb821 cmake: refactor -fsanitize=... options
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-10-13 14:32:32 +08:00
Kefu Chai
055ae5c476 cmake: use CMAKE_POSITION_INDEPENDENT_CODE not -fPIC
we use the global setting of CMAKE_POSITION_INDEPENDENT_CODE for
defining this flag.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-10-13 14:02:59 +08:00
Kefu Chai
966898329c cmake: bump up the required version to 2.8.12
as both trusty and centos 7.3 offer 2.8.12

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-10-13 14:02:59 +08:00
Kefu Chai
f7822816db Merge pull request #17972 from cbodley/wip-21401
auth: keep /dev/urandom open for get_random_bytes

Reviewed-by: Adam Emerson <aemerson@redhat.com>
2017-10-13 12:16:26 +08:00
Kefu Chai
0c9c5ffe0f cmake: set supported language the right way
the second param of enable_launage() is not used, we should call it
multiple times to enable more than one language. switch to project()
command for simplicity.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-10-10 19:54:31 +08:00
Casey Bodley
513fa79f2d cmake: detect presence of getentropy
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-10-09 10:42:25 -04:00
Kefu Chai
c999abd7a8 cmake: requires rockdb version 5.8
we've updated the rockdb wrapper on ceph side to be compatible with
the latest version of rocksdb upstream. so ceph is not compatible with
older version of rocksdb.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-19 13:46:50 +08:00
Kefu Chai
5980a60ab3 cmake: check for fdatasync() on non osx
on osx, fdatasync() is a syscall without userspace wrapper.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-09-16 10:43:32 +08:00
Mohamad Gebai
9049a97d41 blkin: link against lttng-ust-fork
Tracing with LTTng doesn't work if an application clone()s other
threads. This is an LTTng-related issue and the fix is LD_PRELOAD'ing
liblttng-ust-fork, or linking against it.
We don't have this issue with "regular" tracepoints (see WITH_LTTNG)
because the tracepoints are loaded using dlopen() at runtime by each
Ceph process.

Signed-off-by: Mohamad Gebai <mgebai@suse.com>
2017-09-07 09:43:20 -04:00
Sage Weil
d87e42386a Merge pull request #16733 from liupan1111/wip-bluefs-fio
os: add compile option to build libbluefs.so 

Reviewed-by: Sage Weil <sage@redhat.com>
2017-08-31 15:45:39 -05:00
Kefu Chai
b567261208 cmake: require lz4 v1.7 for building lz4 compressor
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-08-17 16:01:55 +08:00
Pan Liu
490c281fb1 os: add compile option to build libbluefs.so
Signed-off-by: Pan Liu <wanjun.lp@alibaba-inc.com>
2017-08-02 07:16:16 +08:00
Jenkins Build Slave User
b661348f15 12.1.2 2017-08-01 17:55:40 +00:00
Jenkins Build Slave User
f3e663a190 12.1.1 2017-07-17 16:56:02 +00:00
Sage Weil
8b08bd580d Merge remote-tracking branch 'gh/luminous' 2017-07-07 14:19:47 -04:00
Kefu Chai
d723b8a667 Merge pull request #15305 from wjwithagen/wip-wjw-HAVE_BABELTRACE
cmake: Rewrite HAVE_BABELTRACE  option to WITH_

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-07-04 20:20:12 +08:00
Willem Jan Withagen
b331898ea9 CMakeLists.txt: Rewrite 2 remaning options to WITH_
All options to en/disable inclusion of libraries or other software
are of the format WITH_ so that the Cmake commaind like ahs all
WITH_* options. The WITH_=ON option will result in a HAVE_ setting
in CMAKE so that tests can use that variable.

Last "abusers" to actually follow this format.

 - HAVE_BABELTRACE

 - HAVE_ZFSLIB is fixed in #15907

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2017-07-02 17:10:01 +02:00
Kefu Chai
f8d5f74663 cmake: compile libzfs backend conditionally
* do not REQUIRE libzfs if it is enabled, this follows the way how we
  handle `WITH_XFS` option.
* also refactor the cmake script related to libxfs backend support a
  little bit.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-06-27 23:28:03 +08:00
Jenkins Build Slave User
262617c9f1 12.1.0 2017-06-22 15:43:50 +00:00
Kefu Chai
1e1b108bb6 Merge pull request #15376 from tchaikov/wip-remove-boost-submodule
cmake: build boost as an external project

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2017-06-15 00:40:28 +08:00
Kefu Chai
1b96dada33 cmake: include boost before default system directory
so ceph will prefer the local boost installation to the one in system if
any.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-06-14 23:53:50 +08:00
Kefu Chai
83432b4461 cmake: build boost as an external project
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-06-14 23:53:50 +08:00